cachemanage

package
v0.0.0-...-8b2948b Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRedisClient

func CreateRedisClient(address string, password string, db int) (*redis.Client, error)

Types

type Client

type Client interface {
	HSet(key, field string, value interface{}) *redis.BoolCmd
	HGet(key, field string) *redis.StringCmd
	Close() error
}

type GormClient

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

func CreateGormClient

func CreateGormClient(dbtype, address string, args map[string]interface{}) (*GormClient, error)

func (*GormClient) Close

func (orm *GormClient) Close() error

func (*GormClient) HGet

func (orm *GormClient) HGet(key, field string) *redis.StringCmd

func (*GormClient) HSet

func (orm *GormClient) HSet(key, field string, value interface{}) *redis.BoolCmd

type Manage

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

* to hard to implement redis.Cmdable, so used Client to replace

func Create

func Create(dbtype, address string, args map[string]interface{}) (*Manage, error)

func (*Manage) Close

func (m *Manage) Close() error

func (*Manage) GenerateLoginSession

func (m *Manage) GenerateLoginSession(name string) (string, error)

func (*Manage) GetLoginSession

func (m *Manage) GetLoginSession(name string) (string, error)

Jump to

Keyboard shortcuts

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