redis

package
v0.0.0-...-74b37bb Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOptions

func NewOptions(config Config) (opt *redis.Options, err error)

Types

type Config

type Config interface {
	Addr() string
	Password() string
}

type Redis

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

func New

func New(opt *redis.Options) *Redis

func NewRedisFromOptions

func NewRedisFromOptions(opt *redis.Options) *Redis

func (Redis) Close

func (r Redis) Close() error

func (Redis) HGetAll

func (r Redis) HGetAll(key string) (map[string]string, error)

func (Redis) HSet

func (r Redis) HSet(key, field string, value interface{}) error

func (Redis) ZAdd

func (r Redis) ZAdd(key string, member string, score float64) error

func (Redis) ZCount

func (r Redis) ZCount(key, min, max string) (int64, error)

func (Redis) ZIncrBy

func (r Redis) ZIncrBy(key string, increment float64, member string) error

func (Redis) ZRange

func (r Redis) ZRange(key string, start, stop int64) ([]*controller.Company, error)

func (Redis) ZRevRange

func (r Redis) ZRevRange(key string, start, stop int64) ([]*controller.Company, error)

func (Redis) ZScore

func (r Redis) ZScore(key, member string) (float64, error)

type Value

type Value struct {
	Score float64
}

Jump to

Keyboard shortcuts

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