credential

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Credential

func Credential(username, password string) auth.Credential

Credential converts user input username and password to a credential.

Types

type Store

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

Store provides credential CRUD operations.

func NewStore

func NewStore(configPaths ...string) (*Store, error)

NewStore generates a store based on the passed in config file path.

func (*Store) Credential

func (s *Store) Credential(ctx context.Context, registry string) (auth.Credential, error)

Credential iterates all the config files, returns the first non-empty credential in a best-effort way.

func (*Store) Erase

func (s *Store) Erase(registry string) error

Erase erases a credential for a given registry.

func (*Store) Store

func (s *Store) Store(registry string, cred auth.Credential) error

Store stores a credential for a given registry.

Jump to

Keyboard shortcuts

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