rawdb

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltDB

type BoltDB struct {
	Db *bolt.DB
}

func NewBoltDB

func NewBoltDB(boltDirPath string) (*BoltDB, error)

func (*BoltDB) Close

func (s *BoltDB) Close() (err error)

func (*BoltDB) Delete

func (s *BoltDB) Delete(bucket, key string) (err error)

func (*BoltDB) Get

func (s *BoltDB) Get(bucket, key string) (data []byte, err error)

func (*BoltDB) GetAllKey

func (s *BoltDB) GetAllKey(bucket string) (keys []string, err error)

func (*BoltDB) Put

func (s *BoltDB) Put(bucket, key string, value []byte) (err error)

type KeyValueDB

type KeyValueDB interface {
	Put(bucket, key string, value []byte) (err error)

	Get(bucket, key string) (data []byte, err error)

	GetAllKey(bucket string) (keys []string, err error)

	Delete(bucket, key string) (err error)

	Close() (err error)
}

type S3DB

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

func NewS3DB

func NewS3DB(accKey, secretKey, region, bktPrefix string, use4EVER bool) (*S3DB, error)

func (*S3DB) Close

func (s *S3DB) Close() (err error)

func (*S3DB) Delete

func (s *S3DB) Delete(bucket, key string) (err error)

func (*S3DB) Get

func (s *S3DB) Get(bucket, key string) (data []byte, err error)

func (*S3DB) GetAllKey

func (s *S3DB) GetAllKey(bucket string) (keys []string, err error)

func (*S3DB) Put

func (s *S3DB) Put(bucket, key string, value []byte) (err error)

Jump to

Keyboard shortcuts

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