model

package
v0.0.0-...-9077f62 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// 上下文变量存储键名
	ContextKey = "ContextKey"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatApiSetNameReq

type ChatApiSetNameReq struct {
	Name string `json:"type" v:"required|max-length:21#取一个响当当的名字吧|用户昵称最长为21字节"`
}

设置昵称请求

type ChatMsg

type ChatMsg struct {
	Type string      `json:"type" v:"required#消息类型不能为空"`
	Data interface{} `json:"data" v:""`
	From string      `json:"name" v:""`
}

Chat Msg 消息结构体

type Context

type Context struct {
	Session *ghttp.Session // 当前Session管理对象
	User    *ContextUser   // 上下文用户信息
}

请求上下文结构

type ContextUser

type ContextUser struct {
	Id       uint   // 用户ID
	Passport string // 用户账号
	Nickname string // 用户名称
}

请求上下文中的用户信息

type User

type User internal.User

User is the golang structure for table user.

type UserApiCheckNickNameReq

type UserApiCheckNickNameReq struct {
	Nickname string `v:"required#昵称不能为空"`
}

昵称唯一性检测请求参数,用于前后端交互参数格式约定

type UserApiCheckPassportReq

type UserApiCheckPassportReq struct {
	Passport string `v:"required#账号不能为空"`
}

账号唯一性检测请求参数,用于前后端交互参数格式约定

type UserApiSignInReq

type UserApiSignInReq struct {
	Passport string `v:"required#账号不能为空"`
	Password string `v:"required#密码不能为空"`
}

登录请求参数,用于前后端交互参数格式约定

type UserApiSignUpReq

type UserApiSignUpReq struct {
	Passport  string `v:"required|length:6,16#账号不能为空|账号长度应当在:min到:max之间"`
	Password  string `v:"required|length:6,16#请输入确认密码|密码长度应当在:min到:max之间"`
	Password2 string `v:"required|length:6,16|same:Password#密码不能为空|密码长度应当在:min到:max之间|两次密码输入不相等"`
	Nickname  string
}

注册请求参数,用于前后端交互参数格式约定

type UserServiceSignUpReq

type UserServiceSignUpReq struct {
	Passport string
	Password string
	Nickname string
}

注册输入参数

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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