security

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2018 License: Apache-2.0 Imports: 10 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 Config

type Config struct {
	TLS       *httputil.TLSConfig `yaml:"tls"`
	BasicAuth *types.AuthConfig   `yaml:"basic"`
}

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