ssdb

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider added in v1.8.2

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

Provider holds ssdb client and configs

func (*Provider) SessionAll added in v1.8.2

func (p *Provider) SessionAll() int

SessionAll not implemented

func (*Provider) SessionDestroy added in v1.8.2

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

SessionDestroy destroy the sid

func (*Provider) SessionExist added in v1.8.2

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

SessionExist judged whether sid is exist in session

func (*Provider) SessionGC added in v1.8.2

func (p *Provider) SessionGC()

SessionGC not implemented

func (*Provider) SessionInit added in v1.8.2

func (p *Provider) SessionInit(maxLifetime int64, savePath string) error

SessionInit init the ssdb with the config

func (*Provider) SessionRead added in v1.8.2

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

SessionRead return a ssdb client session Store

func (*Provider) SessionRegenerate added in v1.8.2

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

SessionRegenerate regenerate session with new sid and delete oldsid

type SessionStore

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

SessionStore holds the session information which stored in ssdb

func (*SessionStore) Delete

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

Delete the key in session store

func (*SessionStore) Flush

func (s *SessionStore) Flush() error

Flush delete all keys and values

func (*SessionStore) Get

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

Get return the value by the key

func (*SessionStore) SessionID

func (s *SessionStore) SessionID() string

SessionID return the sessionID

func (*SessionStore) SessionRelease

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

SessionRelease Store the keyvalues into ssdb

func (*SessionStore) Set

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

Set the key and value

Jump to

Keyboard shortcuts

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