config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthTypeUntrusted = AuthType("untrusted")
	AuthTypeTLS       = AuthType("tls")
	AuthTypeOIDC      = AuthType("oidc")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthType

type AuthType string

type Config

type Config struct {
	ConfigDir string             `yaml:"-"`
	CertInfo  *incusTLS.CertInfo `yaml:"-"`

	DefaultRemote string            `yaml:"default_remote"`
	Remotes       map[string]Remote `yaml:"remotes"`
}

func LoadConfig

func LoadConfig(configDir string) (*Config, error)

func NewConfig

func NewConfig(configDir string) *Config

func (*Config) ClientCerts

func (c *Config) ClientCerts() (*incusTLS.CertInfo, error)

func (*Config) ConfigPath

func (c *Config) ConfigPath() string

func (*Config) OIDCTokenPath

func (c *Config) OIDCTokenPath(name string) string

func (*Config) SaveConfig

func (c *Config) SaveConfig() error

type Remote

type Remote struct {
	Addr       string          `yaml:"addr"`
	AuthType   AuthType        `yaml:"auth_type"`
	ServerCert api.Certificate `yaml:"server_cert"`
}

Jump to

Keyboard shortcuts

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