user

package
v0.0.0-...-2c6e621 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitRouter

func InitRouter(g *gin.RouterGroup)

InitRouter 初始化用户路由

Types

type ActiveReq

type ActiveReq struct {
	Token string `json:"token" binding:"required"`
}

ActiveReq active req

type ChangePasswordReq

type ChangePasswordReq struct {
	Old string `json:"old" binding:"gte=8,lte=16"`
	New string `json:"new" binding:"gte=8,lte=16"`
}

ChangePasswordReq reset password req

type Oauth2ExchangeReq

type Oauth2ExchangeReq struct {
	Source string `form:"source" binding:"required"`
	Code   string `form:"code" binding:"required"`
	State  string `form:"state" binding:"required"`
}

Oauth2ExchangeReq oauth2 exchange req

type ResetPasswordReq

type ResetPasswordReq struct {
	Password string `json:"password" binding:"gte=8,lte=16"`
	Token    string `json:"token" binding:"required"`
}

type SendEmailReq

type SendEmailReq struct {
	Email string `json:"email" binding:"required,email"`
	Type  string `json:"type" binding:"oneof=active reset"`
	URL   string `json:"url" binding:"required,url"`
}

SendEmailReq send email req

type SetStateReq

type SetStateReq struct {
	State string `json:"state" binding:"required"`
	URL   string `json:"url" binding:"required"`
}

SetStateReq state req

type SignInReq

type SignInReq struct {
	Email    string `json:"email" binding:"required,email"`
	Password string `json:"password" binding:"gte=8,lte=16"`
}

SignInReq request

type SignUpReq

type SignUpReq struct {
	Name      string `json:"name" binding:"gte=1,lte=64"`
	Email     string `json:"email" binding:"required,email"`
	Password  string `json:"password" binding:"gte=8,lte=16"`
	ActiveURL string `json:"active_url" binding:"required,url"`
}

SignUpReq request

Jump to

Keyboard shortcuts

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