Documentation
¶
Index ¶
- Constants
- func Create(ctx context.Context, dao db.DAO, registryClient registryapi.Client, ...) error
- func Export(ctx context.Context, dao db.DAO, id string, filename string) error
- func Import(ctx context.Context, dao db.DAO, ociService oci.Service, filename string) error
- func List(ctx context.Context, dao db.DAO, format OutputFormat) error
- func Pull(ctx context.Context, dao db.DAO, ociService oci.Service, ref string) error
- func Push(ctx context.Context, dao db.DAO, id string, refStr string) error
- func Remove(ctx context.Context, dao db.DAO, id string) error
- func Servers(ctx context.Context, dao db.DAO, query string, workingSetID string, ...) error
- func Show(ctx context.Context, dao db.DAO, id string, format OutputFormat) error
- func SupportedFormats() []string
- type Catalog
- type CatalogServer
- type OutputFormat
- type SearchResult
- type Secret
- type SecretProvider
- type Server
- type ServerSnapshot
- type ServerType
- type WorkingSet
Constants ¶
View Source
const CurrentWorkingSetVersion = 1
View Source
const MCPCatalogArtifactType = "application/vnd.docker.mcp.catalog.v1+json"
Variables ¶
This section is empty.
Functions ¶
func SupportedFormats ¶
func SupportedFormats() []string
Types ¶
type Catalog ¶
type Catalog struct {
Name string `json:"name"`
Servers []CatalogServer `json:"servers"`
}
func NewCatalogFromWorkingSet ¶
func NewCatalogFromWorkingSet(workingSet WorkingSet) Catalog
func (Catalog) ToWorkingSet ¶
func (catalog Catalog) ToWorkingSet() WorkingSet
type CatalogServer ¶
type CatalogServer struct {
Type string `yaml:"type" json:"type"`
Config map[string]any `yaml:"config,omitempty" json:"config,omitempty"`
Tools []string `yaml:"tools,omitempty" json:"tools,omitempty"`
// If type is "registry"
Source string `yaml:"source,omitempty" json:"source,omitempty"`
// If type is "image"
Image string `yaml:"image,omitempty" json:"image,omitempty"`
}
type OutputFormat ¶
type OutputFormat string
const ( OutputFormatJSON OutputFormat = "json" OutputFormatYAML OutputFormat = "yaml" OutputFormatHumanReadable OutputFormat = "human" )
type SearchResult ¶ added in v0.26.0
type Secret ¶
type Secret struct {
Provider SecretProvider `yaml:"provider" json:"provider" validate:"required,oneof=docker-desktop-store"`
}
Secret represents a secret configuration in a working set
type SecretProvider ¶
type SecretProvider string
const (
SecretProviderDockerDesktop SecretProvider = "docker-desktop-store"
)
type Server ¶
type Server struct {
Type ServerType `yaml:"type" json:"type" validate:"required,oneof=registry image"`
Config map[string]any `yaml:"config,omitempty" json:"config,omitempty"`
Secrets string `yaml:"secrets,omitempty" json:"secrets,omitempty"`
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"`
// Optional snapshot of the server schema
Snapshot *ServerSnapshot `yaml:"snapshot,omitempty" json:"snapshot,omitempty"`
}
Server represents a server configuration in a working set
type ServerSnapshot ¶ added in v0.26.0
func ResolveSnapshot ¶ added in v0.26.0
type ServerType ¶
type ServerType string
const ( ServerTypeRegistry ServerType = "registry" ServerTypeImage ServerType = "image" )
type WorkingSet ¶
type WorkingSet struct {
Version int `yaml:"version" json:"version" validate:"required,min=1,max=1"`
ID string `yaml:"id" json:"id" validate:"required"`
Name string `yaml:"name" json:"name" validate:"required,min=1"`
Servers []Server `yaml:"servers" json:"servers" validate:"dive"`
Secrets map[string]Secret `yaml:"secrets,omitempty" json:"secrets,omitempty" validate:"dive"`
}
WorkingSet represents a collection of MCP servers and their configurations
func NewFromDb ¶
func NewFromDb(dbSet *db.WorkingSet) WorkingSet
func (WorkingSet) ToDb ¶
func (workingSet WorkingSet) ToDb() db.WorkingSet
func (*WorkingSet) Validate ¶
func (workingSet *WorkingSet) Validate() error
Click to show internal directories.
Click to hide internal directories.