Documentation ¶
Overview ¶
package couchbase for session provider
depend on github.com/couchbaselabs/go-couchbasee
go install github.com/couchbaselabs/go-couchbase
Usage: import(
_ "github.com/astaxie/beego/session/couchbase" "github.com/astaxie/beego/session"
)
func init() { globalSessions, _ = session.NewManager("couchbase", ``{"cookieName":"gosessionid","gclifetime":3600,"ProviderConfig":"http://host:port/, Pool, Bucket"}``) go globalSessions.GC() }
more docs: http://beego.me/docs/module/session.md
Index ¶
- type CouchbaseProvider
- func (cp *CouchbaseProvider) SessionAll() int
- func (cp *CouchbaseProvider) SessionDestroy(sid string) error
- func (cp *CouchbaseProvider) SessionExist(sid string) bool
- func (cp *CouchbaseProvider) SessionGC()
- func (cp *CouchbaseProvider) SessionInit(maxlifetime int64, savePath string) error
- func (cp *CouchbaseProvider) SessionRead(sid string) (session.SessionStore, error)
- func (cp *CouchbaseProvider) SessionRegenerate(oldsid, sid string) (session.SessionStore, error)
- type CouchbaseSessionStore
- func (cs *CouchbaseSessionStore) Delete(key interface{}) error
- func (cs *CouchbaseSessionStore) Flush() error
- func (cs *CouchbaseSessionStore) Get(key interface{}) interface{}
- func (cs *CouchbaseSessionStore) SessionID() string
- func (cs *CouchbaseSessionStore) SessionRelease(w http.ResponseWriter)
- func (cs *CouchbaseSessionStore) Set(key, value interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CouchbaseProvider ¶
type CouchbaseProvider struct {
// contains filtered or unexported fields
}
func (*CouchbaseProvider) SessionAll ¶
func (cp *CouchbaseProvider) SessionAll() int
func (*CouchbaseProvider) SessionDestroy ¶
func (cp *CouchbaseProvider) SessionDestroy(sid string) error
func (*CouchbaseProvider) SessionExist ¶
func (cp *CouchbaseProvider) SessionExist(sid string) bool
func (*CouchbaseProvider) SessionGC ¶
func (cp *CouchbaseProvider) SessionGC()
func (*CouchbaseProvider) SessionInit ¶
func (cp *CouchbaseProvider) SessionInit(maxlifetime int64, savePath string) error
init couchbase session savepath like couchbase server REST/JSON URL e.g. http://host:port/, Pool, Bucket
func (*CouchbaseProvider) SessionRead ¶
func (cp *CouchbaseProvider) SessionRead(sid string) (session.SessionStore, error)
read couchbase session by sid
func (*CouchbaseProvider) SessionRegenerate ¶
func (cp *CouchbaseProvider) SessionRegenerate(oldsid, sid string) (session.SessionStore, error)
type CouchbaseSessionStore ¶
type CouchbaseSessionStore struct {
// contains filtered or unexported fields
}
func (*CouchbaseSessionStore) Delete ¶
func (cs *CouchbaseSessionStore) Delete(key interface{}) error
func (*CouchbaseSessionStore) Flush ¶
func (cs *CouchbaseSessionStore) Flush() error
func (*CouchbaseSessionStore) Get ¶
func (cs *CouchbaseSessionStore) Get(key interface{}) interface{}
func (*CouchbaseSessionStore) SessionID ¶
func (cs *CouchbaseSessionStore) SessionID() string
func (*CouchbaseSessionStore) SessionRelease ¶
func (cs *CouchbaseSessionStore) SessionRelease(w http.ResponseWriter)
func (*CouchbaseSessionStore) Set ¶
func (cs *CouchbaseSessionStore) Set(key, value interface{}) error
Click to show internal directories.
Click to hide internal directories.