Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶ added in v0.2.0
func IsNotInitialized ¶ added in v0.2.0
Types ¶
type EncEnvStorage ¶ added in v0.2.0
type EncEnvStorage struct {
// contains filtered or unexported fields
}
EncryptedEnvironmentStorage stores secrets in environment variables
func InitEncEnvStorage ¶ added in v0.2.0
func InitEncEnvStorage(master, prefix string, uppercase bool) (*EncEnvStorage, error)
InitEncryptedMemoryStorage creates new environment storage and sets it as package storage
func MustInitEncEnvStorage ¶ added in v0.2.0
func MustInitEncEnvStorage(master, prefix string, uppercase bool) *EncEnvStorage
creates MustInitMemoryStorage new environment storage and sets it as package storage
func NewEncEnvStorage ¶ added in v0.2.0
func NewEncEnvStorage(master, prefix string, uppercase bool) (*EncEnvStorage, error)
NewEncryptedEnvironment Storage creates new environment storage
func (*EncEnvStorage) Get ¶ added in v0.2.0
func (ees *EncEnvStorage) Get(name string) (string, error)
Get reads secret from storage
func (*EncEnvStorage) Prepare ¶ added in v0.2.0
func (ees *EncEnvStorage) Prepare(name, secret string) (string, string, error)
Prepare secret value name and encrypted value
func (*EncEnvStorage) Set ¶ added in v0.2.0
func (ees *EncEnvStorage) Set(name, secret string) error
Set the secret value
type EnvStorage ¶ added in v0.2.0
type EnvStorage struct {
// contains filtered or unexported fields
}
EnvStorage stores secrets in environment variables
func InitEnvStorage ¶ added in v0.2.0
func InitEnvStorage(prefix string, uppercase bool) *EnvStorage
InitMemoryStorage creates new environment storage and sets it as package storage
func NewEnvStorage ¶ added in v0.2.0
func NewEnvStorage(prefix string, uppercase bool) *EnvStorage
NewMemoryStorage creates new environment storage
func (*EnvStorage) Get ¶ added in v0.2.0
func (es *EnvStorage) Get(name string) (string, error)
Get reads secret from storage
func (*EnvStorage) Set ¶ added in v0.2.0
func (es *EnvStorage) Set(name, secret string) error
Set sets the secret value in memory storage
type MemoryStorage ¶
type MemoryStorage struct {
// contains filtered or unexported fields
}
MemoryStorage does not persist secrets data
func InitMemoryStorage ¶
func InitMemoryStorage() *MemoryStorage
InitMemoryStorage creates new memory storage and sets it as package storage
func NewMemoryStorage ¶ added in v0.2.0
func NewMemoryStorage() *MemoryStorage
NewMemoryStorage creates new memory storage
func (*MemoryStorage) Get ¶
func (ms *MemoryStorage) Get(name string) (string, error)
Get reads secret from storage
func (*MemoryStorage) Set ¶
func (ms *MemoryStorage) Set(name, secret string)
Set sets the secret value in memory storage
type SecretNotFound ¶
type SecretNotFound struct {
// contains filtered or unexported fields
}
func (*SecretNotFound) Error ¶
func (e *SecretNotFound) Error() string
type StorageIsNotInitialized ¶
type StorageIsNotInitialized struct{}
func (*StorageIsNotInitialized) Error ¶
func (e *StorageIsNotInitialized) Error() string