persistence

package
v0.0.0-...-094ba9a Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Empty

type Empty struct {
}

func NewEmpty

func NewEmpty() *Empty

func (*Empty) Create

func (e *Empty) Create(key []byte, data *[]byte) error

func (*Empty) Delete

func (e *Empty) Delete(key []byte) error

func (*Empty) GetKeys

func (rdb *Empty) GetKeys() [][]byte

func (*Empty) Read

func (e *Empty) Read(key []byte, start int64, end int64) (data *[]byte, err error)

type MongoDb

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

func NewMongoDb

func NewMongoDb(database, collection, mongoDbIP string) (s *MongoDb)

func (*MongoDb) Create

func (s *MongoDb) Create(key []byte, data *[]byte) error

func (*MongoDb) Delete

func (s *MongoDb) Delete(key []byte) error

func (*MongoDb) GetKeys

func (rdb *MongoDb) GetKeys() [][]byte

func (*MongoDb) Read

func (s *MongoDb) Read(key []byte, start int64, end int64) (data *[]byte, err error)

type RedisDb

type RedisDb struct {
	redis.Client
}

func NewRedisDb

func NewRedisDb(ip string) *RedisDb

func (*RedisDb) Create

func (rdb *RedisDb) Create(key []byte, data *[]byte) error

func (*RedisDb) Delete

func (rdb *RedisDb) Delete(key []byte) error

func (*RedisDb) GetKeys

func (rdb *RedisDb) GetKeys() [][]byte

func (*RedisDb) Read

func (rdb *RedisDb) Read(key []byte, start int64, end int64) (*[]byte, error)

Jump to

Keyboard shortcuts

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