ledis

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package ledis provide session Provider

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider radicalLedis.Provider

Provider ledis session provider

func (*Provider) SessionAll

func (lp *Provider) SessionAll() int

SessionAll return all active session

func (*Provider) SessionDestroy

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

SessionDestroy delete ledis session by id

func (*Provider) SessionExist

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

SessionExist check ledis session exist by sid

func (*Provider) SessionGC

func (lp *Provider) SessionGC()

SessionGC Impelment method, no used.

func (*Provider) SessionInit

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

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

SessionRead read ledis session by sid

func (*Provider) SessionRegenerate

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

SessionRegenerate generate new sid for ledis session

type SessionStore

type SessionStore radicalLedis.SessionStore

SessionStore ledis session store

func (*SessionStore) Delete

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

Delete value in ledis session

func (*SessionStore) Flush

func (ls *SessionStore) Flush() error

Flush clear all values in ledis session

func (*SessionStore) Get

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

Get value in ledis session

func (*SessionStore) SessionID

func (ls *SessionStore) SessionID() string

SessionID get ledis session id

func (*SessionStore) SessionRelease

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

SessionRelease save session values to ledis

func (*SessionStore) Set

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

Set value in ledis session

Jump to

Keyboard shortcuts

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