storage

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltDB

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

func (*BoltDB) Close

func (bb *BoltDB) Close() error

func (*BoltDB) Delete

func (bb *BoltDB) Delete(bucket, key []byte) error

func (*BoltDB) Get

func (bb *BoltDB) Get(bucket, key []byte) ([]byte, error)

func (*BoltDB) Iter added in v1.1.6

func (bb *BoltDB) Iter(bucket []byte, fn func(key []byte, value []byte) error) error

func (*BoltDB) Put

func (bb *BoltDB) Put(bucket, key, value []byte) error

type Storage

type Storage interface {
	Put(bucket, key, value []byte) error
	Get(bucket, key []byte) ([]byte, error)
	Delete(bucket, key []byte) error
	Close() error
	Iter(bucket []byte, fn func(key, value []byte) error) error
}

func NewBoltDB

func NewBoltDB(filepath string) Storage

Jump to

Keyboard shortcuts

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