Documentation ¶
Index ¶
- func NewHandler(log *zap.Logger, idLookupKey string, svc influxdb.SecretService) http.Handler
- type AuthedSvc
- func (s *AuthedSvc) DeleteSecret(ctx context.Context, orgID platform.ID, keys ...string) error
- func (s *AuthedSvc) GetSecretKeys(ctx context.Context, orgID platform.ID) ([]string, error)
- func (s *AuthedSvc) LoadSecret(ctx context.Context, orgID platform.ID, key string) (string, error)
- func (s *AuthedSvc) PatchSecrets(ctx context.Context, orgID platform.ID, m map[string]string) error
- func (s *AuthedSvc) PutSecret(ctx context.Context, orgID platform.ID, key string, val string) error
- func (s *AuthedSvc) PutSecrets(ctx context.Context, orgID platform.ID, m map[string]string) error
- type Client
- func (s *Client) DeleteSecret(ctx context.Context, orgID platform.ID, ks ...string) error
- func (s *Client) GetSecretKeys(ctx context.Context, orgID platform.ID) ([]string, error)
- func (s *Client) LoadSecret(ctx context.Context, orgID platform.ID, k string) (string, error)
- func (s *Client) PatchSecrets(ctx context.Context, orgID platform.ID, m map[string]string) error
- func (s *Client) PutSecret(ctx context.Context, orgID platform.ID, k string, v string) error
- func (s *Client) PutSecrets(ctx context.Context, orgID platform.ID, m map[string]string) error
- type Logger
- func (l *Logger) DeleteSecret(ctx context.Context, orgID platform.ID, keys ...string) (err error)
- func (l *Logger) GetSecretKeys(ctx context.Context, orgID platform.ID) (strs []string, err error)
- func (l *Logger) LoadSecret(ctx context.Context, orgID platform.ID, key string) (str string, err error)
- func (l *Logger) PatchSecrets(ctx context.Context, orgID platform.ID, m map[string]string) (err error)
- func (l *Logger) PutSecret(ctx context.Context, orgID platform.ID, key string, val string) (err error)
- func (l *Logger) PutSecrets(ctx context.Context, orgID platform.ID, m map[string]string) (err error)
- type SecreteService
- func (ms *SecreteService) DeleteSecret(ctx context.Context, orgID platform.ID, keys ...string) error
- func (ms *SecreteService) GetSecretKeys(ctx context.Context, orgID platform.ID) ([]string, error)
- func (ms *SecreteService) LoadSecret(ctx context.Context, orgID platform.ID, key string) (string, error)
- func (ms *SecreteService) PatchSecrets(ctx context.Context, orgID platform.ID, m map[string]string) error
- func (ms *SecreteService) PutSecret(ctx context.Context, orgID platform.ID, key string, val string) error
- func (ms *SecreteService) PutSecrets(ctx context.Context, orgID platform.ID, m map[string]string) error
- type Service
- func (s *Service) DeleteSecret(ctx context.Context, orgID platform.ID, ks ...string) error
- func (s *Service) GetSecretKeys(ctx context.Context, orgID platform.ID) ([]string, error)
- func (s *Service) LoadSecret(ctx context.Context, orgID platform.ID, k string) (string, error)
- func (s *Service) PatchSecrets(ctx context.Context, orgID platform.ID, m map[string]string) error
- func (s *Service) PutSecret(ctx context.Context, orgID platform.ID, k, v string) error
- func (s *Service) PutSecrets(ctx context.Context, orgID platform.ID, m map[string]string) error
- type Storage
- func (s *Storage) DeleteSecret(ctx context.Context, tx kv.Tx, orgID platform.ID, k string) error
- func (s *Storage) GetSecret(ctx context.Context, tx kv.Tx, orgID platform.ID, k string) (string, error)
- func (s *Storage) ListSecret(ctx context.Context, tx kv.Tx, orgID platform.ID) ([]string, error)
- func (s *Storage) PutSecret(ctx context.Context, tx kv.Tx, orgID platform.ID, k, v string) error
- func (s *Storage) Update(ctx context.Context, fn func(kv.Tx) error) error
- func (s *Storage) View(ctx context.Context, fn func(kv.Tx) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthedSvc ¶
type AuthedSvc struct {
// contains filtered or unexported fields
}
AuthedSvc wraps a influxdb.AuthedSvc and authorizes actions against it appropriately.
func NewAuthedService ¶
func NewAuthedService(s influxdb.SecretService) *AuthedSvc
NewAuthedService constructs an instance of an authorizing secret service.
func (*AuthedSvc) DeleteSecret ¶
DeleteSecret checks to see if the authorizer on context has write access to the secret keys provided.
func (*AuthedSvc) GetSecretKeys ¶
GetSecretKeys checks to see if the authorizer on context has read access to all the secrets belonging to orgID.
func (*AuthedSvc) LoadSecret ¶
LoadSecret checks to see if the authorizer on context has read access to the secret key provided.
func (*AuthedSvc) PatchSecrets ¶
PatchSecrets checks to see if the authorizer on context has write access to the secret keys provided.
type Client ¶
func (*Client) DeleteSecret ¶
DeleteSecret removes a single secret via HTTP.
func (*Client) GetSecretKeys ¶
GetSecretKeys get all secret keys mathing an org ID via HTTP.
func (*Client) LoadSecret ¶
LoadSecret is not implemented for http
func (*Client) PatchSecrets ¶
PatchSecrets will update the existing secret with new via http.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is a logger service middleware for secrets
func (*Logger) DeleteSecret ¶
DeleteSecret removes a single secret from the secret store.
func (*Logger) GetSecretKeys ¶
GetSecretKeys retrieves all secret keys that are stored for the organization orgID.
func (*Logger) LoadSecret ¶
func (l *Logger) LoadSecret(ctx context.Context, orgID platform.ID, key string) (str string, err error)
LoadSecret retrieves the secret value v found at key k for organization orgID.
func (*Logger) PatchSecrets ¶
func (l *Logger) PatchSecrets(ctx context.Context, orgID platform.ID, m map[string]string) (err error)
PatchSecrets patches all provided secrets and updates any previous values.
type SecreteService ¶
type SecreteService struct {
// contains filtered or unexported fields
}
SecreteService is a metrics middleware system for the secret service
func NewMetricService ¶
func NewMetricService(reg prometheus.Registerer, s influxdb.SecretService) *SecreteService
NewMetricService creates a new secret metrics middleware
func (*SecreteService) DeleteSecret ¶
func (ms *SecreteService) DeleteSecret(ctx context.Context, orgID platform.ID, keys ...string) error
DeleteSecret removes a single secret from the secret store.
func (*SecreteService) GetSecretKeys ¶
GetSecretKeys retrieves all secret keys that are stored for the organization orgID.
func (*SecreteService) LoadSecret ¶
func (ms *SecreteService) LoadSecret(ctx context.Context, orgID platform.ID, key string) (string, error)
LoadSecret retrieves the secret value v found at key k for organization orgID.
func (*SecreteService) PatchSecrets ¶
func (ms *SecreteService) PatchSecrets(ctx context.Context, orgID platform.ID, m map[string]string) error
PatchSecrets patches all provided secrets and updates any previous values.
func (*SecreteService) PutSecret ¶
func (ms *SecreteService) PutSecret(ctx context.Context, orgID platform.ID, key string, val string) error
PutSecret stores the secret pair (k,v) for the organization orgID.
func (*SecreteService) PutSecrets ¶
func (ms *SecreteService) PutSecrets(ctx context.Context, orgID platform.ID, m map[string]string) error
PutSecrets puts all provided secrets and overwrites any previous values.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
NewService creates a new service implementation for secrets
func (*Service) DeleteSecret ¶
DeleteSecret removes a single secret from the secret store.
func (*Service) GetSecretKeys ¶
GetSecretKeys retrieves all secret keys that are stored for the organization orgID.
func (*Service) LoadSecret ¶
LoadSecret retrieves the secret value v found at key k for organization orgID.
func (*Service) PatchSecrets ¶
PatchSecrets patches all provided secrets and updates any previous values.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is a store translation layer between the data storage unit and the service layer.
func (*Storage) DeleteSecret ¶
DeleteSecret removes a secret for the db
func (*Storage) GetSecret ¶
func (s *Storage) GetSecret(ctx context.Context, tx kv.Tx, orgID platform.ID, k string) (string, error)
GetSecret Returns the value of a secret
func (*Storage) ListSecret ¶
ListSecrets returns a list of secret keys