catalog

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DockerCatalogName = "docker-mcp"
	DockerCatalogURL  = "https://desktop.docker.com/mcp/catalog/v2/catalog.yaml"
)

Variables

This section is empty.

Functions

func Add added in v0.11.0

func Add(args ParsedAddArgs, force bool) error

func Create added in v0.11.0

func Create(name string) error

func DownloadFile

func DownloadFile(ctx context.Context, url string) ([]byte, error)

func Fork added in v0.11.0

func Fork(src, dst string) error

func Import added in v0.11.0

func Import(ctx context.Context, nameOrURL string) error

func Init added in v0.11.0

func Init(ctx context.Context) error

func Ls added in v0.11.0

func Ls(ctx context.Context, outputJSON bool) error

func ReadCatalogFile

func ReadCatalogFile(name string) ([]byte, error)

func Reset added in v0.11.0

func Reset(context.Context) error

func Rm added in v0.11.0

func Rm(name string) error

func Show added in v0.11.0

func Show(ctx context.Context, name string, format Format) error

func SupportedFormats added in v0.11.0

func SupportedFormats() string

func Update added in v0.11.0

func Update(ctx context.Context, args []string) error

func ValidateArgs added in v0.11.0

func ValidateArgs(args ParsedAddArgs) error

func WriteCatalogFile

func WriteCatalogFile(name string, content []byte) error

func WriteConfig

func WriteConfig(cfg *Config) error

Types

type Catalog

type Catalog struct {
	DisplayName string `json:"displayName"`
	URL         string `json:"url,omitempty"`
	LastUpdate  string `json:"lastUpdate,omitempty"`
}

type Config

type Config struct {
	Catalogs map[string]Catalog `json:"catalogs"`
}

func ReadConfig

func ReadConfig() (*Config, error)

func ReadConfigWithDefaultCatalog

func ReadConfigWithDefaultCatalog(ctx context.Context) (*Config, error)

type Format

type Format string
const (
	JSON Format = "json"
	YAML Format = "yaml"
)

func (*Format) Set

func (e *Format) Set(v string) error

func (*Format) String

func (e *Format) String() string

func (*Format) Type

func (e *Format) Type() string

Type is only used in help text

type MetaData

type MetaData struct {
	Name        string `yaml:"name,omitempty"`
	DisplayName string `yaml:"displayName,omitempty"`
}

type ParsedAddArgs

type ParsedAddArgs struct {
	Src       string
	Dst       string
	SeverName string
}

func ParseAddArgs added in v0.11.0

func ParseAddArgs(dst, src, catalogFile string) *ParsedAddArgs

type Registry

type Registry struct {
	Registry map[string]Tile `yaml:"registry"`
}

type Tile

type Tile struct {
	Description string `yaml:"description"`
	ReadmeURL   string `yaml:"readme"`
	ToolsURL    string `yaml:"toolsUrl"`
}

Jump to

Keyboard shortcuts

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