Documentation
¶
Overview ¶
Package marketplace owns Compozy-curated discovery feeds and their durable projection.
Index ¶
- Constants
- Variables
- func ApplyCompatibility(document *Document, feed, raw []byte) error
- func DigestFile(path string) (digest string, err error)
- func NormalizeMCPInputValue(inputType string, raw string) (string, error)
- func NormalizeQuery(query string) string
- func ValidateCatalogDirectory(directory string) error
- func ValidateIcon(value string) error
- func ValidateInputGrammar(inputs []EntryInput) error
- func ValidateMCPInputValue(value string) error
- type BrowseFilter
- type BrowseResult
- type CatalogDiagnostic
- type CatalogService
- func (s *CatalogService) Browse(ctx context.Context, query string, offset, limit int) (BrowseResult, error)
- func (s *CatalogService) BrowseFiltered(ctx context.Context, filter BrowseFilter, offset, limit int) (BrowseResult, error)
- func (s *CatalogService) Close(ctx context.Context) error
- func (s *CatalogService) Detail(ctx context.Context, source, entryID string) (*Entry, error)
- func (s *CatalogService) Entry(ctx context.Context, origin Origin) (*Entry, error)
- func (s *CatalogService) Reconfigure(ctx context.Context, sources []SourceBinding, ttl, timeout time.Duration) error
- func (s *CatalogService) Refresh(ctx context.Context, names ...string) (RefreshReport, error)
- func (s *CatalogService) ResolveExtensionInstall(ctx context.Context, installSlug, version string) (*Entry, error)
- func (s *CatalogService) Sections(ctx context.Context, query string, perSection int) (SectionsResult, error)
- func (s *CatalogService) SetSources(ctx context.Context, sources []SourceBinding) error
- func (s *CatalogService) Status(ctx context.Context) ([]SourceState, error)
- func (s *CatalogService) ValidateSources(ctx context.Context, sources []SourceBinding) error
- type Category
- type CategoryCount
- type CategoryID
- type CompatibilityDocument
- type DirectorySource
- type Document
- type Entry
- type EntryDetails
- type EntryInput
- type ExtensionEntryDetails
- type FeedSource
- type HTTPSource
- type HTTPSourceOption
- type InputBinding
- type InputGrammarError
- type InstallOutcome
- type InstalledPackage
- type ListResult
- type Notifier
- type Origin
- type PluginContents
- type PluginInspection
- type PluginInspector
- type PluginProjector
- type PluginProjectorOption
- type PluginResolver
- type PluginSource
- type PluginSourceReader
- type Preset
- type PresetDocument
- type RefreshOutcome
- type RefreshReport
- type ResolvedSource
- type SQLiteStore
- func (s *SQLiteStore) BrowseSource(ctx context.Context, source, query string, offset, limit int) (SourcePage, error)
- func (s *SQLiteStore) BrowseSources(ctx context.Context, sources []string, query string, offset, limit int) (BrowseResult, error)
- func (s *SQLiteStore) ConfigureSources(ctx context.Context, sources []ResolvedSource, revision string) (SourceConfiguration, error)
- func (s *SQLiteStore) GetEntry(ctx context.Context, source string, entryID string) (*Entry, error)
- func (s *SQLiteStore) GetExtensionByInstallSlug(ctx context.Context, installSlug string, version string) (*Entry, error)
- func (s *SQLiteStore) MarkSourceStale(ctx context.Context, source string, generation int64, ...) error
- func (s *SQLiteStore) PackageDigests(ctx context.Context, sources []string) (map[string]struct{}, error)
- func (s *SQLiteStore) ReplaceSource(ctx context.Context, source string, generation int64, document *Document) error
- func (s *SQLiteStore) SourceState(ctx context.Context, source string) (*SourceState, error)
- type Section
- type SectionsResult
- type Service
- type ServiceOption
- func WithInstalledPackages(load func(context.Context) ([]InstalledPackage, error)) ServiceOption
- func WithLogger(logger *slog.Logger) ServiceOption
- func WithNotifier(notifier Notifier) ServiceOption
- func WithNow(now func() time.Time) ServiceOption
- func WithPackageCache(cache *pluginsource.PackageCache) ServiceOption
- type Source
- type SourceBinding
- type SourceConfiguration
- type SourceExistsError
- type SourceNameRetainedError
- type SourcePage
- type SourceState
- type Store
- type UnsupportedManifestVersionError
Constants ¶
const ( CategoryProductivity = "productivity" CategoryCommunication = "communication" CategoryDesign = "design" CategoryDevelopment = "development" CategoryData = "data" CategoryCloud = "cloud" CategoryFinance = "finance" CategorySalesMarketing = "sales-marketing" CategoryResearch = "research" CategorySecurity = "security" CategoryAiAgents = "ai-agents" CategoryMore = "more" CategoryFeatured = "featured" )
const ( ExtensionFormatCompozy = "compozy" ExtensionFormatAgentPlugin = "agent-plugin" )
Display-only format markers. Install-time detection stays authoritative — an entry may omit the marker and still resolve to a portable package.
const ( CompozyCatalogSource = "compozy-catalog" CompozyCatalogRef = "catalog:compozy" )
const ( SourceKindFeed = "feed" SourceKindPreset = "preset" SourceKindCustom = "custom" )
const ( RefreshOutcomeSucceeded = "succeeded" RefreshOutcomeFailed = "failed" InstallOutcomeSucceeded = "succeeded" InstallOutcomeFailed = "failed" InstallPolicyGatePassed = "passed" )
const (
AllEntries = -1
)
const CatalogSource = "compozy-catalog"
const ManifestVersion = 3
Variables ¶
var ( ErrResponseTooLarge = errors.New("marketplace catalog: response exceeds size limit") ErrEntryNotFound = errors.New("marketplace catalog: entry not found") ErrSourceStateMissing = errors.New("marketplace catalog: source state missing") ErrServiceClosed = errors.New("marketplace catalog: service is closed") )
var ( ErrSourceNotFound = errors.New("marketplace_source_not_found") ErrInstallSlugInvalid = errors.New("marketplace_install_slug_invalid") )
var ( // ErrCatalogDecode reports malformed JSON or multiple JSON values in a catalog document. ErrCatalogDecode = errors.New("marketplace catalog: document decode failed") // ErrCatalogValidation reports a decoded catalog document that violates the catalog contract. ErrCatalogValidation = errors.New("marketplace catalog: document validation failed") )
var ErrRefreshBudgetExhausted = errors.New(budgetExhausted)
var ErrSourceExists = errors.New("marketplace_source_exists")
var ErrSourceNameRetained = errors.New("marketplace_source_name_retained")
var ErrSourcePresetReadonly = errors.New("marketplace_source_preset_readonly")
var ErrUnknownCategory = errors.New("marketplace_category_unknown")
Functions ¶
func ApplyCompatibility ¶
ApplyCompatibility binds requirements to the exact feed and archive bytes before persistence.
func DigestFile ¶
DigestFile computes the lowercase SHA-256 digest required by extension feed entries.
func NormalizeMCPInputValue ¶
NormalizeMCPInputValue validates and canonicalizes a catalog input value.
func NormalizeQuery ¶
NormalizeQuery applies the shared catalog query limit in Unicode characters.
func ValidateCatalogDirectory ¶
ValidateCatalogDirectory validates the complete publishable catalog using runtime schemas.
func ValidateIcon ¶
ValidateIcon rejects unsupported or oversized catalog image references.
func ValidateInputGrammar ¶
func ValidateInputGrammar(inputs []EntryInput) error
ValidateInputGrammar validates inputs independently of the servers that consume them.
func ValidateMCPInputValue ¶
ValidateMCPInputValue enforces transport-safe bounds shared by feed defaults and install values.
Types ¶
type BrowseFilter ¶
type BrowseFilter struct {
PerSection int
Query string
Category CategoryID
Installed []Origin
}
type BrowseResult ¶
type BrowseResult struct {
Categories []CategoryCount
Refreshing bool
Entries []Entry
Total int
Revision string
Sources []SourceState
Stale bool
ErrorClass string
LastError string
// contains filtered or unexported fields
}
BrowseResult is one ordered page from the complete enabled source set.
func FilterBrowse ¶
func FilterBrowse(page BrowseResult, filter BrowseFilter, offset, limit int) (BrowseResult, error)
FilterBrowse applies collapse and facets before slicing the complete enabled-source snapshot.
type CatalogDiagnostic ¶
type CatalogDiagnostic struct {
EntryID string `json:"entry_id"`
Field string `json:"field"`
Code string `json:"code"`
Message string `json:"message"`
}
CatalogDiagnostic reports a non-fatal field rejection without retaining unsafe values.
type CatalogService ¶
type CatalogService struct {
// contains filtered or unexported fields
}
CatalogService coordinates TTL freshness and durable projections.
func NewService ¶
func NewService( ctx context.Context, store Store, sources []SourceBinding, ttl, refreshTimeout time.Duration, options ...ServiceOption, ) (*CatalogService, error)
NewService owns configured source projections and independently bounded refresh flights.
func (*CatalogService) Browse ¶
func (s *CatalogService) Browse(ctx context.Context, query string, offset, limit int) (BrowseResult, error)
Browse reads a complete source snapshot before scheduling any stale refreshes.
func (*CatalogService) BrowseFiltered ¶
func (s *CatalogService) BrowseFiltered( ctx context.Context, filter BrowseFilter, offset, limit int, ) (BrowseResult, error)
func (*CatalogService) Close ¶
func (s *CatalogService) Close(ctx context.Context) error
Close cancels and joins every refresh flight owned by this service generation.
func (*CatalogService) Detail ¶
Detail resolves an entry from its currently enabled source without remote I/O.
func (*CatalogService) Entry ¶
Entry joins installed provenance to the current source name by immutable origin.
func (*CatalogService) Reconfigure ¶
func (s *CatalogService) Reconfigure(ctx context.Context, sources []SourceBinding, ttl, timeout time.Duration) error
Reconfigure changes acquisition settings and source membership under the same publication lock.
func (*CatalogService) Refresh ¶
func (s *CatalogService) Refresh(ctx context.Context, names ...string) (RefreshReport, error)
func (*CatalogService) ResolveExtensionInstall ¶
func (s *CatalogService) ResolveExtensionInstall(ctx context.Context, installSlug, version string) (*Entry, error)
ResolveExtensionInstall resolves curated acquisition refs without consulting plugin source names.
func (*CatalogService) Sections ¶
func (s *CatalogService) Sections(ctx context.Context, query string, perSection int) (SectionsResult, error)
func (*CatalogService) SetSources ¶
func (s *CatalogService) SetSources(ctx context.Context, sources []SourceBinding) error
SetSources serializes configuration publication with every refresh commit and projection read.
func (*CatalogService) Status ¶
func (s *CatalogService) Status(ctx context.Context) ([]SourceState, error)
func (*CatalogService) ValidateSources ¶
func (s *CatalogService) ValidateSources(ctx context.Context, sources []SourceBinding) error
ValidateSources checks a candidate without publishing source membership or changing generations.
type Category ¶
type Category struct {
ID CategoryID
Label string
}
func Categories ¶
func Categories() []Category
type CategoryCount ¶
type CategoryID ¶
type CategoryID string
func ParseCategoryID ¶
func ParseCategoryID(value string) (CategoryID, error)
func ResolveCategory ¶
func ResolveCategory(explicit, sourceCategory string) CategoryID
type CompatibilityDocument ¶
type CompatibilityDocument struct {
FeedDigestSHA256 string `json:"feed_digest_sha256"`
MinimumVersions map[string]string `json:"minimum_versions"`
}
CompatibilityDocument keeps version requirements separate from the strict released v3 feed.
type DirectorySource ¶
type DirectorySource struct {
// contains filtered or unexported fields
}
DirectorySource reads the extension catalog from an absolute file URL.
func NewDirectorySource ¶
func NewDirectorySource(baseURL string) (*DirectorySource, error)
NewDirectorySource creates a bounded local-checkout catalog source.
func (*DirectorySource) Fetch ¶
func (s *DirectorySource) Fetch(ctx context.Context) (*Document, error)
Fetch reads and validates the local document without mutating projection state.
func (*DirectorySource) FetchPresets ¶
func (s *DirectorySource) FetchPresets(ctx context.Context) (*PresetDocument, error)
FetchPresets reads only the v3 preset catalog from the configured directory.
type Document ¶
type Document struct {
SourceRef string
SourceKind string
DocumentDigest string
DocumentPath string
Owner string
Diagnostics []pluginsource.Diagnostic
ManifestVersion int
GeneratedAt time.Time
FetchedAt time.Time
Entries []Entry
}
Document is one validated catalog snapshot.
func DecodeDocument ¶
DecodeDocument strictly validates the extension catalog family.
type Entry ¶
type Entry struct {
Inputs []EntryInput
Diagnostics []CatalogDiagnostic
SourceName string
Layout string
Icon string
Installable bool
InstallBlocker string
ResolvedRef string
EntryID string
Name string
Description string
Version string
PublishedAt *time.Time
UpdatedAt *time.Time
DigestSHA256 string
Tier string
InstallSlug string
Payload json.RawMessage
FetchedAt time.Time
}
Entry is the durable extension projection and payload.
type EntryDetails ¶
type EntryDetails struct {
Category Category
Featured bool
Supersedes []string
Author string
Source string
SourceRef string
Extension *ExtensionEntryDetails
}
EntryDetails is the typed public projection of one validated catalog payload.
func ProjectEntry ¶
func ProjectEntry(entry Entry) (EntryDetails, error)
ProjectEntry decodes a validated extension row without duplicating feed schemas downstream.
type EntryInput ¶
type EntryInput struct {
ID string `json:"id"`
Prompt string `json:"prompt"`
Type string `json:"type" toml:"type"`
Required bool `json:"required"`
Binding InputBinding `json:"binding"`
Default json.RawMessage `json:"default,omitempty"`
}
EntryInput declares a typed value without depending on a server transport.
type ExtensionEntryDetails ¶
type ExtensionEntryDetails struct {
MinCompozyVersion string
InstanceName string
Inputs []EntryInput
InstallSlug string
ArtifactURL string
DigestSHA256 string
Repository string
Homepage string
License string
Category string
Keywords []string
Acquisition *pluginsource.AcquisitionRecord
Contents PluginContents
// Format is the curated display marker, never install policy: detection at install time decides
// what a package actually is.
Format string
}
type FeedSource ¶
type FeedSource interface {
Source
FetchPresets(context.Context) (*PresetDocument, error)
}
FeedSource reads the published v3 catalog and its optional compatibility metadata.
type HTTPSource ¶
type HTTPSource struct {
// contains filtered or unexported fields
}
HTTPSource fetches the extension catalog from the configured base URL.
func NewHTTPSource ¶
func NewHTTPSource(baseURL string, client *http.Client, options ...HTTPSourceOption) (*HTTPSource, error)
NewHTTPSource creates one explicit-timeout feed source.
func (*HTTPSource) Fetch ¶
func (s *HTTPSource) Fetch(ctx context.Context) (*Document, error)
Fetch downloads and validates the extension catalog without mutating projection state.
func (*HTTPSource) FetchPresets ¶
func (s *HTTPSource) FetchPresets(ctx context.Context) (*PresetDocument, error)
FetchPresets reads the ordered v3 preset catalog through the same bounded transport.
type HTTPSourceOption ¶
type HTTPSourceOption func(*HTTPSource)
HTTPSourceOption customizes bounded feed fetching.
func WithMaxResponseBytes ¶
func WithMaxResponseBytes(limit int64) HTTPSourceOption
WithMaxResponseBytes overrides the response cap, primarily for constrained deployments and tests.
type InputBinding ¶
type InputBinding struct {
Type string `toml:"type" json:"type"`
Name string `toml:"name" json:"name"`
}
InputBinding names the environment variable or URL parameter receiving an input.
type InputGrammarError ¶
InputGrammarError retains the input position for authoring diagnostics.
func (*InputGrammarError) Error ¶
func (e *InputGrammarError) Error() string
func (*InputGrammarError) Unwrap ¶
func (e *InputGrammarError) Unwrap() error
type InstallOutcome ¶
type InstallOutcome struct {
Origin *Origin `json:"origin,omitzero"`
ResolvedRef string `json:"resolved_ref,omitempty"`
EntryID string `json:"entry_id"`
Outcome string `json:"outcome"`
PolicyGate string `json:"policy_gate"`
}
InstallOutcome is the redacted canonical observation for one marketplace install attempt.
type InstalledPackage ¶
type InstalledPackage struct {
EntryID string
Name string
SourceName string
SourceRef string
DigestSHA256 string
}
InstalledPackage is the persisted acquisition metadata needed by source and cache management.
type ListResult ¶
ListResult is one deterministic page from the durable catalog projection.
type Notifier ¶
type Notifier interface {
NotifyCatalogRefresh(ctx context.Context, outcome RefreshOutcome) error
NotifyInstall(ctx context.Context, outcome InstallOutcome) error
}
Notifier persists canonical marketplace observations.
type Origin ¶
Origin is acquisition identity; source display names do not participate in equality.
func ParseInstallSlug ¶
func ParseInstallSlug(slug string, sources []SourceState) (Origin, error)
ParseInstallSlug uses the source index; authored curated acquisition refs have a separate resolver.
func (Origin) InstallSlug ¶
type PluginContents ¶
type PluginInspection ¶
type PluginInspection struct {
InstanceName string
Diagnostics []pluginsource.Diagnostic
Inputs []EntryInput
Contents PluginContents
}
type PluginInspector ¶
type PluginProjector ¶
type PluginProjector struct {
// contains filtered or unexported fields
}
func NewPluginProjector ¶
func NewPluginProjector( resolver PluginResolver, inspect PluginInspector, options ...PluginProjectorOption, ) (*PluginProjector, error)
NewPluginProjector combines source resolution and install inspection within the source refresh budget.
func (*PluginProjector) Project ¶
func (p *PluginProjector) Project( ctx context.Context, doc pluginsource.Document, name string, snapshot *pluginsource.Snapshot, ) ([]Entry, []pluginsource.Diagnostic, error)
Project joins every bounded worker before the caller may release the shared snapshot.
type PluginProjectorOption ¶
type PluginProjectorOption func(*PluginProjector)
func WithPluginRefreshBudget ¶
func WithPluginRefreshBudget(budget time.Duration) PluginProjectorOption
WithPluginRefreshBudget can shorten, but cannot exceed, the source refresh deadline.
type PluginResolver ¶
type PluginResolver interface {
Resolve(
context.Context,
pluginsource.Document,
*pluginsource.Snapshot,
pluginsource.Plugin,
) (pluginsource.AcquisitionRecord, error)
Inspect(context.Context, string, func(context.Context, string) error) error
}
type PluginSource ¶
type PluginSource struct {
// contains filtered or unexported fields
}
func NewPluginSource ¶
func NewPluginSource( config ResolvedSource, reader PluginSourceReader, projector *PluginProjector, ) (*PluginSource, error)
type PluginSourceReader ¶
type PluginSourceReader interface {
Fetch(context.Context, string) (pluginsource.Document, error)
OpenSnapshot(context.Context, pluginsource.Document) (*pluginsource.Snapshot, error)
}
type Preset ¶
type Preset struct {
Name string `json:"name"`
Source string `json:"source"`
Description string `json:"description"`
Default string `json:"default"`
}
Preset is one ordered built-in plugin marketplace registration.
type PresetDocument ¶
type PresetDocument struct {
ManifestVersion int `json:"manifest_version"`
GeneratedAt string `json:"generated_at"`
Entries []Preset `json:"entries"`
}
PresetDocument is the v3 source catalog, separate from extension entries.
func DecodePresets ¶
func DecodePresets(raw []byte) (*PresetDocument, error)
DecodePresets validates publication metadata while preserving registration order.
type RefreshOutcome ¶
type RefreshOutcome struct {
Source string `json:"source,omitempty"`
Generation int64 `json:"generation"`
Outcome string `json:"outcome"`
EntryCount int `json:"entry_count"`
Stale bool `json:"stale"`
ErrorClass string `json:"error_class,omitempty"`
}
RefreshOutcome is the canonical per-source refresh result.
type RefreshReport ¶
type RefreshReport struct {
Outcomes []RefreshOutcome `json:"outcomes"`
}
RefreshReport contains deterministic per-source refresh outcomes.
type ResolvedSource ¶
type ResolvedSource struct {
Revision string
Name string
Ref string
Kind string
Description string
Enabled bool
}
func ResolveSources ¶
func ResolveSources(cfg config.MarketplaceRuntimeConfig, presets []Preset) ([]ResolvedSource, error)
ResolveSources applies choices by source identity and preserves feed, preset and custom ordering.
type SQLiteStore ¶
type SQLiteStore struct {
// contains filtered or unexported fields
}
SQLiteStore maps validated catalog domain values to the global repository.
func NewSQLiteStore ¶
func NewSQLiteStore(repository storepkg.MarketplaceCatalogRepository) (*SQLiteStore, error)
NewSQLiteStore binds the projection to the global SQLite repository.
func (*SQLiteStore) BrowseSource ¶
func (s *SQLiteStore) BrowseSource(ctx context.Context, source, query string, offset, limit int) (SourcePage, error)
BrowseSource binds the filtered page to the revision that owns its rows.
func (*SQLiteStore) BrowseSources ¶
func (s *SQLiteStore) BrowseSources( ctx context.Context, sources []string, query string, offset, limit int, ) (BrowseResult, error)
func (*SQLiteStore) ConfigureSources ¶
func (s *SQLiteStore) ConfigureSources( ctx context.Context, sources []ResolvedSource, revision string, ) (SourceConfiguration, error)
func (*SQLiteStore) GetExtensionByInstallSlug ¶
func (s *SQLiteStore) GetExtensionByInstallSlug( ctx context.Context, installSlug string, version string, ) (*Entry, error)
GetExtensionByInstallSlug resolves a canonical catalog slug or a retained feed acquisition slug.
func (*SQLiteStore) MarkSourceStale ¶
func (s *SQLiteStore) MarkSourceStale( ctx context.Context, source string, generation int64, errorClass, lastError string, ) error
MarkSourceStale refuses failure results from an obsolete source generation.
func (*SQLiteStore) PackageDigests ¶
func (*SQLiteStore) ReplaceSource ¶
func (s *SQLiteStore) ReplaceSource(ctx context.Context, source string, generation int64, document *Document) error
ReplaceSource commits only to the generation captured before fetching its document.
func (*SQLiteStore) SourceState ¶
func (s *SQLiteStore) SourceState(ctx context.Context, source string) (*SourceState, error)
SourceState returns persisted freshness plus the current projected row count.
type SectionsResult ¶
type SectionsResult struct {
Sections []Section
Revision string
Sources []SourceState
Refreshing bool
Stale bool
ErrorClass string
LastError string
}
func BuildSections ¶
func BuildSections(page BrowseResult, perSection int) (SectionsResult, error)
type Service ¶
type Service interface {
BrowseFiltered(context.Context, BrowseFilter, int, int) (BrowseResult, error)
Sections(context.Context, string, int) (SectionsResult, error)
Entry(context.Context, Origin) (*Entry, error)
Browse(ctx context.Context, query string, offset int, limit int) (BrowseResult, error)
Detail(ctx context.Context, source, entryID string) (*Entry, error)
ResolveExtensionInstall(ctx context.Context, installSlug string, version string) (*Entry, error)
Refresh(ctx context.Context, names ...string) (RefreshReport, error)
Status(ctx context.Context) ([]SourceState, error)
Close(ctx context.Context) error
}
Service exposes internal curated browse, detail, refresh, and status operations.
type ServiceOption ¶
type ServiceOption func(*CatalogService)
ServiceOption customizes service time and observability seams.
func WithInstalledPackages ¶
func WithInstalledPackages(load func(context.Context) ([]InstalledPackage, error)) ServiceOption
func WithLogger ¶
func WithLogger(logger *slog.Logger) ServiceOption
func WithNotifier ¶
func WithNotifier(notifier Notifier) ServiceOption
WithNotifier attaches the failure-isolated canonical refresh notifier.
func WithNow ¶
func WithNow(now func() time.Time) ServiceOption
WithNow injects the UTC clock used for freshness decisions.
func WithPackageCache ¶
func WithPackageCache(cache *pluginsource.PackageCache) ServiceOption
type SourceBinding ¶
type SourceBinding struct {
Config ResolvedSource
Fetcher Source
}
type SourceConfiguration ¶
SourceBinding ties immutable configuration to its acquisition owner.
type SourceExistsError ¶
func (*SourceExistsError) Error ¶
func (e *SourceExistsError) Error() string
func (*SourceExistsError) Unwrap ¶
func (e *SourceExistsError) Unwrap() error
type SourceNameRetainedError ¶
func (*SourceNameRetainedError) Error ¶
func (e *SourceNameRetainedError) Error() string
func (*SourceNameRetainedError) Unwrap ¶
func (e *SourceNameRetainedError) Unwrap() error
type SourcePage ¶
type SourcePage struct {
Entries []Entry
Total int
State SourceState
}
type SourceState ¶
type SourceState struct {
SourceRef string
Kind string
Enabled bool
DocumentDigest string
DocumentPath string
Owner string
Diagnostics []pluginsource.Diagnostic
Installable int
Source string
Generation int64
Revision string
ManifestVersion int
GeneratedAt time.Time
FetchedAt time.Time
Stale bool
LastError string
ErrorClass string
EntryCount int
}
SourceState reports the freshness and failure state for one feed projection.
type Store ¶
type Store interface {
PackageDigests(context.Context, []string) (map[string]struct{}, error)
ConfigureSources(context.Context, []ResolvedSource, string) (SourceConfiguration, error)
BrowseSources(context.Context, []string, string, int, int) (BrowseResult, error)
ReplaceSource(ctx context.Context, source string, generation int64, document *Document) error
MarkSourceStale(ctx context.Context, source string, generation int64, errorClass, lastError string) error
BrowseSource(ctx context.Context, source, query string, offset, limit int) (SourcePage, error)
GetEntry(ctx context.Context, source string, entryID string) (*Entry, error)
GetExtensionByInstallSlug(ctx context.Context, installSlug string, version string) (*Entry, error)
SourceState(ctx context.Context, source string) (*SourceState, error)
}
Store persists the curated projection and freshness state.
type UnsupportedManifestVersionError ¶
type UnsupportedManifestVersionError struct {
Version int
}
UnsupportedManifestVersionError reports a feed and client manifest-version mismatch.
func (*UnsupportedManifestVersionError) Error ¶
func (e *UnsupportedManifestVersionError) Error() string
Source Files
¶
- catalog_files.go
- category.go
- compatibility.go
- digest.go
- directory_source.go
- document_validation.go
- entry_common.go
- entry_extension.go
- entry_icon.go
- entry_input.go
- errors.go
- origin.go
- plugin_projection.go
- plugin_source.go
- presets.go
- projection.go
- sections.go
- service.go
- service_cache.go
- service_extension_install.go
- service_installed.go
- service_lifecycle.go
- service_refresh.go
- service_sources.go
- source.go
- source_config.go
- source_factory.go
- store.go
- store_extension_install.go
- store_source.go
- store_sources.go
- types.go
- unicode_fold.go