sessions

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	AccountId uint64   `json:"accountId"`
	Roles     []string `json:"roles"`

	ExpTime time.Time `json:"exp_time"`
}

Data represents the sessions.

func GetSession

func GetSession(c *gin.Context) *Session

GetSession returns sessions of the specified context.

func New

func New() *Session

func (*Session) Clear

func (sd *Session) Clear(c *gin.Context)

func (*Session) Save

func (sd *Session) Save(c *gin.Context) error

Save saves the current sessions of the specified context.

Jump to

Keyboard shortcuts

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