session

package
v0.0.0-...-dd30ea9 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionDb

type SessionDb struct {
	Base *pg.Db
	// contains filtered or unexported fields
}

func New

func New(db database.Db) *SessionDb

func (*SessionDb) Create

func (t *SessionDb) Create(tx interface{}, session *domain.Session) error

func (*SessionDb) List

func (t *SessionDb) List(tx interface{}, user *domain.User) ([]domain.Session, error)

func (*SessionDb) Load

func (t *SessionDb) Load(tx interface{}, id string) (*domain.Session, error)

func (*SessionDb) Remove

func (t *SessionDb) Remove(tx interface{}, id string, validateCurrentSession bool) error

func (*SessionDb) SetUserDb

func (t *SessionDb) SetUserDb(item *database.User)

func (*SessionDb) Update

func (t *SessionDb) Update(tx interface{}, session *domain.Session) error

func (*SessionDb) UserDb

func (t *SessionDb) UserDb() database.User

func (*SessionDb) ValidateToken

func (t *SessionDb) ValidateToken(tx interface{}, id string) (*domain.Session, error)

Jump to

Keyboard shortcuts

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