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 ¶
type SecretVault struct {
// contains filtered or unexported fields
}
SecretVault struct will hold our secrets in memory
func InitializeVaultWithRandomKey ¶
func InitializeVaultWithRandomKey(filename string) (*SecretVault, error)
func NewSecretVault ¶
func NewSecretVault() (*SecretVault, error)
NewSecretVault reads data from the file and decrypts it if exists
func (*SecretVault) AddSecret ¶
func (s *SecretVault) AddSecret(key, value string) error
AddSecret is a function to add a secret to our SecretVault
func (*SecretVault) GetSecret ¶
func (s *SecretVault) GetSecret(key string) (string, error)
GetSecret is a function to get a secret from our SecretVault
func (*SecretVault) Save ¶
func (s *SecretVault) Save() error
Click to show internal directories.
Click to hide internal directories.