add ssdb-session interface

This commit is contained in:
lcbluestorm 2016-05-10 19:56:45 +08:00
parent cfef97175e
commit 27be1e7ca3
1 changed files with 55 additions and 0 deletions

55
session/ssdb/sess_ssdb.go Normal file
View File

@ -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)
}