badger

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 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 struct {
	*badger.DB
}

func Open

func Open(dir string) (*DB, error)

func (*DB) Delete

func (db *DB) Delete(keys ...string) error

func (*DB) Get

func (db *DB) Get(keys ...string) ([]string, error)

func (*DB) List

func (db *DB) List(prefix string, limit, offset int) ([]ListResult, int, error)

func (*DB) Set

func (db *DB) Set(key, value string, opts *EntryOptions) error

type EntryOptions

type EntryOptions struct {
	TTL time.Duration
}

type ListResult

type ListResult struct {
	Key     string
	Size    int64
	Version uint64
	Meta    byte
}

func (ListResult) String

func (l ListResult) String() string

type Logger

type Logger struct{}

func NewLogger

func NewLogger() *Logger

func (*Logger) Debugf

func (l *Logger) Debugf(msg string, args ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(msg string, args ...interface{})

func (*Logger) Infof

func (l *Logger) Infof(msg string, args ...interface{})

func (*Logger) Warningf

func (l *Logger) Warningf(msg string, args ...interface{})

Jump to

Keyboard shortcuts

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