api

package
v0.0.0-...-1c8f81e Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaptchaIndexReq

type CaptchaIndexReq struct {
	g.Meta `` /* 128-byte string literal not displayed */
}

type CaptchaIndexRes

type CaptchaIndexRes struct {
	g.Meta `mime:"png" dc:"验证码二进制内容" `
}

type CommonPaginationReq

type CommonPaginationReq struct {
	Page int `json:"page" in:"query" d:"1"  v:"min:0#分页号码错误"     dc:"分页号码,默认1"`
	Size int `json:"size" in:"query" d:"10" v:"max:50#分页数量最大50条" dc:"分页数量,最大50"`
}

type CommonPaginationRes

type CommonPaginationRes struct {
	List  interface{} `json:"list" dc:"分页结果集合"`
	Total int         `json:"total" dc:"总数"`
	Page  int         `json:"page" dc:"分页号码"`
	Size  int         `json:"size" dc:"分页数量"`
}

type GetCurrentUserInfoReq

type GetCurrentUserInfoReq struct {
	g.Meta `path:"/user/currentUser" method:"get" tags:"用户模型" summary:"获取当前用户信息"`
}

type UpdatePasswordReq

type UpdatePasswordReq struct {
	g.Meta   `path:"/user/password/update" method:"put" tags:"用户模型" summary:"修改密码"`
	Id       int    `json:"id" v:"required#用户模型ID不能为空" dc:"id"`
	Password string `json:"password" v:"required#用户密码不能为空" dc:"密码"`
}

UpdatePasswordReq 更新

type UpdateUserReq

type UpdateUserReq struct {
	g.Meta `path:"/user" method:"put" tags:"用户模型" summary:"更新"`
	Id     int `json:"id" v:"required#用户模型ID不能为空" dc:"id"`
	UserBase
}

UpdateUserReq 更新

type UpdateUserRes

type UpdateUserRes struct {
	Success bool `json:"success"      description:"是否成功"`
}

type UserBase

type UserBase struct {
	Username string `json:"username"`
	Password string `json:"password"`
	NickName string `json:"nick_name"`
	Phone    string `json:"phone"`
	Avatar   string `json:"avatar"`
	Sex      string `json:"sex"`
	Email    string `json:"email"`
}

UserBase User基类

type UserInfoRes

type UserInfoRes struct {
	Id       int    `json:"id" `
	Username string `json:"username"`
	NickName string `json:"nick_name"`
	Phone    string `json:"phone"`
	Avatar   string `json:"avatar"`
	Sex      string `json:"sex"`
	Email    string `json:"email"`
}

type UserLoginReq

type UserLoginReq struct {
	g.Meta   `path:"/user/login" method:"post" tags:"用户模型" summary:"用户登录"`
	UserName string `json:"username" v:"required#用户名不能为空" dc:"用户名"`
	Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
}

UserLoginReq 用户登录请求内容

type UserLoginRes

type UserLoginRes struct {
	Success     bool
	AccessToken string
}

UserLoginRes 用户登录请求响应

type UserLogoutReq

type UserLogoutReq struct {
	g.Meta `path:"/user/logout" method:"post" tags:"用户模型" summary:"用户退出登录"`
}

UserLogoutReq 用户退出登录请求

type UserLogoutRes

type UserLogoutRes struct {
	Success bool
}

UserLogoutRes 用户退出登录响应

type UserRegisterReq

type UserRegisterReq struct {
	g.Meta `path:"/user/register" method:"post" tags:"用户模型" summary:"注册"`
	UserBase
}

UserRegisterReq 新增

type UserRegisterRes

type UserRegisterRes struct {
	Id int `json:"id" dc:"id"`
}

Jump to

Keyboard shortcuts

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