storage

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2017 License: MIT Imports: 9 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL