redis

package
v0.0.0-...-bd437fd Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DbCacheTime = 3600 * time.Second

Variables

View Source
var (
	IP      string
	Port    string
	MaxIdle int
	Timeout int
	Pwd     string
	Auth    string
	DbNo    int
)

Functions

func Del

func Del(key string) int64

func Get

func Get(key string) (data []byte, found bool)

func Set

func Set(key string, value interface{}, lifeTime time.Duration) (error, []byte)

Types

type Session

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

func (*Session) Delete

func (s *Session) Delete(key string)

func (*Session) Get

func (s *Session) Get(key string, value interface{}) (err error)

func (*Session) SessionId

func (s *Session) SessionId() (sid string)

func (*Session) Set

func (s *Session) Set(key string, value interface{}) (err error)

type SessionInterface

type SessionInterface struct {
	IP      string
	Port    string
	MaxIdle int
	Timeout int
	Pwd     string
	Auth    string
	DbNo    int
	Expire  int64
}

func (*SessionInterface) GetRedisPool

func (sip *SessionInterface) GetRedisPool() *redis.Pool

func (*SessionInterface) NewSessionManager

func (sip *SessionInterface) NewSessionManager() TigoWeb.SessionManager

type SessionManager

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

func (*SessionManager) DeleteSession

func (sm *SessionManager) DeleteSession(sid string)

func (*SessionManager) GenerateSession

func (sm *SessionManager) GenerateSession(expire int) TigoWeb.Session

func (*SessionManager) GetSessionBySid

func (sm *SessionManager) GetSessionBySid(sid string) TigoWeb.Session

Jump to

Keyboard shortcuts

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