badger

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 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 Option

type Option struct {
	TTL    int // sec
	Path   string
	Prefix string
}

type PineBadger

type PineBadger struct {
	*Option
	*badgerDB.DB
}

func New

func New(revOpt Option) *PineBadger

func (*PineBadger) Delete

func (c *PineBadger) Delete(key string) error

func (*PineBadger) Exists

func (c *PineBadger) Exists(key string) bool

func (*PineBadger) Get

func (c *PineBadger) Get(key string) (val []byte, err error)

func (*PineBadger) GetBadgerDB

func (c *PineBadger) GetBadgerDB() *badgerDB.DB

func (*PineBadger) GetWithUnmarshal

func (c *PineBadger) GetWithUnmarshal(key string, receiver interface{}) error

func (*PineBadger) Set

func (c *PineBadger) Set(key string, val []byte, ttl ...int) error

func (*PineBadger) SetWithMarshal

func (c *PineBadger) SetWithMarshal(key string, structData interface{}, ttl ...int) error

Jump to

Keyboard shortcuts

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