config

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrURLRequired        = errors.New("registry url is required")
	ErrURLMissingInConfig = errors.New("registry url missing in config")
)

Functions

func Marshal

func Marshal(cfg *ExternalRegistryConfig) ([]byte, error)

func Path

func Path() (string, error)

func Save

func Save(cfg *ExternalRegistryConfig) error

Types

type Env

type Env struct {
	URL      string
	Username string
	Password string
}

type ExternalRegistryConfig

type ExternalRegistryConfig struct {
	URL      string `yaml:"url"`
	Username string `yaml:"username,omitempty"`
	Password string `yaml:"password,omitempty"`
}

func Load

func Load() (*ExternalRegistryConfig, error)

func Resolve

func Resolve(flagCfg *ExternalRegistryConfig, env Env) (*ExternalRegistryConfig, error)

Resolve returns external registry config using precedence: flags > env > config file.

Jump to

Keyboard shortcuts

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