proto

package
v0.0.0-...-4e35581 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2019 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckAuthRequest

type CheckAuthRequest struct {
	AuthToken string
}

CheckAuthRequest ...

type CheckAuthResponse

type CheckAuthResponse struct {
	Code     int
	UserID   int
	UserName string
}

CheckAuthResponse ...

type ConnectReply

type ConnectReply struct {
	UserID int
}

ConnectReply ...

type ConnectRequest

type ConnectRequest struct {
	AuthToken string `json:"authToken"`
	RoomID    int    `json:"roomId"`
	ServerID  int    `json:"serverId"`
}

ConnectRequest ...

type DisConnectReply

type DisConnectReply struct {
	Has bool
}

DisConnectReply ...

type DisConnectRequest

type DisConnectRequest struct {
	RoomID int
	UserID int
}

DisConnectRequest ...

type GetUserInfoRequest

type GetUserInfoRequest struct {
	UserID int
}

GetUserInfoRequest ...

type GetUserInfoResponse

type GetUserInfoResponse struct {
	Code     int
	UserID   int
	UserName string
}

GetUserInfoResponse ...

type LoginRequest

type LoginRequest struct {
	Name     string
	Password string
}

LoginRequest ...

type LoginResponse

type LoginResponse struct {
	Code      int
	AuthToken string
}

LoginResponse ...

type LogoutRequest

type LogoutRequest struct {
	AuthToken string
}

LogoutRequest ...

type LogoutResponse

type LogoutResponse struct {
	Code int
}

LogoutResponse ...

type Msg

type Msg struct {
	Ver       int    `json:"ver"`  // protocol version
	Operation int    `json:"op"`   // operation for request
	SeqID     string `json:"seq"`  // sequence number chosen by client
	Body      []byte `json:"body"` // binary body bytes
}

Msg ...

type PushMsgRequest

type PushMsgRequest struct {
	UserID int
	Msg    Msg
}

PushMsgRequest ...

type PushRoomCountRequest

type PushRoomCountRequest struct {
	RoomID int
	Count  int
}

PushRoomCountRequest ...

type PushRoomMsgRequest

type PushRoomMsgRequest struct {
	RoomID int
	Msg    Msg
}

PushRoomMsgRequest ...

type RedisMsg

type RedisMsg struct {
	Op           int               `json:"op"`
	ServerID     int               `json:"serverId,omitempty"`
	RoomID       int               `json:"roomId,omitempty"`
	UserID       int               `json:"userId,omitempty"`
	Msg          []byte            `json:"msg"`
	Count        int               `json:"count"`
	RoomUserInfo map[string]string `json:"roomUserInfo"`
}

RedisMsg ...

type RedisRoomCountMsg

type RedisRoomCountMsg struct {
	Count int `json:"count,omitempty"`
	Op    int `json:"op"`
}

RedisRoomCountMsg ...

type RedisRoomInfo

type RedisRoomInfo struct {
	Op           int               `json:"op"`
	RoomID       int               `json:"roomId,omitempty"`
	Count        int               `json:"count,omitempty"`
	RoomUserInfo map[string]string `json:"roomUserInfo"`
}

RedisRoomInfo ...

type RegisterReply

type RegisterReply struct {
	Code      int
	AuthToken string
}

RegisterReply ...

type RegisterRequest

type RegisterRequest struct {
	Name     string
	Password string
}

RegisterRequest ...

type Send

type Send struct {
	Code         int    `json:"code"`
	Msg          string `json:"msg"`
	FromUserID   int    `json:"fromUserId"`
	FromUserName string `json:"fromUserName"`
	ToUserID     int    `json:"toUserId"`
	ToUserName   string `json:"toUserName"`
	RoomID       int    `json:"roomId"`
	Op           int    `json:"op"`
	CreateTime   string `json:"createTime"`
}

Send ...

type SuccessReply

type SuccessReply struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
}

SuccessReply ...

Jump to

Keyboard shortcuts

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