Documentation ¶
Index ¶
Constants ¶
View Source
const ( LoginMesType = "LoginMes" LoginResMesType = "LoginResMes" RegisterMesType = "RegisterMes" RegisterResMesType = "RegisterResMes" NotifyUserStatusMesType = "NotifyUserStatusMes" SmsMesType = "SmsMes" )
View Source
const ( UserOnline = iota UserOffline UserBusyStatus )
这里我们定义几个用户状态的常量
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoginResMes ¶
type NotifyUserStatusMes ¶
type NotifyUserStatusMes struct { UserId int `json:"userId"` //用户id Status int `json:"status"` //用户的状态 }
为了配合服务器端推送用户状态变化的消息
type RegisterMes ¶
type RegisterMes struct {
User User `json:"user"` //类型就是User结构体.
}
type RegisterResMes ¶
Click to show internal directories.
Click to hide internal directories.