Documentation
¶
Index ¶
- func BasicAuth(c *Credentials) string
- func BasicAuthJSON(c *Credentials) string
- type Auther
- type Credentials
- func (c *Credentials) Auth() string
- func (c *Credentials) Empty() bool
- func (c *Credentials) Password() string
- func (c *Credentials) Refresh() error
- func (c *Credentials) SetAuther(a Auther)
- func (c *Credentials) SetRefresher(r Refresher)
- func (c *Credentials) SetToken(t *Token)
- func (c *Credentials) Token() *Token
- func (c *Credentials) Username() string
- type GCPTokenResponse
- type Refresher
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasicAuth ¶
func BasicAuth(c *Credentials) string
func BasicAuthJSON ¶
func BasicAuthJSON(c *Credentials) string
Types ¶
type Auther ¶
type Auther func(*Credentials) string
type Credentials ¶
type Credentials struct {
// contains filtered or unexported fields
}
func NewCredentialsFromAuth ¶
func NewCredentialsFromAuth(auth string) (*Credentials, error)
func NewCredentialsFromBasic ¶
func NewCredentialsFromBasic(username, password string) (*Credentials, error)
func NewCredentialsFromToken ¶
func NewCredentialsFromToken(token string) (*Credentials, error)
func (*Credentials) Auth ¶
func (c *Credentials) Auth() string
func (*Credentials) Empty ¶
func (c *Credentials) Empty() bool
Returns true if the credentials are nil or if both the username and password are empty.
func (*Credentials) Password ¶
func (c *Credentials) Password() string
func (*Credentials) Refresh ¶
func (c *Credentials) Refresh() error
func (*Credentials) SetAuther ¶
func (c *Credentials) SetAuther(a Auther)
func (*Credentials) SetRefresher ¶
func (c *Credentials) SetRefresher(r Refresher)
func (*Credentials) SetToken ¶
func (c *Credentials) SetToken(t *Token)
func (*Credentials) Token ¶
func (c *Credentials) Token() *Token
func (*Credentials) Username ¶
func (c *Credentials) Username() string
type GCPTokenResponse ¶
type Refresher ¶
type Refresher interface {
Refresh(creds *Credentials) error
}
func NewECRAuthRefresher ¶
func NewGCRAuthRefresher ¶
func NewGCRAuthRefresher() Refresher
Click to show internal directories.
Click to hide internal directories.