db

package
v0.0.0-...-09c5177 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KVStore

type KVStore interface {
	io.Closer

	CreateBucket(bucketName string) error
	DeleteBucket(bucketName string) error
	BucketExists(bucketName string) bool
	Put(bucketName string, key string, value []byte) error
	List(bucketName string) ([]KeyValue, error)
	Get(bucketName string, key string) ([]byte, error)
	Delete(bucketName string, key string) error
}

func NewDB

func NewDB(filename string) (KVStore, error)

type KeyValue

type KeyValue struct {
	Key   []byte
	Value []byte
}

Jump to

Keyboard shortcuts

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