vault

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptySecret             = errors.New("secret should not be empty")
	ErrUnsupportedVaultVersion = errors.New("vault version is not supported")
	LatestVersion              = 1
)

Functions

func Save

func Save(writer io.Writer, vault Vault) error

Types

type Vault

type Vault interface {
	encoding.BinaryMarshaler
	encoding.BinaryUnmarshaler

	Version() uint8
	List() []string
	Set(key, value string)
	Get(key string) (string, bool)
	Delete(key string)
}

func New

func New(password string) (Vault, error)

func Open

func Open(reader io.Reader, password string) (Vault, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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