user

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoLogin

func DoLogin(c *gin.Context)

DoLogin perform login

func DoRegister

func DoRegister(c *gin.Context)

DoRegister submit register

func GetLogin

func GetLogin(c *gin.Context)

GetLogin show login page

func GetRegister

func GetRegister(c *gin.Context)

GetRegister register as a new user

func Logout

func Logout(c *gin.Context)

Logout user logout

Types

type CreateRequest

type CreateRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Email    string `json:"email"`
}

CreateRequest create request

type ListRequest

type ListRequest struct {
	Username string `json:"username"`
	Offset   int    `json:"offset"`
	Limit    int    `json:"limit"`
}

ListRequest list request

type LoginCredentials

type LoginCredentials struct {
	Email    string `json:"email" form:"email"`
	Password string `json:"password" form:"password"`
}

LoginCredentials login request

type RegisterRequest

type RegisterRequest struct {
	Username        string `json:"username" form:"username"`
	Email           string `json:"email" form:"email"`
	Password        string `json:"password" form:"password"`
	ConfirmPassword string `json:"confirm_password" form:"confirm_password"`
}

RegisterRequest register request

type RegisterResponse

type RegisterResponse struct {
	ID uint64 `json:"id"`
}

RegisterResponse register response

type UpdateReq

type UpdateReq struct {
	Status int `json:"status"`
}

UpdateReq update request

Jump to

Keyboard shortcuts

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