Documentation ¶
Overview ¶
Package auth is a set of functions for retrieving authentication tokens and authenticated hosts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultHost ¶
DefaultHost retrieves an authenticated host and the source of host. The source can be either an environment variable or from the configuration file. Returns "github.com", "default" if no viable host is found.
func KnownHosts ¶
func KnownHosts() []string
KnownHosts retrieves a list of hosts that have corresponding authentication tokens, either from environment variables or from the configuration file. Returns an empty string slice if no hosts are found.
func TokenForHost ¶
TokenForHost retrieves an authentication token and the source of that token for the specified host. The source can be either an environment variable or from the configuration file. Returns "", "default" if no applicable token is found.
Types ¶
This section is empty.