Documentation
¶
Index ¶
- func NewClient(configPaths ...string) (auth.Client, error)
- type Client
- func (c *Client) Credential(hostname string) (string, string, error)
- func (c *Client) Login(ctx context.Context, hostname, username, secret string, insecure bool) error
- func (c *Client) Logout(_ context.Context, hostname string) error
- func (c *Client) Resolver(_ context.Context, client *http.Client, plainHTTP bool) (remotes.Resolver, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(configPaths ...string) (auth.Client, error)
NewClient creates a new auth client based on provided config paths. If not config path is provided, the default path is used. Credentials are read from the first config and fall backs to next. All changes will only be written to the first config file.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides authentication operations for docker registries.
func (*Client) Credential ¶
func (c *Client) Credential(hostname string) (string, string, error)
Credential returns the login credential of the request host.
func (*Client) Login ¶
func (c *Client) Login(ctx context.Context, hostname, username, secret string, insecure bool) error
Login logs in to a docker registry identified by the hostname.
Click to show internal directories.
Click to hide internal directories.