Documentation
¶
Index ¶
- Constants
- func Create(ctx context.Context, dao db.DAO, registryClient registryapi.Client, ...) error
- func InspectServer(ctx context.Context, dao db.DAO, catalogRef string, serverName string, ...) error
- func List(ctx context.Context, dao db.DAO, format workingset.OutputFormat) error
- func ListServers(ctx context.Context, dao db.DAO, catalogRef string, filters []string, ...) error
- func Pull(ctx context.Context, dao db.DAO, ociService oci.Service, refStr string) error
- func Push(ctx context.Context, dao db.DAO, refStr string) error
- func Remove(ctx context.Context, dao db.DAO, refStr string) error
- func Show(ctx context.Context, dao db.DAO, ociService oci.Service, refStr string, ...) error
- func SupportedPullOptions() []string
- func Tag(ctx context.Context, dao db.DAO, refStr string, tag string) error
- type Catalog
- type CatalogArtifact
- type CatalogSummary
- type CatalogWithDigest
- type InspectResult
- type PullOption
- type PullOptionConfig
- type PullOptionEvaluator
- type Server
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 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 SupportedPullOptions ¶ added in v0.29.0
func SupportedPullOptions() []string
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
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 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 PullOption ¶ added in v0.29.0
type PullOption string
type PullOptionConfig ¶ added in v0.37.0
type PullOptionConfig struct {
PullOption PullOption
Interval time.Duration
}
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"`
}
Click to show internal directories.
Click to hide internal directories.