Documentation ¶
Overview ¶
Package secrets provides the backend implementation for the secrets facade.
Index ¶
- func Register(registry facade.FacadeRegistry)
- type SecretsAPI
- func (s *SecretsAPI) CreateSecrets(args params.CreateSecretArgs) (params.StringResults, error)
- func (s *SecretsAPI) GrantSecret(arg params.GrantRevokeUserSecretArg) (params.ErrorResults, error)
- func (s *SecretsAPI) ListSecrets(arg params.ListSecretsArgs) (params.ListSecretResults, error)
- func (s *SecretsAPI) RemoveSecrets(args params.DeleteSecretArgs) (params.ErrorResults, error)
- func (s *SecretsAPI) RevokeSecret(arg params.GrantRevokeUserSecretArg) (params.ErrorResults, error)
- func (s *SecretsAPI) UpdateSecrets(args params.UpdateUserSecretArgs) (params.ErrorResults, error)
- type SecretsAPIV1
- type SecretsConsumer
- type SecretsState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(registry facade.FacadeRegistry)
Register is called to expose a package of facades onto a given registry.
Types ¶
type SecretsAPI ¶
type SecretsAPI struct {
// contains filtered or unexported fields
}
SecretsAPI is the backend for the Secrets facade.
func (*SecretsAPI) CreateSecrets ¶
func (s *SecretsAPI) CreateSecrets(args params.CreateSecretArgs) (params.StringResults, error)
CreateSecrets creates new secrets.
func (*SecretsAPI) GrantSecret ¶
func (s *SecretsAPI) GrantSecret(arg params.GrantRevokeUserSecretArg) (params.ErrorResults, error)
GrantSecret grants access to a user secret.
func (*SecretsAPI) ListSecrets ¶
func (s *SecretsAPI) ListSecrets(arg params.ListSecretsArgs) (params.ListSecretResults, error)
ListSecrets lists available secrets.
func (*SecretsAPI) RemoveSecrets ¶
func (s *SecretsAPI) RemoveSecrets(args params.DeleteSecretArgs) (params.ErrorResults, error)
RemoveSecrets remove user secret.
func (*SecretsAPI) RevokeSecret ¶
func (s *SecretsAPI) RevokeSecret(arg params.GrantRevokeUserSecretArg) (params.ErrorResults, error)
RevokeSecret revokes access to a user secret.
func (*SecretsAPI) UpdateSecrets ¶
func (s *SecretsAPI) UpdateSecrets(args params.UpdateUserSecretArgs) (params.ErrorResults, error)
UpdateSecrets creates new secrets.
type SecretsAPIV1 ¶
type SecretsAPIV1 struct {
*SecretsAPI
}
SecretsAPIV1 is the backend for the Secrets facade v1.
func (*SecretsAPIV1) CreateSecrets ¶
func (s *SecretsAPIV1) CreateSecrets(_ struct{})
CreateSecrets isn't on the v1 API.
func (*SecretsAPIV1) GrantSecret ¶
func (s *SecretsAPIV1) GrantSecret(_ struct{})
GrantSecret isn't on the v1 API.
func (*SecretsAPIV1) RemoveSecrets ¶
func (s *SecretsAPIV1) RemoveSecrets(_ struct{})
RemoveSecrets isn't on the v1 API.
func (*SecretsAPIV1) RevokeSecret ¶
func (s *SecretsAPIV1) RevokeSecret(_ struct{})
RevokeSecret isn't on the v1 API.
func (*SecretsAPIV1) UpdateSecrets ¶
func (s *SecretsAPIV1) UpdateSecrets(_ struct{})
UpdateSecrets isn't on the v1 API.
type SecretsConsumer ¶
type SecretsConsumer interface { GrantSecretAccess(*secrets.URI, state.SecretAccessParams) error RevokeSecretAccess(*secrets.URI, state.SecretAccessParams) error SecretAccess(uri *secrets.URI, subject names.Tag) (secrets.SecretRole, error) }
SecretsConsumer instances provide secret consumer apis.
type SecretsState ¶
type SecretsState interface { CreateSecret(*secrets.URI, state.CreateSecretParams) (*secrets.SecretMetadata, error) UpdateSecret(*secrets.URI, state.UpdateSecretParams) (*secrets.SecretMetadata, error) GetSecret(uri *secrets.URI) (*secrets.SecretMetadata, error) GetSecretValue(*secrets.URI, int) (secrets.SecretValue, *secrets.ValueRef, error) GetSecretRevision(uri *secrets.URI, revision int) (*secrets.SecretRevisionMetadata, error) DeleteSecret(*secrets.URI, ...int) ([]secrets.ValueRef, error) ListSecrets(state.SecretsFilter) ([]*secrets.SecretMetadata, error) ListSecretRevisions(uri *secrets.URI) ([]*secrets.SecretRevisionMetadata, error) ListUnusedSecretRevisions(uri *secrets.URI) ([]int, error) SecretGrants(uri *secrets.URI, role secrets.SecretRole) ([]secrets.AccessInfo, error) }
SecretsState instances provide secret apis.