auth

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2013 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CONFIGFILE = ".dockercfg"

Where we store the config file

View Source
const INDEXSERVER = "https://index.docker.io/v1/"

Only used for user auth + account creation

Variables

View Source
var (
	ErrConfigFileMissing = errors.New("The Auth config file is missing")
)

Functions

func IndexServerAddress added in v0.3.3

func IndexServerAddress() string

func Login

func Login(authConfig *AuthConfig, factory *utils.HTTPRequestFactory) (string, error)

try to register/login to the registry server

func SaveConfig added in v0.3.4

func SaveConfig(configFile *ConfigFile) error

save the auth config

Types

type AuthConfig

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

type ConfigFile added in v0.5.1

type ConfigFile struct {
	Configs map[string]AuthConfig `json:"configs,omitempty"`
	// contains filtered or unexported fields
}

func LoadConfig

func LoadConfig(rootPath string) (*ConfigFile, error)

load up the auth config information and return values FIXME: use the internal golang config parser

func (*ConfigFile) ResolveAuthConfig added in v0.6.2

func (config *ConfigFile) ResolveAuthConfig(registry string) AuthConfig

this method matches a auth configuration to a server address or a url

Jump to

Keyboard shortcuts

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