psession

package
v0.0.0-...-74a8e61 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: GPL-3.0 Imports: 13 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 {
	Store *gormstore.Store
	// contains filtered or unexported fields
}

func NewPSession

func NewPSession(dbPath string) *PSession

func (*PSession) Clean

func (p *PSession) Clean() error

func (*PSession) Delete

func (p *PSession) Delete(c *gin.Context) error

func (*PSession) Get

func (p *PSession) Get(c *gin.Context) (SessionUser, error)

func (*PSession) Set

func (p *PSession) Set(c *gin.Context, user SessionUser, secure bool, 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