Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.44.3 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdOutput = func(cmd *exec.Cmd) ([]byte, error) {
	return cmd.Output()
}

CmdOutput is used for testing purposes to allow mocking the output of the command execution.

Functions

func FilePath

func FilePath(name string) (string, error)

func ParseConfig

func ParseConfig(configYaml []byte) (map[string]map[string]any, error)

func ReadCatalog

func ReadCatalog() ([]byte, error)

func ReadCatalogFile

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

func ReadConfig

func ReadConfig(ctx context.Context, docker docker.Client) ([]byte, error)

func ReadConfigFile

func ReadConfigFile(ctx context.Context, docker docker.Client, name string) ([]byte, error)

func ReadRegistry

func ReadRegistry(ctx context.Context, docker docker.Client) ([]byte, error)

func ReadTools

func ReadTools(ctx context.Context, docker docker.Client) ([]byte, error)

func RemoveCatalogFile

func RemoveCatalogFile(name string) error

func SessionFilePath added in v0.25.0

func SessionFilePath(sessionName, name string) (string, error)

SessionFilePath returns the file path within a session directory

func WriteCatalog

func WriteCatalog(content []byte) error

func WriteCatalogFile

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

func WriteConfig

func WriteConfig(content []byte) error

func WriteConfigFileToSession added in v0.25.0

func WriteConfigFileToSession(sessionName, name string, content []byte) error

WriteConfigFileToSession writes a config file to a session directory

func WriteRegistry

func WriteRegistry(content []byte) error

func WriteTools

func WriteTools(content []byte) error

Types

type ExitCodeErr

type ExitCodeErr interface {
	ExitCode() int
}

type Registry

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

func ParseRegistryConfig

func ParseRegistryConfig(registryYaml []byte) (Registry, error)

func (*Registry) ServerNames

func (r *Registry) ServerNames() []string

type Tile

type Tile struct {
	Ref    string         `yaml:"ref"`
	Config map[string]any `yaml:"config,omitempty"`
}

type ToolsConfig

type ToolsConfig struct {
	ServerTools map[string][]string `yaml:",inline"`
}

func ParseToolsConfig

func ParseToolsConfig(toolsYaml []byte) (ToolsConfig, error)

Jump to

Keyboard shortcuts

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