goredis

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: MIT Imports: 4 Imported by: 0

README

go-redis

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePool

func CreatePool(host string, port, db int, password string) *redis.Pool

Types

type Service

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

func NewService

func NewService(pool *redis.Pool, prefix string) *Service

func (*Service) Add

func (s *Service) Add(key string, value interface{}, expire time.Duration) error

func (*Service) Decrement

func (s *Service) Decrement(key string, data uint64) (uint64, error)

func (*Service) Delete

func (s *Service) Delete(key string) error

func (*Service) Exists

func (s *Service) Exists(key string) bool

func (*Service) Flush

func (s *Service) Flush() error

func (*Service) Get

func (s *Service) Get(key string, value interface{}) error

func (*Service) Increment

func (s *Service) Increment(key string, data uint64) (uint64, error)

func (*Service) Replace

func (s *Service) Replace(key string, data interface{}, expire time.Duration) error

func (*Service) Set

func (s *Service) Set(key string, value interface{}, expire time.Duration) error

func (*Service) SetExpire

func (s *Service) SetExpire(key string, expires time.Duration) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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