store

package
v0.0.0-...-5e45501 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisDAO

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

RedisDAO struct which holds redis client

func (*RedisDAO) AddWithOrder

func (r *RedisDAO) AddWithOrder(key string, members ...redis.Z) error

AddWithOrder adds in specific keys the members in order

func (*RedisDAO) GetByScoreDesc

func (r *RedisDAO) GetByScoreDesc(key string, opt redis.ZRangeBy) ([]string, error)

GetByScoreDesc returns data by key with descending order by score

type RedisStore

type RedisStore interface {
	GetByScoreDesc(key string, opt redis.ZRangeBy) ([]string, error)
	AddWithOrder(key string, members ...redis.Z) error
}

RedisStore interface for redis client

func NewDAO

func NewDAO(addr string) (RedisStore, error)

NewDAO creates a data access for redis

Jump to

Keyboard shortcuts

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