proto

package
v0.0.0-...-5e1d9b1 Latest Latest
Warning

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

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

Documentation

Overview

*

  • Created by lock
  • Date: 2019-08-10
  • Time: 18:00

*

  • Created by lock
  • Date: 2019-08-10
  • Time: 18:38

*

  • Created by lock
  • Date: 2019-08-12
  • Time: 19:23

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckAuthRequest

type CheckAuthRequest struct {
	AuthToken string
}

type CheckAuthResponse

type CheckAuthResponse struct {
	Code     int
	UserId   int
	UserName string
}

type ConnectReply

type ConnectReply struct {
	UserId int
}

type ConnectRequest

type ConnectRequest struct {
	AuthToken string `json:"authToken"`
	RoomId    int    `json:"roomId"`
	ServerId  string `json:"serverId"`
}

type DisConnectReply

type DisConnectReply struct {
	Has bool
}

type DisConnectRequest

type DisConnectRequest struct {
	RoomId int
	UserId int
}

type GetUserInfoRequest

type GetUserInfoRequest struct {
	UserId int
}

type GetUserInfoResponse

type GetUserInfoResponse struct {
	Code     int
	UserId   int
	UserName string
}

type LoginRequest

type LoginRequest struct {
	Name     string
	Password string
}

type LoginResponse

type LoginResponse struct {
	Code      int
	AuthToken string
}

type LogoutRequest

type LogoutRequest struct {
	AuthToken string
}

type LogoutResponse

type LogoutResponse struct {
	Code int
}

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
}

type PushMsgRequest

type PushMsgRequest struct {
	UserId int
	Msg    Msg
}

type PushRoomCountRequest

type PushRoomCountRequest struct {
	RoomId int
	Count  int
}

type PushRoomMsgRequest

type PushRoomMsgRequest struct {
	RoomId int
	Msg    Msg
}

type RedisMsg

type RedisMsg struct {
	Op           int               `json:"op"`
	ServerId     string            `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"`
}

type RedisRoomCountMsg

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

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"`
}

type RegisterReply

type RegisterReply struct {
	Code      int
	AuthToken string
}

type RegisterRequest

type RegisterRequest struct {
	Name     string
	Password string
}

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"`
}

type SendTcp

type SendTcp 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"`
	AuthToken    string `json:"authToken"` //仅tcp时使用,发送msg时带上
}

type SuccessReply

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

Jump to

Keyboard shortcuts

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