store

package
v0.0.0-...-0eac02a Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StoreUnspecifiedDB         = 0
	StoreActivationCodeDB      = 1
	StoreOAuth2AuthorizationDB = 2
)
View Source
const RedisStoresSize = 10

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store interface {
	Get(ctx context.Context, key string) (string, error)
	GetJson(ctx context.Context, key string, value interface{}) error
	Set(ctx context.Context, key string, value interface{}, exp time.Duration) error
	SetJson(ctx context.Context, key string, value interface{}, exp time.Duration) error
	Delete(ctx context.Context, key string) error
	ListKeys(ctx context.Context, pattern string) ([]string, error)
}

type Stores

type Stores interface {
	GetStore(id int) Store
}

func NewRedisStores

func NewRedisStores(addr, passwd string) Stores

func NewRedisStoresFromConfig

func NewRedisStoresFromConfig(cfg *shared.RedisConfig) Stores

Jump to

Keyboard shortcuts

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