Documentation ¶
Index ¶
- Constants
- func AddFriend(w http.ResponseWriter, r *http.Request)
- func Chat(w http.ResponseWriter, r *http.Request)
- func Community(w http.ResponseWriter, r *http.Request)
- func LoadFriends(w http.ResponseWriter, r *http.Request)
- func Login(w http.ResponseWriter, r *http.Request)
- func Register(w http.ResponseWriter, r *http.Request)
- type Message
- type Node
Constants ¶
View Source
const ( CMD_SINGLE_MSG = 10 CMD_ROOM_MSG = 11 CMD_HEART = 0 )
Variables ¶
This section is empty.
Functions ¶
func LoadFriends ¶
func LoadFriends(w http.ResponseWriter, r *http.Request)
func Login ¶
func Login(w http.ResponseWriter, r *http.Request)
测试 curl http://127.0.0.1:8080/user/login -X POST -d "mobile=10000&passwd=111111"
func Register ¶
func Register(w http.ResponseWriter, r *http.Request)
测试 curl http://127.0.0.1:8080/user/register -X POST -d "mobile=10000&passwd=111111"
Types ¶
type Message ¶
type Message struct { Id int64 `json:"id,omitempty" form:"id"` //消息ID Userid int64 `json:"userid,omitempty" form:"userid"` //谁发的 Cmd int `json:"cmd,omitempty" form:"cmd"` //群聊还是私聊 Dstid int64 `json:"dstid,omitempty" form:"dstid"` //对端用户ID/群ID Media int `json:"media,omitempty" form:"media"` //消息按照什么样式展示 Content string `json:"content,omitempty" form:"content"` //消息的内容 Pic string `json:"pic,omitempty" form:"pic"` //预览图片 Url string `json:"url,omitempty" form:"url"` //服务的URL Memo string `json:"memo,omitempty" form:"memo"` //简单描述 Amount int `json:"amount,omitempty" form:"amount"` //其他和数字相关的 }
Click to show internal directories.
Click to hide internal directories.