Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GPGStorage ¶
type GPGStorage struct {
Config *config.GPGStorageConfig
}
GPGStorage represents a local storage with GPG encription.
func NewGPGStorage ¶
func NewGPGStorage(c *config.GPGStorageConfig) (*GPGStorage, error)
NewGPGStorage returns a GPGStorage with specified configuration.
func (*GPGStorage) ReadSecret ¶
func (s *GPGStorage) ReadSecret(p string) ([]byte, error)
ReadSecret decrypts a encrypted file with the specified path by using gpg command.
func (*GPGStorage) WriteSecret ¶
func (s *GPGStorage) WriteSecret(p string, data []byte) error
WriteSecret encrypts a secret to the specified path by using gpg command.
type VaultStorage ¶
type VaultStorage struct { Config *config.VaultStorageConfig Client *vault.Client }
VaultStorage represents a remote storage corresponding to Vault.
func NewVaultStorage ¶
func NewVaultStorage(c *config.VaultStorageConfig) (*VaultStorage, error)
NewVaultStorage returns a VaultStorage with specified configuration.
func (*VaultStorage) ReadSecret ¶
func (s *VaultStorage) ReadSecret(p string) ([]byte, error)
ReadSecret reads a secret from Vault with specified path.
func (*VaultStorage) WriteSecret ¶
func (s *VaultStorage) WriteSecret(p string, data []byte) error
WriteSecret writes a secret to Vault with specified path.
Click to show internal directories.
Click to hide internal directories.