db

package
v0.0.0-...-2ff4fa5 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2022 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 DB

type DB interface {
	ListBuckets() []string
	ListKeys(bucket string) []string
	Get(bucket, key string) string
	PrefixScan(bucket, prefix string, offset, limit int) []string
	PrefixSearchScan(bucket, regex string, offset, limit int) []string
}

type NutsDB

type NutsDB struct {
	DbDir string
}

func (NutsDB) CreateDebugDb

func (nuts NutsDB) CreateDebugDb()

CreateDebugDb just creates some non-empty database for debug purposes

func (NutsDB) Get

func (nuts NutsDB) Get(bucket, key string) string

func (NutsDB) ListBuckets

func (nuts NutsDB) ListBuckets() []string

ListBuckets returns all buckets in given database

func (NutsDB) ListKeys

func (nuts NutsDB) ListKeys(bucket string) []string

ListKeys returns all keys in given bucket

func (NutsDB) PrefixScan

func (nuts NutsDB) PrefixScan(bucket, prefix string, offset, limit int) []string

func (NutsDB) PrefixSearchScan

func (nuts NutsDB) PrefixSearchScan(bucket, regex string, offset, limit int) []string

Jump to

Keyboard shortcuts

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