params

package
v0.0.0-...-8edd1ee Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SigninReq

type SigninReq struct {
	// 用户名称
	Username string `json:"username" form:"username" binding:"required"`
	// 用户密码
	Password string `json:"password" form:"password" binding:"required"`
}

登陆请求

type SigninRsp

type SigninRsp struct {
	// 用户id
	UID uint `json:"uid" form:"uid" binding:"required"`
	// 用户令牌,后续请求都需要在header X-Token带上此token
	Token string `json:"token" form:"token" binding:"required"`
}

登陆响应

type SignupReq

type SignupReq struct {
	// 用户名称
	Username string `json:"username" form:"username" binding:"required"`
	// 用户密码
	Password string `json:"password" form:"password" binding:"required"`
}

注册请求

type UserInfoRsp

type UserInfoRsp struct {
	// 用户id
	UID uint `json:"uid"`
	// 用户名
	Name string `json:"name"`
	// 用户头像
	Avatar string `json:"avatar"`
}

获取用户信息响应

Jump to

Keyboard shortcuts

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