Documentation ¶
Index ¶
- Constants
- type MyCookie
- func (self *MyCookie) Delete(cookieName string, w http.ResponseWriter) bool
- func (self *MyCookie) Get(r *http.Request) map[string]string
- func (self *MyCookie) GetOne(name string, r *http.Request) (value string)
- func (self *MyCookie) Set(w http.ResponseWriter, data map[string]string, maxAge int) bool
- func (self *MyCookie) SetOne(w http.ResponseWriter, name string, value string, maxAge int) bool
- type MySession
- func (self *MySession) Delete(name string) error
- func (self *MySession) Destroy() (bool, error)
- func (self *MySession) Get(name string) (string, error)
- func (self *MySession) GetAll() (map[string]string, error)
- func (self *MySession) Initialize(grantors string, survivalSeconds int, w http.ResponseWriter, r *http.Request) error
- func (self *MySession) Key() string
- func (self *MySession) SessionID() string
- func (self *MySession) Set(name string, value string) error
- func (self *MySession) SetBatch(contentMap map[string]string) error
Constants ¶
View Source
const ( COOKIE_KEY_PREFIX = "hm-" SESSION_COOKIE_KEY = "sessionid" )
cookie
View Source
const ( SESSION_SURVIVAL_SECONDS = 60 * 60 * 24 // session live seconds SESSION_MAP_KEY = "hmsessionmap" SESSION_KEY_PREFIX = "hmsession-" SESSION_GRANTORS_KEY = "grantors" SESSION_GROUP_KEY = "group" SESSION_SURVIVAL_SECONDS_KEY = "survival_seconds" )
session
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MyCookie ¶
type MyCookie struct {
// contains filtered or unexported fields
}
func (*MyCookie) Delete ¶
func (self *MyCookie) Delete(cookieName string, w http.ResponseWriter) bool
type MySession ¶
type MySession struct {
// contains filtered or unexported fields
}
func GetMatchedSession ¶
func NewSession ¶
func (*MySession) Initialize ¶
Click to show internal directories.
Click to hide internal directories.