session

package
v3.2.34 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	Driver *redis.Client
	Name   string
	TTL    int64 // seconds
}

Session ...

func (*Session) Destroy

func (session *Session) Destroy(ctx context.Context) int64

Destroy 释放

func (*Session) Get

func (session *Session) Get(ctx context.Context, key string) interface{}

Get s.Get

func (*Session) Put

func (session *Session) Put(ctx context.Context, key string, value interface{}) error

Put https://laravel.com/docs/5.8/session Pushing To Array Session Values session.Put('user.teams', 'developers'); => {user: {teams: "developer"}}

func (*Session) Remove

func (session *Session) Remove(ctx context.Context, key string)

Remove ...

Jump to

Keyboard shortcuts

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