session

package
v0.0.0-...-4085259 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultExpireTime = time.Minute * 1
)

Variables

This section is empty.

Functions

func DeleteSession

func DeleteSession(ctx context.Context, sessionKey string) error

func GetRDB

func GetRDB() *redis.Client

Types

type SessionData

type SessionData struct {
	Key        string
	Version    string
	UserId     int64
	ExpireTime time.Duration
}

func CreateSession

func CreateSession(ctx context.Context, userId int64) (*SessionData, error)

func NewSessionData

func NewSessionData(userId int64) *SessionData

func ReadSession

func ReadSession(ctx context.Context, sessionKey string) (*SessionData, error)

Jump to

Keyboard shortcuts

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