Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthOpts ¶
type AuthOpts struct { // User is an Swauth-based username in username:tenant format. User string `h:"X-Auth-User" required:"true"` // Key is a secret/password to authenticate the User with. Key string `h:"X-Auth-Key" required:"true"` }
AuthOpts specifies an authentication request.
type AuthOptsBuilder ¶
AuthOptsBuilder describes struct types that can be accepted by the Auth call.
type AuthResult ¶
type AuthResult struct { Token string `json:"X-Auth-Token"` StorageURL string `json:"X-Storage-Url"` CDNURL string `json:"X-CDN-Management-Url"` }
AuthResult contains the authentication information from a Swauth authentication request.
type GetAuthResult ¶
type GetAuthResult struct {
golangsdk.HeaderResult
}
GetAuthResult contains the response from the Auth request. Call its Extract method to interpret it as an AuthResult.
func Auth ¶
func Auth(c *golangsdk.ProviderClient, opts AuthOptsBuilder) (r GetAuthResult)
Auth performs an authentication request for a Swauth-based user.
func (GetAuthResult) Extract ¶
func (r GetAuthResult) Extract() (*AuthResult, error)
Extract is a method that attempts to interpret any Swauth authentication response as a AuthResult struct.
Click to show internal directories.
Click to hide internal directories.