Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Location is the location of the saved vault file. Location string // Key is the key to use to unlock the vault file. It must be 32 bit. // If it isn't, it will be padded if it's larger, it will be cropped. Key string }
Config has the configuration options for the file vault.
type Dependencies ¶
Dependencies defines the dependencies for the plugin provider.
type FileStorer ¶
type FileStorer struct { Config Dependencies // contains filtered or unexported fields }
FileStorer is a vault backed by an encrypted file.
func NewFileStorer ¶
func NewFileStorer(cfg Config, deps Dependencies) *FileStorer
NewFileStorer creates a vault which contains secrets. The format is: KEY=VALUE KEY2=VALUE2
func (*FileStorer) Read ¶
func (v *FileStorer) Read() ([]byte, error)
Read defines a read for the FileVaultStorer. It decrypts the file to get to the content.
func (*FileStorer) Write ¶
func (v *FileStorer) Write(data []byte) error
Write will store the passed in data. How, is up to the implementor. Syncing is up the caller. Otherwise data will be overwritten. The file vault storer will encrypt the file upon writing.
Click to show internal directories.
Click to hide internal directories.