catalognext

package
v0.37.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourcePrefixWorkingSet    = "profile:"
	SourcePrefixLegacyCatalog = "legacy-catalog:"
	SourcePrefixOCI           = "oci:"
	SourcePrefixUser          = "user:"
)

Source prefixes must be of the form "<prefix>:"

View Source
const (
	PullOptionMissing = "missing"
	PullOptionNever   = "never"
	PullOptionAlways  = "always"
	PullOptionInitial = "initial"
	PullOptionExists  = "exists"

	// Special value for duration-based pull options. Don't add as supported pull option below.
	// Can be used in combination with exists, initial, or always by appending @duration (e.g. "exists@1h", "always@1w").
	PullOptionDuration = "duration"
)

Options can be used in combination with each other, e.g. "initial+exists@6h".

View Source
const MCPCatalogArtifactType = "application/vnd.docker.mcp.catalog.v1+json"

Variables

This section is empty.

Functions

func Create

func Create(ctx context.Context, dao db.DAO, registryClient registryapi.Client, ociService oci.Service, refStr string, servers []string, workingSetID string, legacyCatalogURL string, title string) error

func InspectServer added in v0.36.0

func InspectServer(ctx context.Context, dao db.DAO, catalogRef string, serverName string, format workingset.OutputFormat) error

func List

func List(ctx context.Context, dao db.DAO, format workingset.OutputFormat) error

func ListServers added in v0.31.0

func ListServers(ctx context.Context, dao db.DAO, catalogRef string, filters []string, format workingset.OutputFormat) error

ListServers lists servers in a catalog with optional filtering

func Pull

func Pull(ctx context.Context, dao db.DAO, ociService oci.Service, refStr string) error

func Push

func Push(ctx context.Context, dao db.DAO, refStr string) error

func Remove

func Remove(ctx context.Context, dao db.DAO, refStr string) error

func Show

func Show(ctx context.Context, dao db.DAO, ociService oci.Service, refStr string, format workingset.OutputFormat, pullOptionParam string, yqExpr string) error

func SupportedPullOptions added in v0.29.0

func SupportedPullOptions() []string

func Tag

func Tag(ctx context.Context, dao db.DAO, refStr string, tag string) error

Types

type Catalog

type Catalog struct {
	Ref             string `yaml:"ref" json:"ref" validate:"required,min=1"`
	Source          string `yaml:"source,omitempty" json:"source,omitempty"`
	CatalogArtifact `yaml:",inline"`
}

func (*Catalog) FindServer added in v0.36.0

func (catalog *Catalog) FindServer(serverName string) *Server

func (Catalog) ToDb

func (catalog Catalog) ToDb() (db.Catalog, error)

func (*Catalog) Validate

func (catalog *Catalog) Validate() error

type CatalogArtifact

type CatalogArtifact struct {
	Title   string   `yaml:"title" json:"title" validate:"required,min=1"`
	Servers []Server `yaml:"servers" json:"servers" validate:"dive"`
}

func (*CatalogArtifact) Digest

func (catalogArtifact *CatalogArtifact) Digest() (string, error)

type CatalogSummary added in v0.31.0

type CatalogSummary struct {
	Ref    string `yaml:"ref" json:"ref"`
	Digest string `yaml:"digest" json:"digest"`
	Title  string `yaml:"title" json:"title"`
}

type CatalogWithDigest

type CatalogWithDigest struct {
	Catalog `yaml:",inline"`
	Digest  string `yaml:"digest" json:"digest"`
}

func NewFromDb

func NewFromDb(dbCatalog *db.Catalog) CatalogWithDigest

type InspectResult added in v0.36.0

type InspectResult struct {
	Server        `yaml:",inline"`
	ReadmeContent string `json:"readmeContent,omitempty" yaml:"readmeContent,omitempty"`
}

type PullOption added in v0.29.0

type PullOption string

type PullOptionConfig added in v0.37.0

type PullOptionConfig struct {
	PullOption PullOption
	Interval   time.Duration
}

func (PullOptionConfig) Evaluate added in v0.37.0

func (pullOptionConfig PullOptionConfig) Evaluate(dbCatalog *db.Catalog, pulledPreviously bool) bool

type PullOptionEvaluator added in v0.37.0

type PullOptionEvaluator struct {
	// contains filtered or unexported fields
}

func NewPullOptionEvaluator added in v0.37.0

func NewPullOptionEvaluator(pullOptionParam string, pulledPreviously bool) (*PullOptionEvaluator, error)

func (*PullOptionEvaluator) Evaluate added in v0.37.0

func (evaluator *PullOptionEvaluator) Evaluate(dbCatalog *db.Catalog) bool

func (*PullOptionEvaluator) IsAlways added in v0.37.0

func (evaluator *PullOptionEvaluator) IsAlways() bool

type Server

type Server struct {
	Type  workingset.ServerType `yaml:"type" json:"type" validate:"required,oneof=registry image remote"`
	Tools []string              `yaml:"tools,omitempty" json:"tools,omitempty"`

	// ServerTypeRegistry only
	Source string `yaml:"source,omitempty" json:"source,omitempty" validate:"required_if=Type registry"`

	// ServerTypeImage only
	Image string `yaml:"image,omitempty" json:"image,omitempty" validate:"required_if=Type image"`

	// ServerTypeRemote only
	Endpoint string `yaml:"endpoint,omitempty" json:"endpoint,omitempty" validate:"required_if=Type remote"`

	Snapshot *workingset.ServerSnapshot `yaml:"snapshot,omitempty" json:"snapshot,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL