credential

package
v0.0.0-...-7ef7dd6 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(serverAddress string) error

Delete deletes a registry credential from a credential store.

func Exist

func Exist(serverAddress string) bool

Exist determines whether a specified credential is exist in a credential store.

func Get

func Get(serverAddress string) (types.AuthConfig, error)

Get gets a registry credential from a credential store.

func Save

func Save(authConfig *types.AuthConfig) error

Save saves a registry credential into a credential store.

Types

type ConfigFile

type ConfigFile struct {
	AuthConfigs map[string]types.AuthConfig `json:"auths"`
}

ConfigFile defines configs that file needs keep.

type Store

type Store interface {
	// Save saves a credential into a Store.
	Save(authConfig *types.AuthConfig) error

	// Get gets a credential from a Store.
	Get(serverAddress string) (types.AuthConfig, error)

	// Delete deletes a credential in Store.
	Delete(serverAddress string) error

	// Exist determines whether a specified credential is exist in Store.
	Exist(serverAddress string) bool
}

Store implements storage type of registry credentials.

Jump to

Keyboard shortcuts

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