bbolt

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: MIT Imports: 6 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
	BucketName      []byte
	Mode            os.FileMode
	BoltOpt         *bolt.Options
	CleanupInterval int
}

type PineBolt added in v0.0.4

type PineBolt struct {
	*bolt.DB
	*Option
}

func New

func New(opt *Option) *PineBolt

func (*PineBolt) BoltDB added in v0.0.4

func (b *PineBolt) BoltDB() *bolt.DB

func (*PineBolt) Delete added in v0.0.4

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

func (*PineBolt) Exists added in v0.0.4

func (b *PineBolt) Exists(key string) bool

func (*PineBolt) Get added in v0.0.4

func (b *PineBolt) Get(key string) (val []byte, err error)

func (*PineBolt) GetWithUnmarshal added in v0.0.4

func (b *PineBolt) GetWithUnmarshal(key string, receiver interface{}) error

func (*PineBolt) Set added in v0.0.4

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

func (*PineBolt) SetWithMarshal added in v0.0.4

func (b *PineBolt) 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