redis

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 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 RedisSession

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

func (*RedisSession) Clear

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

func (*RedisSession) Data

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

func (*RedisSession) Delete

func (s *RedisSession) Delete(key string)

func (*RedisSession) Expire

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

func (*RedisSession) GetInt64

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

func (*RedisSession) GetString

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

func (*RedisSession) GetStruct

func (s *RedisSession) GetStruct(key string, obj any)

func (*RedisSession) ID

func (s *RedisSession) ID() string

func (*RedisSession) IsExpire

func (s *RedisSession) IsExpire() bool

func (*RedisSession) PutInt64

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

func (*RedisSession) PutString

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

func (*RedisSession) PutStruct

func (s *RedisSession) PutStruct(key string, value any) httpsession.Session

func (*RedisSession) Reload

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

func (*RedisSession) Remove

func (s *RedisSession) Remove()

func (*RedisSession) Save

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

func (*RedisSession) SetExpire

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

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 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