redissession

package
v0.0.0-...-16f3fb8 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PoolMaxIdle = 10

Functions

func Exists

func Exists(cx *goblet.Context, key string) (bool, error)

func Get

func Get(cx *goblet.Context, Key string) (interface{}, error)

func GetBool

func GetBool(cx *goblet.Context, Key string) (bool, error)

func GetBytes

func GetBytes(cx *goblet.Context, Key string) ([]byte, error)

func GetFloat64

func GetFloat64(cx *goblet.Context, Key string) (float64, error)

func GetInt

func GetInt(cx *goblet.Context, Key string) (int, error)

func GetInt64

func GetInt64(cx *goblet.Context, Key string) (int64, error)

func GetInt64Map

func GetInt64Map(cx *goblet.Context, Key string) (map[string]int64, error)

func GetIntMap

func GetIntMap(cx *goblet.Context, Key string) (map[string]int, error)

func GetInts

func GetInts(cx *goblet.Context, Key string) ([]int, error)

func GetString

func GetString(cx *goblet.Context, Key string) (string, error)

func GetStringMap

func GetStringMap(cx *goblet.Context, Key string) (map[string]string, error)

func GetStrings

func GetStrings(cx *goblet.Context, Key string) ([]string, error)

func GetUint64

func GetUint64(cx *goblet.Context, Key string) (uint64, error)

func RemoveItem

func RemoveItem(cx *goblet.Context, Key string) error

func Store

func Store(cx *goblet.Context, key string, item interface{}) (err error)

Types

type RedisSession

type RedisSession struct {
	Address     string `goblet:"address,localhost:6379"`
	Pwd         string `goblet:"pwd"`
	Db          int64  `goblet:"db"`
	SessionType string `goblet:"type,cookie"`
	TokenName   string `goblet:"token_name,token"`
}

func (*RedisSession) AddCfgAndInit

func (r *RedisSession) AddCfgAndInit(server *goblet.Server) error

func (*RedisSession) Init

func (r *RedisSession) Init(server *goblet.Server) error

func (*RedisSession) OnNewRequest

func (s *RedisSession) OnNewRequest(ctx *goblet.Context) error

Jump to

Keyboard shortcuts

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