Login

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckToken

func CheckToken(r *http.Request) bool

func GetIdWithRequest added in v0.3.0

func GetIdWithRequest(r *http.Request) (int, error)

func Init added in v0.3.0

func Init()

func LoginUser

func LoginUser(email, password string) (string, database.User, error)

func LogoutUser

func LogoutUser(userID int)

Types

type Login

type Login struct {
	UserID  int
	Token   string
	Expires int64
}

type LoginStore

type LoginStore struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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