Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Credential ¶
func Credential(username, password string) auth.Credential
Credential returns an auth.Credential that Store can use.
func NewClient ¶
func NewClient(opts ClientOptions) remote.Client
NewClient generates a client based on the passed in options.
Types ¶
type ClientOptions ¶
type ClientOptions struct { Credential auth.Credential CredentialStore *Store Debug bool }
ClientOptions type includes a Credential that stores the credentials of the client. CredentialStore will be used if a Credential is not provided. ClientOptions also includes a Debug flag.
type DebugTransport ¶
type DebugTransport struct {
http.RoundTripper
}
DebugTransport is an http.RoundTripper that keeps track of the in-flight request and add hooks to report HTTP tracing events.
func NewDebugTransport ¶
func NewDebugTransport(base http.RoundTripper) *DebugTransport
NewDebugTransport generates a new DebugTransport.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store provides credential CRUD operations.
func (*Store) Credential ¶
Credential iterates all the config files, returns the first non-empty credential in a best-effort way. `EmptyCredential` is a valid return value and should not be considered as an error. If nil, the credential is always resolved to `EmptyCredential`.