session

package
v0.0.0-...-705e2cb Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2018 License: Apache-2.0, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LedisProvider

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

ledis session provider

func (*LedisProvider) SessionAll

func (lp *LedisProvider) SessionAll() int

@todo

func (*LedisProvider) SessionDestroy

func (lp *LedisProvider) SessionDestroy(sid string) error

delete ledis session by id

func (*LedisProvider) SessionExist

func (lp *LedisProvider) SessionExist(sid string) bool

check ledis session exist by sid

func (*LedisProvider) SessionGC

func (lp *LedisProvider) SessionGC()

Impelment method, no used.

func (*LedisProvider) SessionInit

func (lp *LedisProvider) SessionInit(maxlifetime int64, savePath string) error

init ledis session savepath like ledis server saveDataPath,pool size e.g. 127.0.0.1:6379,100,astaxie

func (*LedisProvider) SessionRead

func (lp *LedisProvider) SessionRead(sid string) (session.SessionStore, error)

read ledis session by sid

func (*LedisProvider) SessionRegenerate

func (lp *LedisProvider) SessionRegenerate(oldsid, sid string) (session.SessionStore, error)

generate new sid for ledis session

type LedisSessionStore

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

ledis session store

func (*LedisSessionStore) Delete

func (ls *LedisSessionStore) Delete(key interface{}) error

delete value in ledis session

func (*LedisSessionStore) Flush

func (ls *LedisSessionStore) Flush() error

clear all values in ledis session

func (*LedisSessionStore) Get

func (ls *LedisSessionStore) Get(key interface{}) interface{}

get value in ledis session

func (*LedisSessionStore) SessionID

func (ls *LedisSessionStore) SessionID() string

get ledis session id

func (*LedisSessionStore) SessionRelease

func (ls *LedisSessionStore) SessionRelease(w http.ResponseWriter)

save session values to ledis

func (*LedisSessionStore) Set

func (ls *LedisSessionStore) Set(key, value interface{}) error

set value in ledis session

Jump to

Keyboard shortcuts

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