Login

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: GPL-3.0 Imports: 7 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 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
}

type LoginStore

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

func NewLoginStore

func NewLoginStore() *LoginStore

func (*LoginStore) Add

func (s *LoginStore) Add(login Login)

func (*LoginStore) Delete

func (s *LoginStore) Delete(userID int)

func (*LoginStore) Get

func (s *LoginStore) Get(userID int) (Login, bool)

Jump to

Keyboard shortcuts

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