Documentation ¶
Index ¶
- type Client
- func (c *Client) Create(cfg *secrets.SecretConfig, secretType secrets.SecretType, ...) (string, error)
- func (c *Client) GetValue(urlOrId string) (secrets.SecretValue, error)
- func (c *Client) Grant(url string, args *SecretRevokeGrantArgs) error
- func (c *Client) Revoke(url string, args *SecretRevokeGrantArgs) error
- func (c *Client) SecretRotated(url string, when time.Time) error
- func (c *Client) Update(url string, cfg *secrets.SecretConfig, value secrets.SecretValue) (string, error)
- func (c *Client) WatchSecretsRotationChanges(ownerTag string) (watcher.SecretRotationWatcher, error)
- type SecretRevokeGrantArgs
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 (*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 ¶
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.