api

package
v0.0.0-...-4116f47 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidLoginUser = errors.New("challenged login by invalid user")
View Source
var ErrNoSuchUser = errors.New("no such user")

Functions

func Login

func Login(p *pgxpool.Pool, rc *redis.Client, exp time.Duration) gin.HandlerFunc

func Logout

func Logout(rc *redis.Client) gin.HandlerFunc

Types

type LoginingUser

type LoginingUser struct {
	NameOrEmail string `validate:"required"`
	RawPassword string `validate:"required" json:"password"`
}

type User

type User struct {
	Name     string `validate:"required"`
	Email    string `validate:"required,email"`
	Password string `validate:"required,min=8"`
	IsAdmin  bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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