Documentation
¶
Index ¶
- Constants
- func AddServers(ctx context.Context, dao db.DAO, registryClient registryapi.Client, ...) error
- 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 ListServers(ctx context.Context, dao db.DAO, filters []string, 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 RemoveServers(ctx context.Context, dao db.DAO, id string, serverNames []string) error
- func ResolveImageRef(ctx context.Context, ociService oci.Service, value string) (string, error)
- func ResolveRegistry(ctx context.Context, registryClient registryapi.Client, value string) (string, error)
- func Show(ctx context.Context, dao db.DAO, id string, format OutputFormat, ...) error
- func SupportedFormats() []string
- func UpdateConfig(ctx context.Context, dao db.DAO, ociService oci.Service, id string, ...) error
- func UpdateTools(ctx context.Context, dao db.DAO, id string, ...) error
- type OutputFormat
- type SearchResult
- type Secret
- type SecretProvider
- type Server
- type ServerSnapshot
- type ServerType
- type WithOptions
- type WorkingSet
Constants ¶
View Source
const CurrentWorkingSetVersion = 1
View Source
const MCPWorkingSetArtifactType = "application/vnd.docker.mcp.profile.v1+json"
Variables ¶
This section is empty.
Functions ¶
func AddServers ¶ added in v0.28.0
func ListServers ¶ added in v0.29.0
func RemoveServers ¶ added in v0.28.0
func ResolveImageRef ¶ added in v0.28.0
func ResolveRegistry ¶ added in v0.28.0
func SupportedFormats ¶
func SupportedFormats() []string
func UpdateConfig ¶ added in v0.28.0
Types ¶
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 remote"`
Config map[string]any `yaml:"config,omitempty" json:"config,omitempty"`
Secrets string `yaml:"secrets,omitempty" json:"secrets,omitempty"`
Tools []string `yaml:"tools" json:"tools"`
// 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"`
// Optional snapshot of the server schema
Snapshot *ServerSnapshot `yaml:"snapshot,omitempty" json:"snapshot,omitempty"`
}
Server represents a server configuration in a working set
func ResolveCatalogServers ¶ added in v0.29.0
type ServerSnapshot ¶ added in v0.26.0
func ResolveImageSnapshot ¶ added in v0.28.0
func ResolveSnapshot ¶ added in v0.26.0
type ServerType ¶
type ServerType string
const ( ServerTypeRegistry ServerType = "registry" ServerTypeImage ServerType = "image" ServerTypeRemote ServerType = "remote" )
type WithOptions ¶ added in v0.29.0
type WithOptions struct {
WorkingSet `yaml:",inline"`
Clients map[string]any `json:"clients" yaml:"clients"`
}
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) EnsureSnapshotsResolved ¶ added in v0.28.0
func (*WorkingSet) FindServer ¶ added in v0.28.0
func (workingSet *WorkingSet) FindServer(serverName string) *Server
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.