Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrSecretNotFound = errors.New("Secret is not found")
)
Functions ¶
func ReadPassword ¶ added in v0.4.0
ReadPassword reads password without echo
Types ¶
type EncEnvStorage ¶ added in v0.2.0
type EncEnvStorage struct {
// contains filtered or unexported fields
}
EncryptedEnvironmentStorage stores secrets in environment variables
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 EncMapStorage ¶ added in v0.4.0
type EncMapStorage struct {
// contains filtered or unexported fields
}
EncMapStorage stores secrets in encrypted JSON with a plan string map structure
func NewEncMapStorage ¶ added in v0.4.0
func NewEncMapStorage(master, dump string) (*EncMapStorage, error)
NewEncryptedEnvironment Storage creates new environment storage
func (*EncMapStorage) Dump ¶ added in v0.4.0
func (s *EncMapStorage) Dump() (string, error)
func (*EncMapStorage) Get ¶ added in v0.4.0
func (s *EncMapStorage) Get(name string) (string, error)
Get reads secret from storage
func (*EncMapStorage) Set ¶ added in v0.4.0
func (s *EncMapStorage) Set(name, secret string)
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 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 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