Documentation ¶
Index ¶
- func Log(format string, args ...interface{})
- func Quiet(format string, args ...interface{})
- type BasicTransport
- type ErrorTransport
- type LogfCallback
- type Opt
- type Registry
- func (r *Registry) GetJSON(ctx context.Context, url string, response interface{}) (http.Header, error)
- func (r *Registry) GetURL(pathTemplate string, args ...interface{}) string
- func (r *Registry) Headers(ctx context.Context, uri string) (map[string]string, error)
- func (r *Registry) Token(ctx context.Context, url string) (string, error)
- type TokenTransport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BasicTransport ¶
type BasicTransport struct { Transport http.RoundTripper URL string Username string Password string }
BasicTransport defines the data structure for authentication via basic auth.
type ErrorTransport ¶
type ErrorTransport struct {
Transport http.RoundTripper
}
ErrorTransport defines the data structure for returning errors from the round tripper.
type LogfCallback ¶
type LogfCallback func(format string, args ...interface{})
LogfCallback is the callback for formatting logs.
type Registry ¶
type Registry struct { URL string Domain string Username string Password string Client *http.Client Logf LogfCallback Opt Opt }
Registry defines the client for retrieving information from the registry API.
func (*Registry) GetJSON ¶
func (r *Registry) GetJSON(ctx context.Context, url string, response interface{}) (http.Header, error)
GetJSON returns api
func (*Registry) GetURL ¶ added in v0.1.2
GetURL returns a registry URL with the passed arguements concatenated.
type TokenTransport ¶
type TokenTransport struct { Transport http.RoundTripper Username string Password string }
TokenTransport defines the data structure for authentication via tokens.
Click to show internal directories.
Click to hide internal directories.