Documentation ¶
Overview ¶
Package pb is a generated protocol buffer package.
It is generated from these files:
pb.proto
It has these top-level messages:
TestPbREQ Player ChatRoom CreateChatRoomREQ CreateChatRoomACK JoinChatRoomREQ JoinChatRoomACK ChatRoomMsgREQ ChatRoomMsgACK
Index ¶
- Variables
- type ChatRoom
- func (*ChatRoom) Descriptor() ([]byte, []int)
- func (m *ChatRoom) GetCurNum() int32
- func (m *ChatRoom) GetMaxNum() int32
- func (m *ChatRoom) GetPlayerList() []*Player
- func (m *ChatRoom) GetRoomID() int32
- func (m *ChatRoom) GetTitle() string
- func (m *ChatRoom) Marshal() (dAtA []byte, err error)
- func (m *ChatRoom) MarshalTo(dAtA []byte) (int, error)
- func (*ChatRoom) ProtoMessage()
- func (m *ChatRoom) Reset()
- func (m *ChatRoom) Size() (n int)
- func (m *ChatRoom) String() string
- func (m *ChatRoom) Unmarshal(dAtA []byte) error
- type ChatRoomMsgACK
- func (*ChatRoomMsgACK) Descriptor() ([]byte, []int)
- func (m *ChatRoomMsgACK) GetContent() string
- func (m *ChatRoomMsgACK) GetResultCode() int32
- func (m *ChatRoomMsgACK) GetResultMsg() string
- func (m *ChatRoomMsgACK) GetRoomID() int32
- func (m *ChatRoomMsgACK) GetSendUID() int64
- func (m *ChatRoomMsgACK) Marshal() (dAtA []byte, err error)
- func (m *ChatRoomMsgACK) MarshalTo(dAtA []byte) (int, error)
- func (*ChatRoomMsgACK) ProtoMessage()
- func (m *ChatRoomMsgACK) Reset()
- func (m *ChatRoomMsgACK) Size() (n int)
- func (m *ChatRoomMsgACK) String() string
- func (m *ChatRoomMsgACK) Unmarshal(dAtA []byte) error
- type ChatRoomMsgREQ
- func (*ChatRoomMsgREQ) Descriptor() ([]byte, []int)
- func (m *ChatRoomMsgREQ) GetContent() string
- func (m *ChatRoomMsgREQ) GetRoomID() int32
- func (m *ChatRoomMsgREQ) Marshal() (dAtA []byte, err error)
- func (m *ChatRoomMsgREQ) MarshalTo(dAtA []byte) (int, error)
- func (*ChatRoomMsgREQ) ProtoMessage()
- func (m *ChatRoomMsgREQ) Reset()
- func (m *ChatRoomMsgREQ) Size() (n int)
- func (m *ChatRoomMsgREQ) String() string
- func (m *ChatRoomMsgREQ) Unmarshal(dAtA []byte) error
- type CreateChatRoomACK
- func (*CreateChatRoomACK) Descriptor() ([]byte, []int)
- func (m *CreateChatRoomACK) GetResultCode() int32
- func (m *CreateChatRoomACK) GetResultMsg() string
- func (m *CreateChatRoomACK) GetRoomInfo() *ChatRoom
- func (m *CreateChatRoomACK) Marshal() (dAtA []byte, err error)
- func (m *CreateChatRoomACK) MarshalTo(dAtA []byte) (int, error)
- func (*CreateChatRoomACK) ProtoMessage()
- func (m *CreateChatRoomACK) Reset()
- func (m *CreateChatRoomACK) Size() (n int)
- func (m *CreateChatRoomACK) String() string
- func (m *CreateChatRoomACK) Unmarshal(dAtA []byte) error
- type CreateChatRoomREQ
- func (*CreateChatRoomREQ) Descriptor() ([]byte, []int)
- func (m *CreateChatRoomREQ) GetTittle() string
- func (m *CreateChatRoomREQ) Marshal() (dAtA []byte, err error)
- func (m *CreateChatRoomREQ) MarshalTo(dAtA []byte) (int, error)
- func (*CreateChatRoomREQ) ProtoMessage()
- func (m *CreateChatRoomREQ) Reset()
- func (m *CreateChatRoomREQ) Size() (n int)
- func (m *CreateChatRoomREQ) String() string
- func (m *CreateChatRoomREQ) Unmarshal(dAtA []byte) error
- type JoinChatRoomACK
- func (*JoinChatRoomACK) Descriptor() ([]byte, []int)
- func (m *JoinChatRoomACK) GetResultCode() int32
- func (m *JoinChatRoomACK) GetResultMsg() string
- func (m *JoinChatRoomACK) GetRoomInfo() *ChatRoom
- func (m *JoinChatRoomACK) Marshal() (dAtA []byte, err error)
- func (m *JoinChatRoomACK) MarshalTo(dAtA []byte) (int, error)
- func (*JoinChatRoomACK) ProtoMessage()
- func (m *JoinChatRoomACK) Reset()
- func (m *JoinChatRoomACK) Size() (n int)
- func (m *JoinChatRoomACK) String() string
- func (m *JoinChatRoomACK) Unmarshal(dAtA []byte) error
- type JoinChatRoomREQ
- func (*JoinChatRoomREQ) Descriptor() ([]byte, []int)
- func (m *JoinChatRoomREQ) GetRoomID() int32
- func (m *JoinChatRoomREQ) Marshal() (dAtA []byte, err error)
- func (m *JoinChatRoomREQ) MarshalTo(dAtA []byte) (int, error)
- func (*JoinChatRoomREQ) ProtoMessage()
- func (m *JoinChatRoomREQ) Reset()
- func (m *JoinChatRoomREQ) Size() (n int)
- func (m *JoinChatRoomREQ) String() string
- func (m *JoinChatRoomREQ) Unmarshal(dAtA []byte) error
- type Player
- func (*Player) Descriptor() ([]byte, []int)
- func (m *Player) GetAvatar() string
- func (m *Player) GetName() string
- func (m *Player) GetUserID() int64
- func (m *Player) Marshal() (dAtA []byte, err error)
- func (m *Player) MarshalTo(dAtA []byte) (int, error)
- func (*Player) ProtoMessage()
- func (m *Player) Reset()
- func (m *Player) Size() (n int)
- func (m *Player) String() string
- func (m *Player) Unmarshal(dAtA []byte) error
- type TestPbREQ
- func (*TestPbREQ) Descriptor() ([]byte, []int)
- func (m *TestPbREQ) GetMsg() string
- func (m *TestPbREQ) GetValue() int32
- func (m *TestPbREQ) Marshal() (dAtA []byte, err error)
- func (m *TestPbREQ) MarshalTo(dAtA []byte) (int, error)
- func (*TestPbREQ) ProtoMessage()
- func (m *TestPbREQ) Reset()
- func (m *TestPbREQ) Size() (n int)
- func (m *TestPbREQ) String() string
- func (m *TestPbREQ) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthPb = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPb = fmt.Errorf("proto: integer overflow") )
Functions ¶
This section is empty.
Types ¶
type ChatRoom ¶
type ChatRoom struct { RoomID int32 `protobuf:"varint,1,opt,name=RoomID,proto3" json:"RoomID,omitempty"` Title string `protobuf:"bytes,2,opt,name=Title,proto3" json:"Title,omitempty"` CurNum int32 `protobuf:"varint,3,opt,name=CurNum,proto3" json:"CurNum,omitempty"` MaxNum int32 `protobuf:"varint,4,opt,name=MaxNum,proto3" json:"MaxNum,omitempty"` PlayerList []*Player `protobuf:"bytes,5,rep,name=PlayerList" json:"PlayerList,omitempty"` }
func (*ChatRoom) Descriptor ¶
func (*ChatRoom) GetPlayerList ¶
func (*ChatRoom) ProtoMessage ¶
func (*ChatRoom) ProtoMessage()
type ChatRoomMsgACK ¶
type ChatRoomMsgACK struct { ResultCode int32 `protobuf:"varint,1,opt,name=ResultCode,proto3" json:"ResultCode,omitempty"` ResultMsg string `protobuf:"bytes,2,opt,name=ResultMsg,proto3" json:"ResultMsg,omitempty"` RoomID int32 `protobuf:"varint,3,opt,name=RoomID,proto3" json:"RoomID,omitempty"` Content string `protobuf:"bytes,4,opt,name=Content,proto3" json:"Content,omitempty"` SendUID int64 `protobuf:"varint,5,opt,name=SendUID,proto3" json:"SendUID,omitempty"` }
聊天室发送内容ACK
func (*ChatRoomMsgACK) Descriptor ¶
func (*ChatRoomMsgACK) Descriptor() ([]byte, []int)
func (*ChatRoomMsgACK) GetContent ¶
func (m *ChatRoomMsgACK) GetContent() string
func (*ChatRoomMsgACK) GetResultCode ¶
func (m *ChatRoomMsgACK) GetResultCode() int32
func (*ChatRoomMsgACK) GetResultMsg ¶
func (m *ChatRoomMsgACK) GetResultMsg() string
func (*ChatRoomMsgACK) GetRoomID ¶
func (m *ChatRoomMsgACK) GetRoomID() int32
func (*ChatRoomMsgACK) GetSendUID ¶
func (m *ChatRoomMsgACK) GetSendUID() int64
func (*ChatRoomMsgACK) Marshal ¶
func (m *ChatRoomMsgACK) Marshal() (dAtA []byte, err error)
func (*ChatRoomMsgACK) ProtoMessage ¶
func (*ChatRoomMsgACK) ProtoMessage()
func (*ChatRoomMsgACK) Reset ¶
func (m *ChatRoomMsgACK) Reset()
func (*ChatRoomMsgACK) Size ¶
func (m *ChatRoomMsgACK) Size() (n int)
func (*ChatRoomMsgACK) String ¶
func (m *ChatRoomMsgACK) String() string
func (*ChatRoomMsgACK) Unmarshal ¶
func (m *ChatRoomMsgACK) Unmarshal(dAtA []byte) error
type ChatRoomMsgREQ ¶
type ChatRoomMsgREQ struct { RoomID int32 `protobuf:"varint,1,opt,name=RoomID,proto3" json:"RoomID,omitempty"` Content string `protobuf:"bytes,2,opt,name=Content,proto3" json:"Content,omitempty"` }
聊天室发送内容REQ
func (*ChatRoomMsgREQ) Descriptor ¶
func (*ChatRoomMsgREQ) Descriptor() ([]byte, []int)
func (*ChatRoomMsgREQ) GetContent ¶
func (m *ChatRoomMsgREQ) GetContent() string
func (*ChatRoomMsgREQ) GetRoomID ¶
func (m *ChatRoomMsgREQ) GetRoomID() int32
func (*ChatRoomMsgREQ) Marshal ¶
func (m *ChatRoomMsgREQ) Marshal() (dAtA []byte, err error)
func (*ChatRoomMsgREQ) ProtoMessage ¶
func (*ChatRoomMsgREQ) ProtoMessage()
func (*ChatRoomMsgREQ) Reset ¶
func (m *ChatRoomMsgREQ) Reset()
func (*ChatRoomMsgREQ) Size ¶
func (m *ChatRoomMsgREQ) Size() (n int)
func (*ChatRoomMsgREQ) String ¶
func (m *ChatRoomMsgREQ) String() string
func (*ChatRoomMsgREQ) Unmarshal ¶
func (m *ChatRoomMsgREQ) Unmarshal(dAtA []byte) error
type CreateChatRoomACK ¶
type CreateChatRoomACK struct { ResultCode int32 `protobuf:"varint,1,opt,name=ResultCode,proto3" json:"ResultCode,omitempty"` ResultMsg string `protobuf:"bytes,2,opt,name=ResultMsg,proto3" json:"ResultMsg,omitempty"` RoomInfo *ChatRoom `protobuf:"bytes,3,opt,name=RoomInfo" json:"RoomInfo,omitempty"` }
创建聊天室ACK
func (*CreateChatRoomACK) Descriptor ¶
func (*CreateChatRoomACK) Descriptor() ([]byte, []int)
func (*CreateChatRoomACK) GetResultCode ¶
func (m *CreateChatRoomACK) GetResultCode() int32
func (*CreateChatRoomACK) GetResultMsg ¶
func (m *CreateChatRoomACK) GetResultMsg() string
func (*CreateChatRoomACK) GetRoomInfo ¶
func (m *CreateChatRoomACK) GetRoomInfo() *ChatRoom
func (*CreateChatRoomACK) Marshal ¶
func (m *CreateChatRoomACK) Marshal() (dAtA []byte, err error)
func (*CreateChatRoomACK) MarshalTo ¶
func (m *CreateChatRoomACK) MarshalTo(dAtA []byte) (int, error)
func (*CreateChatRoomACK) ProtoMessage ¶
func (*CreateChatRoomACK) ProtoMessage()
func (*CreateChatRoomACK) Reset ¶
func (m *CreateChatRoomACK) Reset()
func (*CreateChatRoomACK) Size ¶
func (m *CreateChatRoomACK) Size() (n int)
func (*CreateChatRoomACK) String ¶
func (m *CreateChatRoomACK) String() string
func (*CreateChatRoomACK) Unmarshal ¶
func (m *CreateChatRoomACK) Unmarshal(dAtA []byte) error
type CreateChatRoomREQ ¶
type CreateChatRoomREQ struct {
Tittle string `protobuf:"bytes,1,opt,name=Tittle,proto3" json:"Tittle,omitempty"`
}
创建聊天室REQ
func (*CreateChatRoomREQ) Descriptor ¶
func (*CreateChatRoomREQ) Descriptor() ([]byte, []int)
func (*CreateChatRoomREQ) GetTittle ¶
func (m *CreateChatRoomREQ) GetTittle() string
func (*CreateChatRoomREQ) Marshal ¶
func (m *CreateChatRoomREQ) Marshal() (dAtA []byte, err error)
func (*CreateChatRoomREQ) MarshalTo ¶
func (m *CreateChatRoomREQ) MarshalTo(dAtA []byte) (int, error)
func (*CreateChatRoomREQ) ProtoMessage ¶
func (*CreateChatRoomREQ) ProtoMessage()
func (*CreateChatRoomREQ) Reset ¶
func (m *CreateChatRoomREQ) Reset()
func (*CreateChatRoomREQ) Size ¶
func (m *CreateChatRoomREQ) Size() (n int)
func (*CreateChatRoomREQ) String ¶
func (m *CreateChatRoomREQ) String() string
func (*CreateChatRoomREQ) Unmarshal ¶
func (m *CreateChatRoomREQ) Unmarshal(dAtA []byte) error
type JoinChatRoomACK ¶
type JoinChatRoomACK struct { ResultCode int32 `protobuf:"varint,1,opt,name=ResultCode,proto3" json:"ResultCode,omitempty"` ResultMsg string `protobuf:"bytes,2,opt,name=ResultMsg,proto3" json:"ResultMsg,omitempty"` RoomInfo *ChatRoom `protobuf:"bytes,3,opt,name=RoomInfo" json:"RoomInfo,omitempty"` }
加入聊天室ACK
func (*JoinChatRoomACK) Descriptor ¶
func (*JoinChatRoomACK) Descriptor() ([]byte, []int)
func (*JoinChatRoomACK) GetResultCode ¶
func (m *JoinChatRoomACK) GetResultCode() int32
func (*JoinChatRoomACK) GetResultMsg ¶
func (m *JoinChatRoomACK) GetResultMsg() string
func (*JoinChatRoomACK) GetRoomInfo ¶
func (m *JoinChatRoomACK) GetRoomInfo() *ChatRoom
func (*JoinChatRoomACK) Marshal ¶
func (m *JoinChatRoomACK) Marshal() (dAtA []byte, err error)
func (*JoinChatRoomACK) ProtoMessage ¶
func (*JoinChatRoomACK) ProtoMessage()
func (*JoinChatRoomACK) Reset ¶
func (m *JoinChatRoomACK) Reset()
func (*JoinChatRoomACK) Size ¶
func (m *JoinChatRoomACK) Size() (n int)
func (*JoinChatRoomACK) String ¶
func (m *JoinChatRoomACK) String() string
func (*JoinChatRoomACK) Unmarshal ¶
func (m *JoinChatRoomACK) Unmarshal(dAtA []byte) error
type JoinChatRoomREQ ¶
type JoinChatRoomREQ struct {
RoomID int32 `protobuf:"varint,1,opt,name=RoomID,proto3" json:"RoomID,omitempty"`
}
加入聊天室REQ
func (*JoinChatRoomREQ) Descriptor ¶
func (*JoinChatRoomREQ) Descriptor() ([]byte, []int)
func (*JoinChatRoomREQ) GetRoomID ¶
func (m *JoinChatRoomREQ) GetRoomID() int32
func (*JoinChatRoomREQ) Marshal ¶
func (m *JoinChatRoomREQ) Marshal() (dAtA []byte, err error)
func (*JoinChatRoomREQ) ProtoMessage ¶
func (*JoinChatRoomREQ) ProtoMessage()
func (*JoinChatRoomREQ) Reset ¶
func (m *JoinChatRoomREQ) Reset()
func (*JoinChatRoomREQ) Size ¶
func (m *JoinChatRoomREQ) Size() (n int)
func (*JoinChatRoomREQ) String ¶
func (m *JoinChatRoomREQ) String() string
func (*JoinChatRoomREQ) Unmarshal ¶
func (m *JoinChatRoomREQ) Unmarshal(dAtA []byte) error
type Player ¶
type Player struct { UserID int64 `protobuf:"varint,1,opt,name=UserID,proto3" json:"UserID,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` Avatar string `protobuf:"bytes,3,opt,name=Avatar,proto3" json:"Avatar,omitempty"` }
func (*Player) Descriptor ¶
func (*Player) ProtoMessage ¶
func (*Player) ProtoMessage()
type TestPbREQ ¶
type TestPbREQ struct { Msg string `protobuf:"bytes,1,opt,name=Msg,proto3" json:"Msg,omitempty"` Value int32 `protobuf:"varint,2,opt,name=Value,proto3" json:"Value,omitempty"` }
benchmark测试
func (*TestPbREQ) Descriptor ¶
func (*TestPbREQ) ProtoMessage ¶
func (*TestPbREQ) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.