Documentation
¶
Overview ¶
Package secrets provides the api client for the secrets facade.
Index ¶
- Variables
- type Client
- func (c *Client) CreateSecret(ctx context.Context, name, description string, data map[string]string) (string, error)
- func (c *Client) GrantSecret(ctx context.Context, uri *secrets.URI, name string, apps []string) ([]error, error)
- func (api *Client) ListSecrets(ctx context.Context, reveal bool, filter secrets.Filter) ([]SecretDetails, error)
- func (c *Client) RemoveSecret(ctx context.Context, uri *secrets.URI, name string, revision *int) error
- func (c *Client) RevokeSecret(ctx context.Context, uri *secrets.URI, name string, apps []string) ([]error, error)
- func (c *Client) UpdateSecret(ctx context.Context, uri *secrets.URI, name string, autoPrune *bool, ...) error
- type Option
- type SecretDetails
Constants ¶
This section is empty.
Variables ¶
View Source
var WithTracer = base.WithTracer
WithTracer returns an Option that configures the Client to use the supplied tracer.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { base.ClientFacade // contains filtered or unexported fields }
Client is the api client for the Secrets facade.
func NewClient ¶
func NewClient(caller base.APICallCloser, options ...Option) *Client
NewClient creates a secrets api client.
func (*Client) CreateSecret ¶
func (*Client) GrantSecret ¶
func (c *Client) GrantSecret(ctx context.Context, uri *secrets.URI, name string, apps []string) ([]error, error)
GrantSecret grants access to a secret to the specified applications.
func (*Client) ListSecrets ¶
func (api *Client) ListSecrets(ctx context.Context, reveal bool, filter secrets.Filter) ([]SecretDetails, error)
ListSecrets lists the available secrets.
func (*Client) RemoveSecret ¶
type SecretDetails ¶
type SecretDetails struct { Metadata secrets.SecretMetadata Access []secrets.AccessInfo Revisions []secrets.SecretRevisionMetadata Value secrets.SecretValue Error string }
SecretDetails holds a secret metadata and value.
Click to show internal directories.
Click to hide internal directories.