postgres

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider postgres.Provider

Provider postgresql session provider

func (*Provider) SessionAll

func (mp *Provider) SessionAll() int

SessionAll count values in postgresql session

func (*Provider) SessionDestroy

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

SessionDestroy delete postgresql session by sid

func (*Provider) SessionExist

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

SessionExist check postgresql session exist

func (*Provider) SessionGC

func (mp *Provider) SessionGC()

SessionGC delete expired values in postgresql session

func (*Provider) SessionInit

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

SessionInit init postgresql session. savepath is the connection string of postgresql.

func (*Provider) SessionRead

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

SessionRead get postgresql session by sid

func (*Provider) SessionRegenerate

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

SessionRegenerate generate new sid for postgresql session

type SessionStore

type SessionStore postgres.SessionStore

SessionStore postgresql session store

func (*SessionStore) Delete

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

Delete value in postgresql session

func (*SessionStore) Flush

func (st *SessionStore) Flush() error

Flush clear all values in postgresql session

func (*SessionStore) Get

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

Get value from postgresql session

func (*SessionStore) SessionID

func (st *SessionStore) SessionID() string

SessionID get session id of this postgresql session store

func (*SessionStore) SessionRelease

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

SessionRelease save postgresql session values to database. must call this method to save values to database.

func (*SessionStore) Set

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

Set value in postgresql session. it is temp value in map.

Jump to

Keyboard shortcuts

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