storage

package
v0.0.0-...-c68f7f2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DEFAULT_REDIS_SERVER = "localhost:6379"
)

Functions

This section is empty.

Types

type CsvEngine

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

func NewCsvEngine

func NewCsvEngine(recordType reflect.Type) *CsvEngine

func (*CsvEngine) Load

func (this *CsvEngine) Load(csvFile string) (error, []interface{})

func (*CsvEngine) Save

func (this *CsvEngine) Save(csvFile string, data []interface{}) error

type RedisPool

type RedisPool struct {
	redis.Pool
}

func NewRedisPool

func NewRedisPool(address string, password string) *RedisPool

func (*RedisPool) SortedSetAdd

func (redisPool *RedisPool) SortedSetAdd(key string, data []byte, score uint64) error

func (*RedisPool) SortedSetRangeByScore

func (redisPool *RedisPool) SortedSetRangeByScore(key string, min, max uint64, offset, count int) ([]string, error)

min, max: inclusive

func (*RedisPool) SortedSetRemoveByScore

func (redisPool *RedisPool) SortedSetRemoveByScore(key string, min, max uint64) error

min, max: inclusive

func (*RedisPool) SortedSetRevRangeByScore

func (redisPool *RedisPool) SortedSetRevRangeByScore(key string, min, max uint64, offset, count int) ([]string, error)

min, max: inclusive

Jump to

Keyboard shortcuts

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