badger

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT, 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 {
	Client *badger.DB
}

func New

func New(basePath string) *Badger

func NewWithBadger

func NewWithBadger(client *badger.DB) *Badger

NewWithBadger returns a new Cache using the provided Diskv as underlying storage.

func (*Badger) Delete

func (b *Badger) Delete(key string) error

func (*Badger) Fetch

func (b *Badger) Fetch(key string, fc func() interface{}) (string, error)

func (*Badger) Get

func (b *Badger) Get(key string) (string, error)

func (*Badger) Set

func (b *Badger) Set(key string, value interface{}) error

func (*Badger) Unmarshal

func (b *Badger) Unmarshal(key string, object interface{}) error

Jump to

Keyboard shortcuts

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