wkg

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DefaultRegistry          string                     `yaml:"default_registry,omitempty"`
	NamespaceRegistries      map[string]string          `yaml:"namespace_registries,omitempty"`
	PackageRegistryOverrides map[string]string          `yaml:"package_registry_overrides,omitempty"`
	Registry                 map[string]*RegistryConfig `yaml:"registry,omitempty"`
}

Config represents wkg configuration

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager manages wkg configuration

func NewManager

func NewManager() *Manager

NewManager creates a new wkg config manager

func NewManagerWithPath

func NewManagerWithPath(path string) *Manager

NewManagerWithPath creates a new wkg config manager with custom path

func (*Manager) ClearECRAuth

func (m *Manager) ClearECRAuth() error

ClearECRAuth removes all ECR registries from the config

func (*Manager) ConfigureECRAuth

func (m *Manager) ConfigureECRAuth(registryURI, authToken string) error

ConfigureECRAuth adds ECR authentication to the wkg config

func (*Manager) Load

func (m *Manager) Load() (*Config, error)

Load reads the wkg configuration from disk

func (*Manager) RemoveRegistry

func (m *Manager) RemoveRegistry(registry string) error

RemoveRegistry removes a registry from the configuration

func (*Manager) Save

func (m *Manager) Save(config *Config) error

Save writes the wkg configuration to disk

type OCIAuth

type OCIAuth struct {
	Username string `yaml:"username,omitempty"`
	Password string `yaml:"password,omitempty"`
}

OCIAuth represents OCI authentication configuration

type OCIConfig

type OCIConfig struct {
	Protocol string   `yaml:"protocol,omitempty"`
	Auth     *OCIAuth `yaml:"auth,omitempty"`
}

OCIConfig represents OCI-specific registry configuration

type RegistryConfig

type RegistryConfig struct {
	Default string                 `yaml:"default,omitempty"`
	OCI     *OCIConfig             `yaml:"oci,omitempty"`
	Backend map[string]interface{} `yaml:",inline"`
}

RegistryConfig represents configuration for a specific registry

Jump to

Keyboard shortcuts

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