-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathsession.go
More file actions
27 lines (24 loc) · 754 Bytes
/
Copy pathsession.go
File metadata and controls
27 lines (24 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package trygo
type SessionInterface interface {
Set(key string, value interface{})
Get(key string) interface{}
Delete(key string)
SessionID() string
Flush() error //delete all data
}
type ProviderInterface interface {
SessionInit(gclifetime int64, config string) error
SessionRead(sid string) (SessionInterface, error)
SessionExist(sid string) bool
SessionRegenerate(oldsid, sid string) (SessionInterface, error)
SessionDestroy(sid string) error
SessionAll() int //get all active session
SessionGC()
}
//type sessionManagerInterface interface {
// SessionStart() SessionInterface
// SetHashFunc(hf hashFunc)
// Destroy(HTTPCookieHandlerInterface)
// RegenerateSession(cookieHandler HTTPCookieHandlerInterface) SessionInterface
// GC()
//}