kmgSession

package
v0.0.0-...-05317bf Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MemoryStore = Store{
	// contains filtered or unexported fields
}
View Source
var SessionIdName string = "KmgSessionId"

Functions

This section is empty.

Types

type Session

type Session struct {
	Id   string
	Data map[string]string
	// contains filtered or unexported fields
}

func GetSession

func GetSession(w http.ResponseWriter, req *http.Request) *Session

func GetSessionById

func GetSessionById(sessionId string) *Session

通过 Session Id 获取 Session,如果没获取到,产生一个新的返回

func (*Session) Clear

func (s *Session) Clear()

func (*Session) Get

func (s *Session) Get(k string) string

func (*Session) Set

func (s *Session) Set(k string, v string)

type Store

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

func (*Store) Get

func (store *Store) Get(sessionId string) (session *Session, ok bool)

func (*Store) Set

func (store *Store) Set(sessionId string, session *Session)

Jump to

Keyboard shortcuts

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