redis

package
v0.0.0-...-19553bc Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RedisName          = "redis"
	RedisSessionPrefix = "httpsession"
)

Functions

func SessionProvider

func SessionProvider() httpsession.SessionProvider

Types

type RedisSessionProvider

type RedisSessionProvider struct {
	Master *datastore.KKRedisOp
	Slave  *datastore.KKRedisOp
}

func (*RedisSessionProvider) NewSession

func (r *RedisSessionProvider) NewSession(expire *time.Time) httpsession.Session

func (*RedisSessionProvider) Session

func (*RedisSessionProvider) Sessions

func (r *RedisSessionProvider) Sessions() map[string]httpsession.Session

type Session

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

func (*Session) Clear

func (s *Session) Clear() httpsession.Session

func (*Session) Data

func (s *Session) Data() map[string]string

func (*Session) Delete

func (s *Session) Delete(key string)

func (*Session) Expire

func (s *Session) Expire() *time.Time

func (*Session) GetInt64

func (s *Session) GetInt64(key string) int64

func (*Session) GetString

func (s *Session) GetString(key string) string

func (*Session) GetStruct

func (s *Session) GetStruct(key string, obj interface{})

func (*Session) ID

func (s *Session) ID() string

func (*Session) IsExpire

func (s *Session) IsExpire() bool

func (*Session) PutInt64

func (s *Session) PutInt64(key string, value int64) httpsession.Session

func (*Session) PutString

func (s *Session) PutString(key string, value string) httpsession.Session

func (*Session) PutStruct

func (s *Session) PutStruct(key string, value interface{}) httpsession.Session

func (*Session) Reload

func (s *Session) Reload() httpsession.Session

func (*Session) Remove

func (s *Session) Remove()

func (*Session) Save

func (s *Session) Save() httpsession.Session

func (*Session) SetExpire

func (s *Session) SetExpire(expire *time.Time) httpsession.Session

type SessionEntity

type SessionEntity struct {
	ID       string
	LifeTime int64
	Expired  int64
	Data     map[string]string
}

Jump to

Keyboard shortcuts

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