boltsecurestore

package
v0.0.0-...-5fb183d Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RootKeyLen is the length of a root key.
	RootKeyLen = 32
)

Variables

View Source
var (
	// ErrStoreLocked specifies that the store must be unlocked to perform the
	// requested operation.
	ErrStoreLocked = fmt.Errorf("store is locked")

	// ErrPasswordRequired specifies that a password is required to create/unlock
	// the store.
	ErrPasswordRequired = fmt.Errorf("password must not be null")
	// ErrInvalidPassword is returned when trying to unlock the store with an
	// incorrect password.
	ErrInvalidPassword = fmt.Errorf("password is not valid")

	// ErrRootKeyBucketNotFound specifies that there is no root bucket which
	// can/should happen only if the store has been corrupted or was initialized
	// incorrectly.
	ErrRootKeyBucketNotFound = fmt.Errorf("root key bucket not found")
	// ErrEncKeyNotFound specifies that there was no encryption key found
	// even if one was expected to be generated.
	ErrEncKeyNotFound = fmt.Errorf("store encryption key not found")

	// ErrBucketNotFound specifies that there is no such bucket to
	// read/add data from/to.
	ErrBucketNotFound = walletdb.ErrBucketNotFound
	// ErrMissingBucketKey specifies that a bucket key is required to perform
	// the requested operation.
	ErrMissingBucketKey = fmt.Errorf("missing bucket key")
	// ErrForbiddenBucketKey is used when the bucket key uses encryptionKeyID as
	// its value.
	ErrForbiddenBucketKey = fmt.Errorf("bucket key is not allowed")

	// ErrDataNotFound specifies that no data has been found for a given key.
	ErrDataNotFound = fmt.Errorf("data not found")
	// ErrMissingDataKey specifies that a data key is required to perform the
	// requested operation.
	ErrMissingDataKey = fmt.Errorf("missing data key")
	// ErrForbiddenDataKey is used when the data key used encryptionKeyID as its
	// value.
	ErrForbiddenDataKey = fmt.Errorf("data key is not allowed")
	// ErrMissingData specifies that the data value is required to perform a
	// write operation.
	ErrMissingData = fmt.Errorf("missing data to add")
)
View Source
var (
	// RootKeyBucketName is the name of the root key store bucket.
	RootKeyBucketName = []byte("root")
)

Functions

func NewSecureStorage

func NewSecureStorage(datadir, filename string) (securestore.SecureStorage, error)

NewSecureStorage creates a bolt instance of the SecureStorage interface.

Types

This section is empty.

Jump to

Keyboard shortcuts

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