barbican

package
v0.0.0-...-095df39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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 LoadToken

func LoadToken() (string, error)

func ParseLabels

func ParseLabels(labels []string) (map[string]string, error)

ParseLabels validates and parses a list of label strings in "key=value" format.

func StoreToken

func StoreToken(token string) error

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a wrapper around the Barbican client from gophercloud.

func NewClient

func NewClient(cfg *v2.BarbicanConfig) (*Client, error)

NewClient creates a new Barbican client.

func (*Client) DeleteSecret

func (c *Client) DeleteSecret(ctx context.Context, name string) error

DeleteSecret deletes a secret from Barbican.

func (*Client) DescribeSecret

func (c *Client) DescribeSecret(ctx context.Context, name string) (*secrets.Secret, error)

DescribeSecret describes a secret in Barbican.

func (*Client) GetSecret

func (c *Client) GetSecret(ctx context.Context, name string) ([]byte, error)

GetSecret retrieves a secret from Barbican.

func (*Client) ListSecrets

func (c *Client) ListSecrets(ctx context.Context, labels map[string]string) ([]secrets.Secret, error)

ListSecrets lists secrets in Barbican.

func (*Client) Login

func (c *Client) Login(ctx context.Context, username, password string) (string, error)

Login authenticates with Keystone and returns a token.

func (*Client) PutSecret

func (c *Client) PutSecret(ctx context.Context, name string, payload []byte, labels map[string]string, secretType, payloadContentEncoding string) error

PutSecret creates or updates a secret in Barbican.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL