security

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicAuthTransport

func BasicAuthTransport(addr, repo string, tr http.RoundTripper, authConfig types.AuthConfig) (http.RoundTripper, error)

BasicAuthTransport creates a transport that does basic authentication.

Types

type BasicAuthConfig added in v0.1.9

type BasicAuthConfig struct {
	types.AuthConfig `yaml:",inline"`
	PasswordFile     string `yaml:"password_file" json:"password_file"`
}

BasicAuthConfig is a simple wrapper of Docker's types.AuthConfig with addtional support for a password file.

func (*BasicAuthConfig) Get added in v0.1.9

func (c *BasicAuthConfig) Get() (types.AuthConfig, error)

Get returns an AuthConfig.

type Config

type Config struct {
	TLS                    *httputil.TLSConfig `yaml:"tls" json:"tls"`
	BasicAuth              *BasicAuthConfig    `yaml:"basic" json:"basic"`
	RemoteCredentialsStore string              `yaml:"credsStore" json:"credsStore"`
}

Config contains tls and basic auth configuration.

func (Config) ApplyDefaults

func (c Config) ApplyDefaults() Config

ApplyDefaults applies default configuration.

func (Config) GetHTTPOption

func (c Config) GetHTTPOption(addr, repo string) (httputil.SendOption, error)

GetHTTPOption returns httputil.Option based on the security configuration.

Jump to

Keyboard shortcuts

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