pgstore

package module
v0.0.0-...-c50fcac Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PgStore

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

PgStore represents the session store.

func New

func New(db *pg.DB) *PgStore

func NewWithCleanupInterval

func NewWithCleanupInterval(db *pg.DB, cleanupInterval time.Duration) *PgStore

func (*PgStore) Commit

func (p *PgStore) Commit(token string, b []byte, expiry time.Time) error

func (*PgStore) Delete

func (p *PgStore) Delete(token string) error

func (*PgStore) Find

func (p *PgStore) Find(token string) (b []byte, exists bool, err error)

type Session

type Session struct {
	Token  string    `pg:",pk"`
	Data   []byte    `pg:",notnull"`
	Expiry time.Time `pg:",notnull"`
	// contains filtered or unexported fields
}

Session represents the session table.

Jump to

Keyboard shortcuts

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