redis

package
v0.24.5 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

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