Help us shape the future of Go! Take the 2026 Go Developer Survey

psession

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PSession

type PSession struct {
	ExpireTime int64 `json:"expire_time"`
	// contains filtered or unexported fields
}

func NewPSession

func NewPSession(db *badger_db.Cache) *PSession

func (*PSession) Clean

func (p *PSession) Clean() error

func (*PSession) Delete

func (p *PSession) Delete(sessionID string) error

func (*PSession) Get

func (p *PSession) Get(sessionID string) (SessionUser, error)

func (*PSession) Set

func (p *PSession) Set(sessionID string, user SessionUser, ttlSeconds int) error

type SessionUser

type SessionUser struct {
	ID   uint   `json:"id"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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