// Package storage provides common storage interfaces for BZZZ // This package contains shared storage interfaces to avoid circular dependencies. package storage import "time" // UCXLStorage defines the interface for UCXL content storage operations type UCXLStorage interface { // StoreUCXLContent stores content at a UCXL address with role-based encryption StoreUCXLContent(address string, content []byte, role string, contentType string) error // RetrieveUCXLContent retrieves and decrypts content from a UCXL address RetrieveUCXLContent(address string) ([]byte, *UCXLMetadata, error) // AnnounceContent announces content availability in the network AnnounceContent(address string) error // SearchContent searches for content based on query parameters SearchContent(query *SearchQuery) ([]*UCXLMetadata, error) // GetMetrics returns storage metrics GetMetrics() map[string]interface{} } // UCXLMetadata represents metadata about stored UCXL content type UCXLMetadata struct { Address string `json:"address"` CreatorRole string `json:"creator_role"` ContentType string `json:"content_type"` CreatedAt time.Time `json:"created_at"` Size int64 `json:"size"` Encrypted bool `json:"encrypted"` } // SearchQuery represents search parameters for UCXL content type SearchQuery struct { Agent string `json:"agent,omitempty"` Role string `json:"role,omitempty"` Project string `json:"project,omitempty"` ContentType string `json:"content_type,omitempty"` CreatedAfter time.Time `json:"created_after,omitempty"` CreatedBefore time.Time `json:"created_before,omitempty"` Limit int `json:"limit,omitempty"` }