Documentation ¶
Index ¶
- type Token
- type TokenResult
- func Create(c *gcorecloud.ServiceClient, opts gcorecloud.AuthOptionsBuilder) (r TokenResult)
- func RefreshGCloud(c *gcorecloud.ServiceClient, opts gcorecloud.TokenOptionsBuilder) (r TokenResult)
- func RefreshPlatform(c *gcorecloud.ServiceClient, opts gcorecloud.TokenOptionsBuilder) (r TokenResult)
- func SelectAccount(c *gcorecloud.ServiceClient, clientID string) (r TokenResult)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenResult ¶
type TokenResult struct {
// contains filtered or unexported fields
}
TokenResult is the response from a Create request. Use ExtractToken() to interpret it as a Token
func Create ¶
func Create(c *gcorecloud.ServiceClient, opts gcorecloud.AuthOptionsBuilder) (r TokenResult)
Create authenticates and either generates a new token
func RefreshGCloud ¶
func RefreshGCloud(c *gcorecloud.ServiceClient, opts gcorecloud.TokenOptionsBuilder) (r TokenResult)
RefreshPlatform token with gcloud API
func RefreshPlatform ¶
func RefreshPlatform(c *gcorecloud.ServiceClient, opts gcorecloud.TokenOptionsBuilder) (r TokenResult)
RefreshPlatform token with GCore platform API
func SelectAccount ¶ added in v0.4.4
func SelectAccount(c *gcorecloud.ServiceClient, clientID string) (r TokenResult)
SelectAccount select an account which you want to get access to
func (TokenResult) ExtractAccessToken ¶
func (r TokenResult) ExtractAccessToken() (string, error)
func (TokenResult) ExtractInto ¶
func (r TokenResult) ExtractInto(v interface{}) error
func (TokenResult) ExtractRefreshToken ¶
func (r TokenResult) ExtractRefreshToken() (string, error)
func (TokenResult) ExtractTokens ¶
ExtractToken interprets a commonResult as a Token.
func (TokenResult) ExtractTokensPair ¶
func (r TokenResult) ExtractTokensPair() (string, string, error)
Click to show internal directories.
Click to hide internal directories.