rd

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB int
const (
	ApplicationTokenDb DB = iota
	ApplicationPermissionDb
	UserTokenDb
	UserPermissionDb
	DeviceTokenDb
	DevicePermissionDb
)

type RdClient

type RdClient struct {
	*rd.Client
}

func GetClient

func GetClient() *RdClient

func InitClient

func InitClient(cfg RedisConfiguration) *RdClient

func (*RdClient) UseDb

func (c *RdClient) UseDb(dbIndex DB, f func(p rd.Pipeliner) error) ([]rd.Cmder, error)

func (*RdClient) UseDbTx

func (c *RdClient) UseDbTx(dbIndex DB, f func(p rd.Pipeliner) error) ([]rd.Cmder, error)

type RedisConfiguration

type RedisConfiguration struct {
	Address   structure.AddressConfiguration `schema:"Address"`
	Password  string                         `schema:"Password"`
	DefaultDB int                            `schema:"Default database"`
}

Jump to

Keyboard shortcuts

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