beego: github.com/astaxie/beego/session/ledis Index | Files

package ledis

import "github.com/astaxie/beego/session/ledis"

Package ledis provide session Provider

Index

Package Files

ledis_session.go

type Provider Uses

type Provider struct {
    // contains filtered or unexported fields
}

Provider ledis session provider

func (*Provider) SessionAll Uses

func (lp *Provider) SessionAll() int

SessionAll return all active session

func (*Provider) SessionDestroy Uses

func (lp *Provider) SessionDestroy(sid string) error

SessionDestroy delete ledis session by id

func (*Provider) SessionExist Uses

func (lp *Provider) SessionExist(sid string) bool

SessionExist check ledis session exist by sid

func (*Provider) SessionGC Uses

func (lp *Provider) SessionGC()

SessionGC Impelment method, no used.

func (*Provider) SessionInit Uses

func (lp *Provider) SessionInit(maxlifetime int64, savePath string) error

SessionInit init ledis session savepath like ledis server saveDataPath,pool size e.g. 127.0.0.1:6379,100,astaxie

func (*Provider) SessionRead Uses

func (lp *Provider) SessionRead(sid string) (session.Store, error)

SessionRead read ledis session by sid

func (*Provider) SessionRegenerate Uses

func (lp *Provider) SessionRegenerate(oldsid, sid string) (session.Store, error)

SessionRegenerate generate new sid for ledis session

type SessionStore Uses

type SessionStore struct {
    // contains filtered or unexported fields
}

SessionStore ledis session store

func (*SessionStore) Delete Uses

func (ls *SessionStore) Delete(key interface{}) error

Delete value in ledis session

func (*SessionStore) Flush Uses

func (ls *SessionStore) Flush() error

Flush clear all values in ledis session

func (*SessionStore) Get Uses

func (ls *SessionStore) Get(key interface{}) interface{}

Get value in ledis session

func (*SessionStore) SessionID Uses

func (ls *SessionStore) SessionID() string

SessionID get ledis session id

func (*SessionStore) SessionRelease Uses

func (ls *SessionStore) SessionRelease(w http.ResponseWriter)

SessionRelease save session values to ledis

func (*SessionStore) Set Uses

func (ls *SessionStore) Set(key, value interface{}) error

Set value in ledis session

Package ledis imports 7 packages (graph). Updated 2019-02-17. Refresh now. Tools for package owners.