Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHeaders ¶
func IsAuthenticated ¶ added in v1.4.0
func IsAuthenticated(authInfo *ResolvedAuth) bool
Types ¶
type AuthSource ¶
type AuthSource string
const ( ConfigAuthSource AuthSource = "config" KeyringAuthSource AuthSource = "keyring" PlainTextAuthSource AuthSource = "plaintext" )
type KeyringStorage ¶ added in v1.4.0
type KeyringStorage struct{}
KeyringStorage implements Storage using the system keyring
func NewKeyringStorage ¶ added in v1.4.0
func NewKeyringStorage() *KeyringStorage
func (*KeyringStorage) Delete ¶ added in v1.4.0
func (k *KeyringStorage) Delete() error
func (*KeyringStorage) Get ¶ added in v1.4.0
func (k *KeyringStorage) Get() (*Auth, error)
func (*KeyringStorage) Source ¶ added in v1.4.0
func (k *KeyringStorage) Source() AuthSource
func (*KeyringStorage) Store ¶ added in v1.4.0
func (k *KeyringStorage) Store(auth *Auth) error
type PlainTextStorage ¶ added in v1.4.0
type PlainTextStorage struct{}
PlainTextStorage implements Storage using a plain text file
func NewPlainTextStorage ¶ added in v1.4.0
func NewPlainTextStorage() *PlainTextStorage
func (*PlainTextStorage) Delete ¶ added in v1.4.0
func (p *PlainTextStorage) Delete() error
func (*PlainTextStorage) Get ¶ added in v1.4.0
func (p *PlainTextStorage) Get() (*Auth, error)
func (*PlainTextStorage) Source ¶ added in v1.4.0
func (p *PlainTextStorage) Source() AuthSource
func (*PlainTextStorage) Store ¶ added in v1.4.0
func (p *PlainTextStorage) Store(auth *Auth) error
type ResolvedAuth ¶
type ResolvedAuth struct {
Auth
Source AuthSource `json:"source"`
}
func ResolveAuth ¶
func ResolveAuth() (*ResolvedAuth, error)
Click to show internal directories.
Click to hide internal directories.