session

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MysqlProvider added in v1.2.0

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

mysql session provider

func (*MysqlProvider) SessionAll added in v1.2.0

func (mp *MysqlProvider) SessionAll() int

count values in mysql session

func (*MysqlProvider) SessionDestroy added in v1.2.0

func (mp *MysqlProvider) SessionDestroy(sid string) error

delete mysql session by sid

func (*MysqlProvider) SessionExist added in v1.2.0

func (mp *MysqlProvider) SessionExist(sid string) bool

check mysql session exist

func (*MysqlProvider) SessionGC added in v1.2.0

func (mp *MysqlProvider) SessionGC()

delete expired values in mysql session

func (*MysqlProvider) SessionInit added in v1.2.0

func (mp *MysqlProvider) SessionInit(maxlifetime int64, savePath string) error

init mysql session. savepath is the connection string of mysql.

func (*MysqlProvider) SessionRead added in v1.2.0

func (mp *MysqlProvider) SessionRead(sid string) (session.SessionStore, error)

get mysql session by sid

func (*MysqlProvider) SessionRegenerate added in v1.2.0

func (mp *MysqlProvider) SessionRegenerate(oldsid, sid string) (session.SessionStore, error)

generate new sid for mysql session

type MysqlSessionStore added in v1.2.0

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

mysql session store

func (*MysqlSessionStore) Delete added in v1.2.0

func (st *MysqlSessionStore) Delete(key interface{}) error

delete value in mysql session

func (*MysqlSessionStore) Flush added in v1.2.0

func (st *MysqlSessionStore) Flush() error

clear all values in mysql session

func (*MysqlSessionStore) Get added in v1.2.0

func (st *MysqlSessionStore) Get(key interface{}) interface{}

get value from mysql session

func (*MysqlSessionStore) SessionID added in v1.2.0

func (st *MysqlSessionStore) SessionID() string

get session id of this mysql session store

func (*MysqlSessionStore) SessionRelease added in v1.2.0

func (st *MysqlSessionStore) SessionRelease(w http.ResponseWriter)

save mysql session values to database. must call this method to save values to database.

func (*MysqlSessionStore) Set added in v1.2.0

func (st *MysqlSessionStore) Set(key, value interface{}) error

set value in mysql session. it is temp value in map.

Jump to

Keyboard shortcuts

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