Help us shape the future of Go! Take the 2026 Go Developer Survey

auth

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	Auth          string `json:"auth,omitempty"`
	Username      string `json:"username,omitempty"`
	Password      string `json:"password,omitempty"`
	ServerAddress string `json:"serveraddress,omitempty"`
	ServerScheme  string `json:"serverscheme,omitempty"`
}

type ConfigFile

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

func (*ConfigFile) GetAuthConfig

func (configFile *ConfigFile) GetAuthConfig(host string) *AuthConfig

type PassKeyChain

type PassKeyChain struct {
	Username     string
	Password     string
	ServerScheme string
}

PassKeyChain is user/password based key chain

func FromDockerConfig

func FromDockerConfig(host string) (*PassKeyChain, error)

FromDockerConfig finds auth for a given host in docker's config.json settings.

func GetKeyChainByRef

func GetKeyChainByRef(ref string) (*PassKeyChain, error)

func (*PassKeyChain) ToBase64

func (kc *PassKeyChain) ToBase64() string

Jump to

Keyboard shortcuts

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