session

package
v0.0.0-...-7daae65 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoAuth = iota
	UserAuth
	ModeratorAuth
	AdminAuth
)

Variables

This section is empty.

Functions

func DestroySession

func DestroySession(sessionId string) error

func GenerateSession

func GenerateSession(ttl time.Duration, authLevel AuthLevel) (string, error)

Types

type AuthLevel

type AuthLevel struct {
	AuthLevel int
	UID       int
}

func GetSessionAuthLevel

func GetSessionAuthLevel(sessionKey string) (AuthLevel, error)

Jump to

Keyboard shortcuts

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