Documentation ¶
Index ¶
- type SecretService
- func (s *SecretService) DeleteSecret(ctx context.Context, orgID platform.ID, ks ...string) error
- func (s *SecretService) GetSecretKeys(ctx context.Context, orgID platform.ID) ([]string, error)
- func (s *SecretService) LoadSecret(ctx context.Context, orgID platform.ID, k string) (string, error)
- func (s *SecretService) PatchSecrets(ctx context.Context, orgID platform.ID, m map[string]string) error
- func (s *SecretService) PutSecret(ctx context.Context, orgID platform.ID, k string, v string) error
- func (s *SecretService) PutSecrets(ctx context.Context, orgID platform.ID, m map[string]string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SecretService ¶
SecretService is service for storing user secrets
func NewSecretService ¶
func NewSecretService() (*SecretService, error)
NewSecretService creates an instance of a SecretService. The service is configured using the standard vault environment variables. https://www.vaultproject.io/docs/commands/index.html#environment-variables
func (*SecretService) DeleteSecret ¶
DeleteSecret removes a single secret from the secret store.
func (*SecretService) GetSecretKeys ¶
GetSecretKeys retrieves all secret keys that are stored for the organization orgID.
func (*SecretService) LoadSecret ¶
func (s *SecretService) LoadSecret(ctx context.Context, orgID platform.ID, k string) (string, error)
LoadSecret retrieves the secret value v found at key k for organization orgID.
func (*SecretService) PatchSecrets ¶
func (s *SecretService) PatchSecrets(ctx context.Context, orgID platform.ID, m map[string]string) error
PatchSecrets patches all provided secrets and updates any previous values.
func (*SecretService) PutSecret ¶
PutSecret stores the secret pair (k,v) for the organization orgID.
func (*SecretService) PutSecrets ¶
func (s *SecretService) PutSecrets(ctx context.Context, orgID platform.ID, m map[string]string) error
PutSecrets puts all provided secrets and overwrites any previous values.