redis

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: AGPL-3.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage is a redis implementation of a keyvalue storage

func NewStorage

func NewStorage() *Storage

NewStorage creates a new redis key value storage

func (*Storage) DecrBy

func (s *Storage) DecrBy(key string, update int64) (err error)

DecrBy decreases the value saved at key by the amount provided through update

func (*Storage) Del

func (s *Storage) Del(key string) (err error)

Del removed a value from redis

func (*Storage) Get

func (s *Storage) Get(key string) (value interface{}, exists bool, err error)

Get retrieves a saved value from redis

func (*Storage) GetWithValue added in v0.18.0

func (s *Storage) GetWithValue(key string, value interface{}) (exists bool, err error)

func (*Storage) IncrBy

func (s *Storage) IncrBy(key string, update int64) (err error)

IncrBy increases the value saved at key by the amount provided through update

func (*Storage) Put

func (s *Storage) Put(key string, value interface{}) (err error)

Put puts a value into redis

Jump to

Keyboard shortcuts

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