auth

package
v1.0.0-rc.2.dev.20230226 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCredentialsConfigNotSet = errors.New("credentials store config was not set up")

ErrorCodeCredentialsConfigNotSet indicates the credentials store config was not set up

Functions

func LoadConfig

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

LoadConfig loads the configuration from the config file

Types

type CredentialStore

type CredentialStore interface {
	// Store saves credentials into the store
	Store(serverAddress string, credsConf auth.Credential) error
	// Erase removes credentials from the store for the given server
	Erase(serverAddress string) error
	// Get retrieves credentials from the store for the given server
	Get(serverAddress string) (auth.Credential, error)
}

CredentialStore is the interface that any credentials store must implement.

func GetCredentialsStore

func GetCredentialsStore(ctx context.Context, registryHostname string) (CredentialStore, error)

GetCredentialsStore returns a new credentials store from the settings in the configuration file

Jump to

Keyboard shortcuts

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