Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainCredentialGetter ¶
type ChainCredentialGetter []CredentialGetter
func (ChainCredentialGetter) CredentialForHost ¶
func (c ChainCredentialGetter) CredentialForHost(host string) (*Credentials, error)
type CredentialGetter ¶
type CredentialGetter interface {
CredentialForHost(string) (*Credentials, error)
}
CredentialGetter defines to implement to get credentials
func MustNewKeyring ¶
func MustNewKeyring(cfg keyring.Config) CredentialGetter
func NewKeyring ¶
func NewKeyring(cfg keyring.Config) (CredentialGetter, error)
type Credentials ¶
type Credentials struct { Username string `json:"username" yaml:"username"` Password string `json:"password" yaml:"password"` }
Credentials defines the authentication credentials values
type EnvToken ¶
EnvToken resolves github authentication using the GITHUB_TOKEN environment variable if present
func (*EnvToken) CredentialForHost ¶
func (e *EnvToken) CredentialForHost(host string) (*Credentials, error)
type GitAuth ¶
type GitAuth struct {
Credentials CredentialGetter
}
type GitCredentials ¶
type GitCredentials struct {
GitPath string
}
func (*GitCredentials) CredentialForHost ¶
func (c *GitCredentials) CredentialForHost(host string) (*Credentials, error)
type Keyring ¶
type Keyring struct {
// contains filtered or unexported fields
}
func (Keyring) CredentialForHost ¶
func (k Keyring) CredentialForHost(h string) (*Credentials, error)
type Netrc ¶
type Netrc struct {
Path string
}
Netrc implements the CredentialGetter interface, getting the credentials from a netrc formatted file. When path is empty, the default ~/.netrc path is used
func (*Netrc) CredentialForHost ¶
func (n *Netrc) CredentialForHost(host string) (*Credentials, error)
CredentialForHost retrieves the credentials for a given host in the netrc file
Source Files ¶
Click to show internal directories.
Click to hide internal directories.