controller

package
v0.0.0-...-7cf99fd Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
}

func (*Controller) BindAndValid

func (c *Controller) BindAndValid(ctx *gin.Context, v interface{}) (bool, state.ValidErrors)

func (*Controller) JSON

func (c *Controller) JSON(ctx *gin.Context, args interface{})

type UserController

type UserController struct {
	Controller
}

func (*UserController) AuthByWechat

func (c *UserController) AuthByWechat(ctx *gin.Context)

RegisterByWechat @Summary 微信扫码注册/登录 @Description 微信扫码注册/登录,扫码成功后返回登录信息 @Tags 测试(v1) @Accept json @Produce json @Param param body request.RegisterByMobileRequest true "请求参数" @Success 200 {object} state.Error "" @Failure 400 {object} state.Error "" @Router /users/wechat [post]

func (*UserController) GetMemberById

func (c *UserController) GetMemberById(ctx *gin.Context)

GetMemberById @Summary 根据唯一编号获取用户信息 @Description 根据唯一编号获取用户信息 @Tags 测试(v1) @Accept json @Produce json @Param id path string true "用户唯一编号" @Success 200 {object} response.UserInfo "" @Failure 400 {object} state.Error "" @Router /users/{id} [get]

func (*UserController) LoginByAccount

func (c *UserController) LoginByAccount(ctx *gin.Context)

LoginByAccount @Summary 账号登录 @Description 根据用户名/电子邮箱/手机号和密码登录 @Tags 测试(v1) @Accept json @Produce json @Param param body request.LoginByAccountRequest true "请求参数" @Success 200 {object} response.LoginResponse "" @Failure 400 {object} state.Error "" @Router /users/ticket/account [post]

func (*UserController) LoginByToken

func (c *UserController) LoginByToken(ctx *gin.Context)

LoginByToken @Summary token登录 @Description token登录 @Tags 测试(v1) @Accept json @Produce json @Param Authorization header string true "请求参数" @Success 200 {object} response.LoginResponse "" @Failure 400 {object} state.Error "" @Router /users/ticket/token [post]

func (*UserController) RegisterByEmail

func (c *UserController) RegisterByEmail(ctx *gin.Context)

RegisterByEmail @Summary 账号注册(邮箱) @Description 根据电子邮箱注册账号 @Tags 测试(v1) @Accept json @Produce json @Param param body request.RegisterByEmailRequest true "请求参数" @Success 200 {object} state.Error "" @Failure 400 {object} state.Error "" @Router /users/register/email [post]

func (*UserController) RegisterByMobile

func (c *UserController) RegisterByMobile(ctx *gin.Context)

RegisterByMobile @Summary 账号注册(手机) @Description 根据手机号/短信验证码注册账号 @Tags 测试(v1) @Accept json @Produce json @Param param body request.RegisterByMobileRequest true "请求参数" @Success 200 {object} state.Error "" @Failure 400 {object} state.Error "" @Router /users/register/mobile [post]

func (*UserController) RegisterByUsername

func (c *UserController) RegisterByUsername(ctx *gin.Context)

RegisterByUsername @Summary 账号注册(用户名) @Description 根据用户名注册账号 @Tags 测试(v1) @Accept json @Produce json @Param param body request.RegisterByUsernameRequest true "请求参数" @Success 200 {object} state.Error "" @Failure 400 {object} state.Error "" @Router /users/register/username [post]

Jump to

Keyboard shortcuts

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