config

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: MIT Imports: 12 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 RemoveCatalogFile

func RemoveCatalogFile(name string) error

func WriteCatalog

func WriteCatalog(content []byte) error

func WriteCatalogFile

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

func WriteConfig

func WriteConfig(content []byte) error

func WriteRegistry

func WriteRegistry(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"`
}

Jump to

Keyboard shortcuts

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