Documentation ¶
Index ¶
- type AuraCredential
- type AuraCredentials
- func (c *AuraCredentials) Add(name string, clientId string, clientSecret string) error
- func (c *AuraCredentials) ClearAccessToken(cred *AuraCredential) (*AuraCredential, error)
- func (c *AuraCredentials) Get(name string) (*AuraCredential, error)
- func (c *AuraCredentials) GetDefault() (*AuraCredential, error)
- func (c *AuraCredentials) List() []*AuraCredential
- func (config *AuraCredentials) Print(writer io.Writer) error
- func (c *AuraCredentials) Remove(name string) error
- func (c *AuraCredentials) SetDefault(name string) error
- func (c *AuraCredentials) UpdateAccessToken(cred *AuraCredential, accessToken string, expiresInSeconds int64) *AuraCredential
- type Credentials
- type CredentialsFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuraCredential ¶
type AuraCredential struct { Name string `json:"name"` ClientId string `json:"client-id"` ClientSecret string `json:"client-secret"` AccessToken string `json:"access-token"` TokenExpiry int64 `json:"token-expiry"` }
func (*AuraCredential) HasValidAccessToken ¶
func (credential *AuraCredential) HasValidAccessToken() bool
type AuraCredentials ¶
type AuraCredentials struct { DefaultCredential string `json:"default-credential"` Credentials []*AuraCredential `json:"credentials"` // contains filtered or unexported fields }
func (*AuraCredentials) Add ¶
func (c *AuraCredentials) Add(name string, clientId string, clientSecret string) error
func (*AuraCredentials) ClearAccessToken ¶
func (c *AuraCredentials) ClearAccessToken(cred *AuraCredential) (*AuraCredential, error)
func (*AuraCredentials) Get ¶
func (c *AuraCredentials) Get(name string) (*AuraCredential, error)
func (*AuraCredentials) GetDefault ¶
func (c *AuraCredentials) GetDefault() (*AuraCredential, error)
func (*AuraCredentials) List ¶
func (c *AuraCredentials) List() []*AuraCredential
func (*AuraCredentials) Remove ¶
func (c *AuraCredentials) Remove(name string) error
func (*AuraCredentials) SetDefault ¶
func (c *AuraCredentials) SetDefault(name string) error
func (*AuraCredentials) UpdateAccessToken ¶
func (c *AuraCredentials) UpdateAccessToken(cred *AuraCredential, accessToken string, expiresInSeconds int64) *AuraCredential
type Credentials ¶
type Credentials struct { Aura *AuraCredentials // contains filtered or unexported fields }
func NewCredentials ¶
func NewCredentials(fs afero.Fs, configPrefix string) *Credentials
type CredentialsFile ¶
type CredentialsFile struct {
Aura *AuraCredentials `json:"aura"`
}
Click to show internal directories.
Click to hide internal directories.