Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AgentExtractor ¶
type AgentExtractor interface {
Extract(ctx context.Context, browser browser.Controller, category string) ([]types.Agent, error)
}
AgentExtractor extracts agent data
type CategoryExtractor ¶
type CategoryExtractor interface {
Extract(ctx context.Context, browser browser.Controller) ([]types.Category, error)
}
CategoryExtractor extracts category data
type Config ¶
type Config struct {
BaseURL string
CacheEnabled bool
CacheTTL time.Duration
RequestTimeout time.Duration
UserAgent string
}
Config holds service configuration
type ContentExtractor ¶
type ContentExtractor interface {
Extract(ctx context.Context, browser browser.Controller, url string) (string, error)
}
ContentExtractor extracts agent content/definition
type ExtractorSet ¶
type ExtractorSet struct {
Categories CategoryExtractor
Agents AgentExtractor
Content ContentExtractor
}
ExtractorSet holds all data extractors
type MarketplaceService ¶
type MarketplaceService interface {
// Categories
GetCategories(ctx context.Context) ([]types.Category, error)
// Agents
GetAgents(ctx context.Context, category string) ([]types.Agent, error)
GetAgent(ctx context.Context, agentID string) (*types.Agent, error)
// Content
GetAgentContent(ctx context.Context, agentID string) (string, error)
// Cache management
RefreshCache(ctx context.Context) error
ClearCache() error
GetCacheStats() interface{} // Returns cache.CacheStats
// Health
HealthCheck(ctx context.Context) error
}
MarketplaceService defines the interface for marketplace operations
func NewMarketplaceService ¶
func NewMarketplaceService( browser browser.Controller, cache cache.Manager, extractors ExtractorSet, config Config, ) MarketplaceService
NewMarketplaceService creates a new marketplace service
Click to show internal directories.
Click to hide internal directories.