Documentation ¶
Index ¶
- Constants
- type Encryptor
- type EtcdRepository
- func (r *EtcdRepository) CloneSecrets(ctx context.Context, env, newEnv string) error
- func (r *EtcdRepository) DeleteSecrets(ctx context.Context, env string) error
- func (r *EtcdRepository) GetBaseKey(env string) string
- func (r *EtcdRepository) GetSecret(ctx context.Context, env, fullKey string) (interface{}, error)
- func (r *EtcdRepository) GetSecretKey(env, key string) string
- func (r *EtcdRepository) UpsertSecrets(ctx context.Context, env string, secrets map[string]interface{}) error
- type RedisRepository
- func (r *RedisRepository) CloneSecrets(ctx context.Context, cloneEnv, newEnv string) error
- func (r *RedisRepository) DeleteSecrets(ctx context.Context, env string) error
- func (r *RedisRepository) GetCloneSecretsDeletePatternKey(clonedEnv string) string
- func (r *RedisRepository) GetCloneSecretsPatternKey(cloneEnv string) string
- func (r *RedisRepository) GetSecret(ctx context.Context, env, fullKey string) (interface{}, error)
- func (r *RedisRepository) GetSecretKey(env, key string) string
- func (r *RedisRepository) UpsertSecrets(ctx context.Context, env string, secrets map[string]interface{}) error
- type Repository
- type RepositoryConfig
- type SecretNotFoundError
Constants ¶
View Source
const (
SecretPrefix = "configleam:secret"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtcdRepository ¶
func NewEtcdRepository ¶
func NewEtcdRepository(etcd *etcd.Etcd, encryptor Encryptor) *EtcdRepository
func (*EtcdRepository) CloneSecrets ¶
func (r *EtcdRepository) CloneSecrets(ctx context.Context, env, newEnv string) error
func (*EtcdRepository) DeleteSecrets ¶
func (r *EtcdRepository) DeleteSecrets(ctx context.Context, env string) error
DeleteSecrets deletes all secrets keys for a specific environment.
func (*EtcdRepository) GetBaseKey ¶
func (r *EtcdRepository) GetBaseKey(env string) string
func (*EtcdRepository) GetSecret ¶
func (r *EtcdRepository) GetSecret(ctx context.Context, env, fullKey string) (interface{}, error)
func (*EtcdRepository) GetSecretKey ¶
func (r *EtcdRepository) GetSecretKey(env, key string) string
func (*EtcdRepository) UpsertSecrets ¶
type RedisRepository ¶
func NewRedisRepository ¶
func NewRedisRepository(redis *rds.Redis, encryptor Encryptor) *RedisRepository
func (*RedisRepository) CloneSecrets ¶
func (r *RedisRepository) CloneSecrets(ctx context.Context, cloneEnv, newEnv string) error
func (*RedisRepository) DeleteSecrets ¶
func (r *RedisRepository) DeleteSecrets(ctx context.Context, env string) error
func (*RedisRepository) GetCloneSecretsDeletePatternKey ¶
func (r *RedisRepository) GetCloneSecretsDeletePatternKey(clonedEnv string) string
func (*RedisRepository) GetCloneSecretsPatternKey ¶
func (r *RedisRepository) GetCloneSecretsPatternKey(cloneEnv string) string
func (*RedisRepository) GetSecret ¶
func (r *RedisRepository) GetSecret(ctx context.Context, env, fullKey string) (interface{}, error)
func (*RedisRepository) GetSecretKey ¶
func (r *RedisRepository) GetSecretKey(env, key string) string
func (*RedisRepository) UpsertSecrets ¶
type Repository ¶
type Repository interface { GetSecret(ctx context.Context, env string, key string) (interface{}, error) UpsertSecrets(ctx context.Context, env string, secrets map[string]interface{}) error CloneSecrets(ctx context.Context, cloneEnv, newEnv string) error }
func New ¶
func New(ctx context.Context, cfg RepositoryConfig, encryptor Encryptor) (Repository, error)
type RepositoryConfig ¶
type SecretNotFoundError ¶
type SecretNotFoundError struct {
Key string
}
func (SecretNotFoundError) Error ¶
func (e SecretNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.