config

package
v0.15.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveAuthPerHost added in v0.12.0

func ResolveAuthPerHost(authPerHost map[string]Headerer) map[string]http.Header

ResolveAuthPerHost takes a map of strings to Headerer and resolves the Headerers to http.Headers

Types

type BasicCredentials

type BasicCredentials struct {
	User     string
	Password string
}

type Config

type Config struct {
	AuthPerHost                  map[string]Headerer
	DockerCredentialsPerRegistry map[string]BasicCredentials
	Paths                        ConfigurablePaths
}

Config is a single place where configuration for rkt frontend needs resides.

func GetConfig

func GetConfig() (*Config, error)

GetConfig gets the Config instance with configuration taken from default system path (see common.DefaultSystemConfigDir) overridden with configuration from default local path (see common.DefaultLocalConfigDir).

func GetConfigFrom

func GetConfigFrom(system, local string) (*Config, error)

GetConfigFrom gets the Config instance with configuration taken from given system path overridden with configuration from given local path.

func GetConfigFromDir

func GetConfigFromDir(dir string) (*Config, error)

GetConfigFromDir gets the Config instance with configuration taken from given directory.

type ConfigurablePaths added in v0.14.0

type ConfigurablePaths struct {
	DataDir string
}

type Headerer

type Headerer interface {
	Header() http.Header
}

Headerer is an interface for getting additional HTTP headers to use when downloading data (images, signatures).

Jump to

Keyboard shortcuts

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