Documentation
¶
Index ¶
- Variables
- func RegisterChatServiceServer(s *grpc.Server, srv ChatServiceServer)
- type ChatServiceClient
- type ChatServiceServer
- type ChatService_SubscribeClient
- type ChatService_SubscribeServer
- type EmptyResponse
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetChannelId() string
- func (x *Message) GetMessage() string
- func (x *Message) GetMessageId() string
- func (x *Message) GetTimestamp() *timestamp.Timestamp
- func (x *Message) GetUserId() string
- func (x *Message) GetWorkspaceId() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type PostMessageRequest
- func (*PostMessageRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PostMessageRequest) GetMessage() *Message
- func (x *PostMessageRequest) GetToken() string
- func (*PostMessageRequest) ProtoMessage()
- func (x *PostMessageRequest) ProtoReflect() protoreflect.Message
- func (x *PostMessageRequest) Reset()
- func (x *PostMessageRequest) String() string
- type SubscribeRequest
- func (*SubscribeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubscribeRequest) GetToken() string
- func (x *SubscribeRequest) GetWorkspaceId() string
- func (*SubscribeRequest) ProtoMessage()
- func (x *SubscribeRequest) ProtoReflect() protoreflect.Message
- func (x *SubscribeRequest) Reset()
- func (x *SubscribeRequest) String() string
- type SubscribeResponse
- type UnimplementedChatServiceServer
- func (*UnimplementedChatServiceServer) PostMessage(context.Context, *PostMessageRequest) (*EmptyResponse, error)
- func (*UnimplementedChatServiceServer) Subscribe(*SubscribeRequest, ChatService_SubscribeServer) error
- func (*UnimplementedChatServiceServer) UpdateMessage(context.Context, *UpdateMessageRequest) (*EmptyResponse, error)
- type UpdateMessageRequest
- func (*UpdateMessageRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateMessageRequest) GetNewMessage() *Message
- func (*UpdateMessageRequest) ProtoMessage()
- func (x *UpdateMessageRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateMessageRequest) Reset()
- func (x *UpdateMessageRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var File_protos_chatpb_chat_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterChatServiceServer ¶
func RegisterChatServiceServer(s *grpc.Server, srv ChatServiceServer)
Types ¶
type ChatServiceClient ¶
type ChatServiceClient interface { PostMessage(ctx context.Context, in *PostMessageRequest, opts ...grpc.CallOption) (*EmptyResponse, error) UpdateMessage(ctx context.Context, in *UpdateMessageRequest, opts ...grpc.CallOption) (*EmptyResponse, error) // only server stream is supported in grpc web // (https://github.com/grpc/grpc-web#wire-format-mode) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (ChatService_SubscribeClient, error) }
ChatServiceClient is the client API for ChatService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewChatServiceClient ¶
func NewChatServiceClient(cc grpc.ClientConnInterface) ChatServiceClient
type ChatServiceServer ¶
type ChatServiceServer interface { PostMessage(context.Context, *PostMessageRequest) (*EmptyResponse, error) UpdateMessage(context.Context, *UpdateMessageRequest) (*EmptyResponse, error) // only server stream is supported in grpc web // (https://github.com/grpc/grpc-web#wire-format-mode) Subscribe(*SubscribeRequest, ChatService_SubscribeServer) error }
ChatServiceServer is the server API for ChatService service.
type ChatService_SubscribeClient ¶
type ChatService_SubscribeClient interface { Recv() (*SubscribeResponse, error) grpc.ClientStream }
type ChatService_SubscribeServer ¶
type ChatService_SubscribeServer interface { Send(*SubscribeResponse) error grpc.ServerStream }
type EmptyResponse ¶
type EmptyResponse struct {
// contains filtered or unexported fields
}
func (*EmptyResponse) Descriptor
deprecated
func (*EmptyResponse) Descriptor() ([]byte, []int)
Deprecated: Use EmptyResponse.ProtoReflect.Descriptor instead.
func (*EmptyResponse) ProtoMessage ¶
func (*EmptyResponse) ProtoMessage()
func (*EmptyResponse) ProtoReflect ¶
func (x *EmptyResponse) ProtoReflect() protoreflect.Message
func (*EmptyResponse) Reset ¶
func (x *EmptyResponse) Reset()
func (*EmptyResponse) String ¶
func (x *EmptyResponse) String() string
type Message ¶
type Message struct { MessageId string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` WorkspaceId string `protobuf:"bytes,3,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` ChannelId string `protobuf:"bytes,4,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"` Timestamp *timestamp.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) GetChannelId ¶
func (*Message) GetMessage ¶
func (*Message) GetMessageId ¶
func (*Message) GetTimestamp ¶
func (*Message) GetWorkspaceId ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type PostMessageRequest ¶
type PostMessageRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` Message *Message `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*PostMessageRequest) Descriptor
deprecated
func (*PostMessageRequest) Descriptor() ([]byte, []int)
Deprecated: Use PostMessageRequest.ProtoReflect.Descriptor instead.
func (*PostMessageRequest) GetMessage ¶
func (x *PostMessageRequest) GetMessage() *Message
func (*PostMessageRequest) GetToken ¶
func (x *PostMessageRequest) GetToken() string
func (*PostMessageRequest) ProtoMessage ¶
func (*PostMessageRequest) ProtoMessage()
func (*PostMessageRequest) ProtoReflect ¶
func (x *PostMessageRequest) ProtoReflect() protoreflect.Message
func (*PostMessageRequest) Reset ¶
func (x *PostMessageRequest) Reset()
func (*PostMessageRequest) String ¶
func (x *PostMessageRequest) String() string
type SubscribeRequest ¶
type SubscribeRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` WorkspaceId string `protobuf:"bytes,2,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` // contains filtered or unexported fields }
func (*SubscribeRequest) Descriptor
deprecated
func (*SubscribeRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.
func (*SubscribeRequest) GetToken ¶
func (x *SubscribeRequest) GetToken() string
func (*SubscribeRequest) GetWorkspaceId ¶
func (x *SubscribeRequest) GetWorkspaceId() string
func (*SubscribeRequest) ProtoMessage ¶
func (*SubscribeRequest) ProtoMessage()
func (*SubscribeRequest) ProtoReflect ¶
func (x *SubscribeRequest) ProtoReflect() protoreflect.Message
func (*SubscribeRequest) Reset ¶
func (x *SubscribeRequest) Reset()
func (*SubscribeRequest) String ¶
func (x *SubscribeRequest) String() string
type SubscribeResponse ¶
type SubscribeResponse struct { Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*SubscribeResponse) Descriptor
deprecated
func (*SubscribeResponse) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead.
func (*SubscribeResponse) GetMessage ¶
func (x *SubscribeResponse) GetMessage() *Message
func (*SubscribeResponse) ProtoMessage ¶
func (*SubscribeResponse) ProtoMessage()
func (*SubscribeResponse) ProtoReflect ¶
func (x *SubscribeResponse) ProtoReflect() protoreflect.Message
func (*SubscribeResponse) Reset ¶
func (x *SubscribeResponse) Reset()
func (*SubscribeResponse) String ¶
func (x *SubscribeResponse) String() string
type UnimplementedChatServiceServer ¶
type UnimplementedChatServiceServer struct { }
UnimplementedChatServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedChatServiceServer) PostMessage ¶
func (*UnimplementedChatServiceServer) PostMessage(context.Context, *PostMessageRequest) (*EmptyResponse, error)
func (*UnimplementedChatServiceServer) Subscribe ¶
func (*UnimplementedChatServiceServer) Subscribe(*SubscribeRequest, ChatService_SubscribeServer) error
func (*UnimplementedChatServiceServer) UpdateMessage ¶
func (*UnimplementedChatServiceServer) UpdateMessage(context.Context, *UpdateMessageRequest) (*EmptyResponse, error)
type UpdateMessageRequest ¶
type UpdateMessageRequest struct { // message_id is the primary key NewMessage *Message `protobuf:"bytes,1,opt,name=new_message,json=newMessage,proto3" json:"new_message,omitempty"` // contains filtered or unexported fields }
func (*UpdateMessageRequest) Descriptor
deprecated
func (*UpdateMessageRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateMessageRequest.ProtoReflect.Descriptor instead.
func (*UpdateMessageRequest) GetNewMessage ¶
func (x *UpdateMessageRequest) GetNewMessage() *Message
func (*UpdateMessageRequest) ProtoMessage ¶
func (*UpdateMessageRequest) ProtoMessage()
func (*UpdateMessageRequest) ProtoReflect ¶
func (x *UpdateMessageRequest) ProtoReflect() protoreflect.Message
func (*UpdateMessageRequest) Reset ¶
func (x *UpdateMessageRequest) Reset()
func (*UpdateMessageRequest) String ¶
func (x *UpdateMessageRequest) String() string