fsbucket

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "filesystem"

Variables

This section is empty.

Functions

func NewBucket

func NewBucket(prefix string, v *viper.Viper) (bucket.Bucket, error)

NewBucket creates new file system bucket instance.

Types

type Bucket

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

func (*Bucket) Close

func (b *Bucket) Close() error

Close bucket (just empty).

func (*Bucket) Del

func (b *Bucket) Del(key []byte) error

Del value by key.

func (*Bucket) Get

func (b *Bucket) Get(key []byte) ([]byte, error)

Get value by key.

func (*Bucket) Has

func (b *Bucket) Has(key []byte) bool

Has checks key exists.

func (*Bucket) Iterate

func (b *Bucket) Iterate(handler bucket.FilterHandler) error

Filter bucket items by closure.

func (*Bucket) List

func (b *Bucket) List() ([][]byte, error)

List all bucket items.

func (*Bucket) Set

func (b *Bucket) Set(key, value []byte) error

Set value by key.

func (*Bucket) Size

func (b *Bucket) Size() (size int64)

Size of bucket.

Jump to

Keyboard shortcuts

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