config

package
v0.0.0-...-913c819 Latest Latest
Warning

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

Go to latest
Published: May 9, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultFilename is the default path for the docker config
	DefaultFilename    = fmt.Sprintf("%s/.docker/config.json", os.Getenv("HOME"))
	DefaultOldFilename = fmt.Sprintf("%s/.dockercfg", os.Getenv("HOME"))
)

Functions

This section is empty.

Types

type EncryptedRegistry

type EncryptedRegistry struct {
	Auth string `json:"auth"`
}

EncryptedRegistry blat

type EncryptedSettings

type EncryptedSettings struct {
	Auths map[string]EncryptedRegistry `json:"auths"`
}

EncryptedSettings blat

type Registry

type Registry struct {
	Username string
	Password string
}

Registry represents a single registry

type Settings

type Settings struct {
	Path  string
	Auths map[string]Registry
}

Settings the settings

func Load

func Load(filename string) (*Settings, error)

New the yaml settings from given path

func New

func New(filename string) *Settings

func (*Settings) AddRegistry

func (s *Settings) AddRegistry(name string, registry Registry)

AddRegistry adds a new registry to the settings

func (*Settings) Encrypt

func (s *Settings) Encrypt() *EncryptedSettings

Encrypt encrypts a given settings file

func (*Settings) RemoveRegistry

func (s *Settings) RemoveRegistry(name string)

RemoveRegistry adds a new registry to the settings

func (*Settings) Save

func (s *Settings) Save() error

Save settings

Jump to

Keyboard shortcuts

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