Files
CHORUS/pkg/storage/interfaces.go
anthonyrawlins 9bdcbe0447 Integrate BACKBEAT SDK and resolve KACHING license validation
Major integrations and fixes:
- Added BACKBEAT SDK integration for P2P operation timing
- Implemented beat-aware status tracking for distributed operations
- Added Docker secrets support for secure license management
- Resolved KACHING license validation via HTTPS/TLS
- Updated docker-compose configuration for clean stack deployment
- Disabled rollback policies to prevent deployment failures
- Added license credential storage (CHORUS-DEV-MULTI-001)

Technical improvements:
- BACKBEAT P2P operation tracking with phase management
- Enhanced configuration system with file-based secrets
- Improved error handling for license validation
- Clean separation of KACHING and CHORUS deployment stacks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-06 07:56:26 +10:00

46 lines
1.7 KiB
Go

// Package storage provides common storage interfaces for CHORUS
// 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{}
}
// SearchQuery defines search criteria for UCXL content
type SearchQuery struct {
Agent string `json:"agent,omitempty"`
Role string `json:"role,omitempty"`
Project string `json:"project,omitempty"`
Task string `json:"task,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"`
}
// 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"`
}