rawdb

package
v1.0.33 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ForeverLandEndpoint = "https://endpoint.4everland.co"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AliyunDB added in v1.0.27

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

func NewAliyunDB added in v1.0.27

func NewAliyunDB(endpoint, accKey, accessKeySecret, bktPrefix string) (*AliyunDB, error)

func (*AliyunDB) Close added in v1.0.27

func (a *AliyunDB) Close() (err error)

func (*AliyunDB) Delete added in v1.0.27

func (a *AliyunDB) Delete(bucket, key string) (err error)

func (*AliyunDB) Get added in v1.0.27

func (a *AliyunDB) Get(bucket, key string) (data []byte, err error)

func (*AliyunDB) GetAllKey added in v1.0.27

func (a *AliyunDB) GetAllKey(bucket string) (keys []string, err error)

func (*AliyunDB) Put added in v1.0.27

func (a *AliyunDB) Put(bucket, key string, value []byte) (err error)

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, endpoint string) (*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