Documentation ¶
Index ¶
- type Auth
- type AuthIdentity
- type AuthRequest
- type AuthResponse
- type Client
- func (c *Client) Authenticate(ctx context.Context, config Config) error
- func (c *Client) HttpDelete(ctx context.Context, url string, payload []byte, params url.Values) ([]byte, error)
- func (c *Client) HttpGet(ctx context.Context, url string, params url.Values) ([]byte, error)
- func (c *Client) HttpPost(ctx context.Context, url string, payload []byte, params url.Values) ([]byte, error)
- func (c *Client) HttpPut(ctx context.Context, url string, payload []byte, params url.Values) ([]byte, error)
- type Config
- type Credentials
- type Name
- type Password
- type Project
- type Scope
- type Token
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct { Identity AuthIdentity `json:"identity"` Scope Scope `json:"scope"` }
type AuthIdentity ¶
type AuthRequest ¶
type AuthRequest struct {
Auth Auth `json:"auth"`
}
type AuthResponse ¶
type AuthResponse struct {
Token Token
}
type Client ¶
client is a Barbican REST API client responsible for fetching and renewing authentication tokens.
func (*Client) Authenticate ¶
Authenticate tries to obtain a new authentication token from the given Barbican endpoint via the given credentials.
Authenticate should be called to obtain the first authentication token. This token can then be renewed via RenewApiToken.
func (*Client) HttpDelete ¶
type Config ¶
type Config struct { // Endpoint is the Barbican instance endpoint. Endpoint string // Credentials used to login to OpenStack to retrieve the APIKey Login Credentials }
Config is a structure containing configuration options for connecting to a Barbican server.
type Credentials ¶
Click to show internal directories.
Click to hide internal directories.