From 27be1e7ca3ce2e52efc38b4757623be3041817c2 Mon Sep 17 00:00:00 2001 From: lcbluestorm Date: Tue, 10 May 2016 19:56:45 +0800 Subject: [PATCH] add ssdb-session interface --- session/ssdb/sess_ssdb.go | 55 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 session/ssdb/sess_ssdb.go diff --git a/session/ssdb/sess_ssdb.go b/session/ssdb/sess_ssdb.go new file mode 100644 index 00000000..109f3416 --- /dev/null +++ b/session/ssdb/sess_ssdb.go @@ -0,0 +1,55 @@ +package ssdb + +import ( + "net/http" + + "github.com/astaxie/beego/session" + "github.com/ssdb/gossdb/ssdb" +) + +var ssdbSsdbProvider = &SsdbSsdbProvider{} + +type SsdbProvider struct { +} + +func (r *SsdbProvider) SessionInit(maxlifetime int64, savePath string) error { +} + +func (r *SsdbProvider) SessionRead(sid string) (session.Store, error) { +} + +func (r *SsdbProvider) SessionExist(sid string) bool { +} +func (r *SsdbProvider) SessionRegenerate(oldsid, sid string) (session.Store, error) { +} + +func (r *SsdbProvider) SessionDestroy(sid string) error { +} + +func (r *SsdbProvider) SessionGC() { + return +} + +func (r *SsdbProvider) SessionAll() int { + return 0 +} + +type SessionStore struct { +} + +func (s *SessionStore) Set(key, value interface{}) error { +} +func (s *SessionStore) Get(key interface{}) interface{} { +} +func (s *SessionStore) Delete(key interface{}) error { +} +func (s *SessionStore) Flush() error { +} +func (s *SessionStore) SessionID() string { +} + +func (s *SessionStore) SessionRelease(w http.ResponseWriter) { +} +func init() { + session.Register("redis", redispder) +}