configutil

package
v0.12.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrKeyNotFound indicates that the signing key is not found.
	ErrKeyNotFound = errors.New("signing key not found")
)

Functions

func IsRegistryInsecure

func IsRegistryInsecure(target string) bool

IsRegistryInsecure checks whether the registry is in the list of insecure registries.

func LoadConfigOnce

func LoadConfigOnce() (*config.Config, error)

LoadConfigOnce returns the previously read config file. If previous config file does not exist, it reads the config from file or return a default config if not found. The returned config is only suitable for read only scenarios for short-lived processes.

func LoadSigningkeysOnce

func LoadSigningkeysOnce() (*config.SigningKeys, error)

LoadSigningKeysOnce returns the previously read config file. If previous config file does not exist, it reads the config from file or return a default config if not found. The returned config is only suitable for read only scenarios for short-lived processes.

func ResolveKey

func ResolveKey(name string) (config.KeySuite, error)

ResolveKey resolves the key by name. The default key is attempted if name is empty.

Types

type DockerConfigFile

type DockerConfigFile struct {
	CredentialsStore  string            `json:"credsStore,omitempty"`
	CredentialHelpers map[string]string `json:"credHelpers,omitempty"`
}

DockerConfigFile is the minimized configuration of the Docker daemon, only credentails store related configs are included

func LoadDockerConfig

func LoadDockerConfig() (*DockerConfigFile, error)

Load reads the configuration files in the given directory, and sets up the auth config information and returns values.

Jump to

Keyboard shortcuts

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