Documentation
¶
Index ¶
- func Authenticate(ctx context.Context, cfg *v2.BarbicanConfig, username, password string) (string, error)
- func LoadToken() (string, error)
- func ParseLabels(labels []string) (map[string]string, error)
- func StoreToken(token string) error
- type Client
- func (c *Client) DeleteSecret(ctx context.Context, name string) error
- func (c *Client) DescribeSecret(ctx context.Context, name string) (*secrets.Secret, error)
- func (c *Client) GetSecret(ctx context.Context, name string) ([]byte, error)
- func (c *Client) ListSecrets(ctx context.Context, labels map[string]string) ([]secrets.Secret, error)
- func (c *Client) Login(ctx context.Context, username, password string) (string, error)
- func (c *Client) PutSecret(ctx context.Context, name string, payload []byte, labels map[string]string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authenticate ¶
func Authenticate(ctx context.Context, cfg *v2.BarbicanConfig, username, password string) (string, error)
Authenticate handles the authentication against Keystone and returns a token.
func ParseLabels ¶
ParseLabels validates and parses a list of label strings in "key=value" format.
func StoreToken ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper around the Barbican client from gophercloud.
func (*Client) DeleteSecret ¶
DeleteSecret deletes a secret from Barbican.
func (*Client) DescribeSecret ¶
DescribeSecret describes a secret in Barbican.
func (*Client) ListSecrets ¶
func (c *Client) ListSecrets(ctx context.Context, labels map[string]string) ([]secrets.Secret, error)
ListSecrets lists secrets in Barbican.
Click to show internal directories.
Click to hide internal directories.