Help us shape the future of Go! Take the 2026 Go Developer Survey

encdb

package
v1.21.5 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: BSD-3-Clause Imports: 12 Imported by: 2

Documentation

Index

Constants

View Source
const CodecVersion = uint16(0)

CodecVersion is the wire version of the encryptedValue envelope. On-disk schema; bump on any incompatible layout change.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

Database encrypts all values that are provided

func New

func New(password []byte, db database.Database) (*Database, error)

New returns a new encrypted database

func (*Database) Backup added in v1.5.1

func (db *Database) Backup(w io.Writer, since uint64) (uint64, error)

func (*Database) Close

func (db *Database) Close() error

func (*Database) Compact

func (db *Database) Compact(start, limit []byte) error

func (*Database) Delete

func (db *Database) Delete(key []byte) error

func (*Database) Get

func (db *Database) Get(key []byte) ([]byte, error)

func (*Database) Has

func (db *Database) Has(key []byte) (bool, error)

func (*Database) HealthCheck

func (db *Database) HealthCheck(ctx context.Context) (interface{}, error)

func (*Database) Load added in v1.5.1

func (db *Database) Load(r io.Reader) error

func (*Database) NewBatch

func (db *Database) NewBatch() database.Batch

func (*Database) NewIterator

func (db *Database) NewIterator() database.Iterator

func (*Database) NewIteratorWithPrefix

func (db *Database) NewIteratorWithPrefix(prefix []byte) database.Iterator

func (*Database) NewIteratorWithStart

func (db *Database) NewIteratorWithStart(start []byte) database.Iterator

func (*Database) NewIteratorWithStartAndPrefix

func (db *Database) NewIteratorWithStartAndPrefix(start, prefix []byte) database.Iterator

func (*Database) Put

func (db *Database) Put(key, value []byte) error

func (*Database) Sync added in v1.2.17

func (db *Database) Sync() error

Jump to

Keyboard shortcuts

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