Documentation
¶
Overview ¶
Package catalog manages discovery metadata independently of release installation.
Index ¶
- Constants
- func Add(file *File, source string, release *pluginoci.Release, ...) error
- func NormalizeVersion(version string) string
- func ParseReleaseReference(value string) (name.Reference, error)
- func Publish(ctx context.Context, registry atmosoci.Registry, reference string, file *File, ...) error
- func Remove(file *File, name, version string) error
- type Entry
- type File
- type Filter
- type InventoryOption
- type PublicVerifier
- type ReleaseSelection
- type Spec
- type SyncOption
- type Syncer
- type Version
- type Yanked
Constants ¶
const Kind = "AtmosPluginCatalog"
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add(file *File, source string, release *pluginoci.Release, descriptors *extension.Registry) error
Add records a verified release's metadata without executing the plugin.
func NormalizeVersion ¶
NormalizeVersion strips a single leading "v" so "v0.1.0" and "0.1.0" name the same release. Catalog versions are stored without the prefix because they are strict semantic versions.
func ParseReleaseReference ¶
ParseReleaseReference validates a release reference locally. A tag or digest is required, because registries otherwise resolve an implicit "latest" that catalogs must not pin.
func Publish ¶
func Publish(ctx context.Context, registry atmosoci.Registry, reference string, file *File, expected string) error
Publish checks the caller's observed revision and digest immediately before replacement. Publishers must serialize writes; registries without CAS cannot make the final check and tag update atomic.
Types ¶
type Entry ¶
type Entry struct {
Name string `yaml:"name" json:"name"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Publisher string `yaml:"publisher" json:"publisher"`
Capabilities []string `yaml:"capabilities" json:"capabilities"`
Runtime string `yaml:"runtime" json:"runtime"`
Source string `yaml:"source" json:"source"`
Versions []Version `yaml:"versions" json:"versions"`
}
Entry describes a package repository and the releases indexed for discovery.
type File ¶
File is the standard Atmos manifest envelope for mutable discovery metadata.
type Filter ¶
type Filter struct{ Query, Capability, Runtime string }
Filter constrains catalog discovery without loading executable payloads.
type InventoryOption ¶
type InventoryOption func(*inventoryOptions)
InventoryOption configures committed catalog input independently of release planning.
func WithHead ¶
func WithHead(head string) InventoryOption
WithHead selects the committed revision containing the accepted inventory and manifests.
func WithInventory ¶
func WithInventory(file string) InventoryOption
WithInventory selects a repository-relative inventory file.
func WithInventoryRunner ¶
func WithInventoryRunner(runner pkgit.Runner) InventoryOption
WithInventoryRunner injects Git access for inventory reads.
type PublicVerifier ¶
PublicVerifier checks anonymously readable OCI bytes.
type ReleaseSelection ¶
type ReleaseSelection struct {
Name string `json:"name"`
Version string `json:"version"`
Repository string `json:"repository"`
}
ReleaseSelection identifies a published package version to reconcile into a catalog.
func ReadInventory ¶
func ReadInventory(ctx context.Context, options ...InventoryOption) ([]ReleaseSelection, error)
ReadInventory selects releases from committed manifests without building a CI release plan. It resolves the revision once, so concurrent branch movement cannot mix snapshots.
type Spec ¶
type Spec struct {
Entries []Entry `yaml:"entries" json:"entries"`
}
Spec holds discoverable packages. Catalog inclusion does not establish trust.
type SyncOption ¶
type SyncOption func(*syncOptions)
SyncOption configures catalog reconciliation.
func WithPublicVerification ¶
func WithPublicVerification(verifier PublicVerifier) SyncOption
WithPublicVerification checks releases before listing them and the catalog after publication.
func WithSkipMissing ¶
func WithSkipMissing() SyncOption
WithSkipMissing permits only registry not-found releases to remain absent.
type Syncer ¶
type Syncer struct {
// contains filtered or unexported fields
}
Syncer reconciles releases using an injected registry and extension registry.
func (*Syncer) Sync ¶
func (s *Syncer) Sync(ctx context.Context, target string, releases []ReleaseSelection, options ...SyncOption) error
Sync merges verified releases into the current catalog and publishes once. Historical versions and existing yank metadata are retained. Callers must serialize publishers.
type Version ¶
type Version struct {
Version string `yaml:"version" json:"version"`
Digest string `yaml:"digest" json:"digest"`
Platforms []string `yaml:"platforms" json:"platforms"`
Compatibility pluginmanifest.Compatibility `yaml:"compatibility" json:"compatibility"`
Yanked *Yanked `yaml:"yanked,omitempty" json:"yanked,omitempty"`
}
Version pins a discovery result to an immutable OCI index.