secretsmanager

package
v0.0.0-...-b0bff92 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is the api client for the SecretsManager facade.

func NewClient

func NewClient(caller base.APICaller) *Client

NewClient creates a secrets api client.

func (*Client) Create

func (c *Client) Create(cfg *secrets.SecretConfig, secretType secrets.SecretType, value secrets.SecretValue) (string, error)

Create creates a new secret.

func (*Client) GetValue

func (c *Client) GetValue(urlOrId string) (secrets.SecretValue, error)

GetValue returns the value of a secret.

func (*Client) Grant

func (c *Client) Grant(url string, args *SecretRevokeGrantArgs) error

Grant grants access to the specified secret.

func (*Client) Revoke

func (c *Client) Revoke(url string, args *SecretRevokeGrantArgs) error

Revoke revokes access to the specified secret.

func (*Client) SecretRotated

func (c *Client) SecretRotated(url string, when time.Time) error

SecretRotated records when a secret was last rotated.

func (*Client) Update

func (c *Client) Update(url string, cfg *secrets.SecretConfig, value secrets.SecretValue) (string, error)

Update updates an existing secret value and/or config like rotate interval.

func (*Client) WatchSecretsRotationChanges

func (c *Client) WatchSecretsRotationChanges(ownerTag string) (watcher.SecretRotationWatcher, error)

WatchSecretsRotationChanges returns a watcher which serves changes to secrets rotation config for any secrets managed by the specified owner.

type SecretRevokeGrantArgs

type SecretRevokeGrantArgs struct {
	ApplicationName *string
	UnitName        *string
	RelationId      *int
	Role            secrets.SecretRole
}

SecretRevokeGrantArgs holds the args used to grant or revoke access to a secret. To grant access, specify one of ApplicationName or UnitName, plus optionally RelationId. To revoke access, specify one of ApplicationName or UnitName.

Jump to

Keyboard shortcuts

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