Documentation
¶
Overview ¶
Package vault provides a set of functions to interact with the vault.
Copyright © 2023 zcubbs https://github.com/zcubbs
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SecretVault ¶ added in v1.3.0
type SecretVault struct {
// contains filtered or unexported fields
}
SecretVault struct will hold our secrets in memory
func InitializeVaultWithRandomKey ¶ added in v1.3.0
func InitializeVaultWithRandomKey(filename string) (*SecretVault, error)
func NewSecretVault ¶ added in v1.3.0
func NewSecretVault() (*SecretVault, error)
NewSecretVault reads data from the file and decrypts it if exists
func (*SecretVault) AddSecret ¶ added in v1.3.0
func (s *SecretVault) AddSecret(key, value string) error
AddSecret is a function to add a secret to our SecretVault
func (*SecretVault) GetSecret ¶ added in v1.3.0
func (s *SecretVault) GetSecret(key string) (string, error)
GetSecret is a function to get a secret from our SecretVault
func (*SecretVault) Save ¶ added in v1.3.0
func (s *SecretVault) Save() error
Click to show internal directories.
Click to hide internal directories.