database

package
v0.0.0-...-de6af4b Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Badger

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

func (Badger) Close

func (d Badger) Close() error

func (Badger) Delete

func (d Badger) Delete(key string) error

func (Badger) DeleteAll

func (d Badger) DeleteAll() error

func (Badger) Get

func (d Badger) Get(key string) ([]byte, error)

func (Badger) GetAllKeys

func (d Badger) GetAllKeys() ([]string, error)

func (Badger) Set

func (d Badger) Set(key string, value []byte) error

type Database

type Database interface {
	Set(key string, value []byte) error
	Delete(key string) error
	DeleteAll() error
	Get(key string) ([]byte, error)
	GetAllKeys() ([]string, error)
	Close() error
}

func Open

func Open(path string) (Database, error)

Jump to

Keyboard shortcuts

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