Documentation
¶
Overview ¶
Package goChat is a generated protocol buffer package.
It is generated from these files:
services.proto
It has these top-level messages:
Empty ChatMessage ClientInfo GroupInfo GroupList ClientList
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterChatServer ¶
func RegisterChatServer(s *grpc.Server, srv ChatServer)
Types ¶
type ChatClient ¶
type ChatClient interface { RouteChat(ctx context.Context, opts ...grpc.CallOption) (Chat_RouteChatClient, error) UnRegister(ctx context.Context, in *ClientInfo, opts ...grpc.CallOption) (*Empty, error) Register(ctx context.Context, in *ClientInfo, opts ...grpc.CallOption) (*Empty, error) CreateGroup(ctx context.Context, in *GroupInfo, opts ...grpc.CallOption) (*Empty, error) JoinGroup(ctx context.Context, in *GroupInfo, opts ...grpc.CallOption) (*Empty, error) GetGroupList(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GroupList, error) GetGroupClientList(ctx context.Context, in *GroupInfo, opts ...grpc.CallOption) (*ClientList, error) GetClientList(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ClientList, error) LeaveRoom(ctx context.Context, in *GroupInfo, opts ...grpc.CallOption) (*Empty, error) }
func NewChatClient ¶
func NewChatClient(cc *grpc.ClientConn) ChatClient
type ChatMessage ¶
type ChatMessage struct { Sender string `protobuf:"bytes,1,opt,name=sender" json:"sender,omitempty"` Receiver string `protobuf:"bytes,2,opt,name=receiver" json:"receiver,omitempty"` Message string `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"` }
func (*ChatMessage) Descriptor ¶
func (*ChatMessage) Descriptor() ([]byte, []int)
func (*ChatMessage) GetMessage ¶
func (m *ChatMessage) GetMessage() string
func (*ChatMessage) GetReceiver ¶
func (m *ChatMessage) GetReceiver() string
func (*ChatMessage) GetSender ¶
func (m *ChatMessage) GetSender() string
func (*ChatMessage) ProtoMessage ¶
func (*ChatMessage) ProtoMessage()
func (*ChatMessage) Reset ¶
func (m *ChatMessage) Reset()
func (*ChatMessage) String ¶
func (m *ChatMessage) String() string
type ChatServer ¶
type ChatServer interface { RouteChat(Chat_RouteChatServer) error UnRegister(context.Context, *ClientInfo) (*Empty, error) Register(context.Context, *ClientInfo) (*Empty, error) CreateGroup(context.Context, *GroupInfo) (*Empty, error) JoinGroup(context.Context, *GroupInfo) (*Empty, error) GetGroupList(context.Context, *Empty) (*GroupList, error) GetGroupClientList(context.Context, *GroupInfo) (*ClientList, error) GetClientList(context.Context, *Empty) (*ClientList, error) LeaveRoom(context.Context, *GroupInfo) (*Empty, error) }
type Chat_RouteChatClient ¶
type Chat_RouteChatClient interface { Send(*ChatMessage) error Recv() (*ChatMessage, error) grpc.ClientStream }
type Chat_RouteChatServer ¶
type Chat_RouteChatServer interface { Send(*ChatMessage) error Recv() (*ChatMessage, error) grpc.ServerStream }
type ClientInfo ¶
type ClientInfo struct {
Sender string `protobuf:"bytes,1,opt,name=sender" json:"sender,omitempty"`
}
func (*ClientInfo) Descriptor ¶
func (*ClientInfo) Descriptor() ([]byte, []int)
func (*ClientInfo) GetSender ¶
func (m *ClientInfo) GetSender() string
func (*ClientInfo) ProtoMessage ¶
func (*ClientInfo) ProtoMessage()
func (*ClientInfo) Reset ¶
func (m *ClientInfo) Reset()
func (*ClientInfo) String ¶
func (m *ClientInfo) String() string
type ClientList ¶
type ClientList struct {
Clients []string `protobuf:"bytes,1,rep,name=clients" json:"clients,omitempty"`
}
func (*ClientList) Descriptor ¶
func (*ClientList) Descriptor() ([]byte, []int)
func (*ClientList) GetClients ¶
func (m *ClientList) GetClients() []string
func (*ClientList) ProtoMessage ¶
func (*ClientList) ProtoMessage()
func (*ClientList) Reset ¶
func (m *ClientList) Reset()
func (*ClientList) String ¶
func (m *ClientList) String() string
type Empty ¶
type Empty struct { }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
type GroupInfo ¶
type GroupInfo struct { Client string `protobuf:"bytes,1,opt,name=client" json:"client,omitempty"` GroupName string `protobuf:"bytes,2,opt,name=groupName" json:"groupName,omitempty"` }
func (*GroupInfo) Descriptor ¶
func (*GroupInfo) GetGroupName ¶
func (*GroupInfo) ProtoMessage ¶
func (*GroupInfo) ProtoMessage()
type GroupList ¶
type GroupList struct {
Groups []string `protobuf:"bytes,1,rep,name=groups" json:"groups,omitempty"`
}
func (*GroupList) Descriptor ¶
func (*GroupList) ProtoMessage ¶
func (*GroupList) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.