credentials

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrCredentialsNotFound

func IsErrCredentialsNotFound(err error) bool

func NewHelper

func NewHelper(c *config.CLIConfig, helper string) (credentials.Store, error)

Types

type Credential

type Credential struct {
	ServerAddress string
	Username      string
	Password      string
	LocalStorage  bool
}

type HelperStore

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

func (*HelperStore) Erase

func (h *HelperStore) Erase(serverAddress string) error

func (*HelperStore) Get

func (h *HelperStore) Get(serverAddress string) (types.AuthConfig, error)

func (*HelperStore) GetAll

func (h *HelperStore) GetAll() (map[string]types.AuthConfig, error)

func (*HelperStore) Store

func (h *HelperStore) Store(authConfig types.AuthConfig) error

type Store

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

func NewLocalOnlyStore added in v0.6.0

func NewLocalOnlyStore(cfg *config.CLIConfig) (*Store, error)

func NewStore

func NewStore(cfg *config.CLIConfig, c client.Client) (*Store, error)

func (*Store) Add

func (s *Store) Add(ctx context.Context, cred Credential, skipChecks bool) error

func (*Store) Get

func (s *Store) Get(ctx context.Context, serverAddress string) (*apiv1.RegistryAuth, bool, error)

func (*Store) List

func (s *Store) List(ctx context.Context) (result []Credential, err error)

func (*Store) Remove

func (s *Store) Remove(ctx context.Context, cred Credential) error

Jump to

Keyboard shortcuts

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