session

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL