vault

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const Index = "index"

Variables

View Source
var ErrAlreadyExists = errors.Conflict.With("already exists")
View Source
var ErrNotRegistered = errors.NotFound.With("not a registered vault")

Functions

This section is empty.

Types

type KeyStore added in v0.6.0

type KeyStore interface {
	// GetKey retrieves the encryption key for the given vault.
	GetKey(*Vault) (*memguard.Enclave, error)
}

type Vault

type Vault struct {
	// contains filtered or unexported fields
}

func (*Vault) Close

func (v *Vault) Close() error

func (*Vault) Create added in v0.6.0

func (v *Vault) Create(keys KeyStore) (*model.Model, error)

Create creates the underlying database and returns an unencrypted model.

func (*Vault) Info

func (v *Vault) Info() *api.VaultInfo

func (*Vault) Open added in v0.6.0

func (v *Vault) Open(keys KeyStore) (*model.Model, error)

func (*Vault) OpenRaw added in v0.6.0

func (v *Vault) OpenRaw(keys KeyStore) (*model.Model, error)

func (*Vault) Status added in v0.6.0

func (v *Vault) Status(keys KeyStore) (*api.VaultStatus, error)

func (*Vault) With added in v0.6.0

func (v *Vault) With(keys KeyStore, fn func(*model.Model) error) error

type Wallet

type Wallet struct {
	UseMemDB  bool
	Directory string
	// contains filtered or unexported fields
}

func (*Wallet) Each

func (w *Wallet) Each(fn func(*Vault) error) error

func (*Wallet) Index

func (w *Wallet) Index() *Vault

func (*Wallet) Vault added in v0.6.0

func (w *Wallet) Vault(name string) *Vault

Jump to

Keyboard shortcuts

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