Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EnvironmentStorage ¶
type EnvironmentStorage struct {
// contains filtered or unexported fields
}
EnvironmentStorage stores secrets in environment variables
func InitEnvironmentStorage ¶
func InitEnvironmentStorage(prefix string, uppercase bool) *EnvironmentStorage
InitMemoryStorage creates new environment storage and sets it as package storage
func (*EnvironmentStorage) Get ¶
func (es *EnvironmentStorage) Get(name string) (string, error)
Get reads secret from storage
func (*EnvironmentStorage) Set ¶
func (es *EnvironmentStorage) 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 (*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
Click to show internal directories.
Click to hide internal directories.