handler

package
v0.0.0-...-69bdcc1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(group *gin.RouterGroup)

func GetUser

func GetUser(c *gin.Context) *service.UserBO

func JWTAuthMW

func JWTAuthMW(c *gin.Context)

JWTAuthMW 基于JWT的认证中间件

func User

func User(group *gin.RouterGroup)

User 用户

func UserVO2BO

func UserVO2BO(bo *UserVO) *service.UserBO

Types

type CaptchaInfo

type CaptchaInfo struct {
	Encode string `json:"encode,omitempty"`
	Image  string `json:"image,omitempty"`
}

type UserQuery

type UserQuery struct {
	ID     int64  `json:"id,omitempty" form:"id"`
	IDGt   int64  `json:"id_gt,omitempty" form:"id_gt"`
	IDLt   int64  `json:"id_lt,omitempty" form:"id_lt"`
	Status int64  `json:"status,omitempty" form:"status"`
	Name   string `json:"name,omitempty" form:"name"`
	Gender string `json:"gender,omitempty" form:"gender"`
}

type UserVO

type UserVO struct {
	ID        int64     `json:"id,omitempty" form:"id"`
	Name      string    `json:"name,omitempty" form:"name"`
	Password  string    `json:"password,omitempty" form:"password"`
	Header    string    `json:"header,omitempty" gorm:"size:5120"` // 存储很小的头像
	Gender    string    `json:"gender,omitempty" form:"gender"`
	Role      string    `json:"role,omitempty" form:"role"`
	Status    int64     `json:"status,omitempty" form:"status"`
	Sign      string    `json:"sign,omitempty" form:"sign"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
}

func UserBO2VO

func UserBO2VO(po *service.UserBO) *UserVO

Jump to

Keyboard shortcuts

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