Documentation ¶
Index ¶
- Variables
- func RegisterChatV1Server(s grpc.ServiceRegistrar, srv ChatV1Server)
- type Chat
- func (*Chat) Descriptor() ([]byte, []int)deprecated
- func (x *Chat) GetCreated() *timestamppb.Timestamp
- func (x *Chat) GetID() int64
- func (x *Chat) GetTitle() string
- func (x *Chat) GetUpdated() *timestamppb.Timestamp
- func (*Chat) ProtoMessage()
- func (x *Chat) ProtoReflect() protoreflect.Message
- func (x *Chat) Reset()
- func (x *Chat) String() string
- type ChatMessage
- func (*ChatMessage) Descriptor() ([]byte, []int)deprecated
- func (x *ChatMessage) GetAuthor() string
- func (x *ChatMessage) GetChatID() int64
- func (x *ChatMessage) GetContent() string
- func (x *ChatMessage) GetCreated() *timestamppb.Timestamp
- func (x *ChatMessage) GetID() int64
- func (x *ChatMessage) GetUpdated() *timestamppb.Timestamp
- func (*ChatMessage) ProtoMessage()
- func (x *ChatMessage) ProtoReflect() protoreflect.Message
- func (x *ChatMessage) Reset()
- func (x *ChatMessage) String() string
- type ChatV1Client
- type ChatV1Server
- type ChatV1_ConnectChatClient
- type ChatV1_ConnectChatServer
- type ConnectChatRequest
- func (*ConnectChatRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ConnectChatRequest) GetChatId() int64
- func (*ConnectChatRequest) ProtoMessage()
- func (x *ConnectChatRequest) ProtoReflect() protoreflect.Message
- func (x *ConnectChatRequest) Reset()
- func (x *ConnectChatRequest) String() string
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetTitle() string
- func (x *CreateRequest) GetUsernames() []string
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type CreateResponse
- type DeleteRequest
- type GetAvailableChatsRequest
- func (*GetAvailableChatsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAvailableChatsRequest) GetPage() int64
- func (x *GetAvailableChatsRequest) GetPageSize() int64
- func (*GetAvailableChatsRequest) ProtoMessage()
- func (x *GetAvailableChatsRequest) ProtoReflect() protoreflect.Message
- func (x *GetAvailableChatsRequest) Reset()
- func (x *GetAvailableChatsRequest) String() string
- type GetAvailableChatsResponse
- func (*GetAvailableChatsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAvailableChatsResponse) GetChats() []*Chat
- func (x *GetAvailableChatsResponse) GetCount() uint64
- func (*GetAvailableChatsResponse) ProtoMessage()
- func (x *GetAvailableChatsResponse) ProtoReflect() protoreflect.Message
- func (x *GetAvailableChatsResponse) Reset()
- func (x *GetAvailableChatsResponse) String() string
- type GetChatMessagesRequest
- func (*GetChatMessagesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetChatMessagesRequest) GetId() int64
- func (x *GetChatMessagesRequest) GetPage() int64
- func (x *GetChatMessagesRequest) GetPageSize() int64
- func (*GetChatMessagesRequest) ProtoMessage()
- func (x *GetChatMessagesRequest) ProtoReflect() protoreflect.Message
- func (x *GetChatMessagesRequest) Reset()
- func (x *GetChatMessagesRequest) String() string
- type GetChatMessagesResponse
- func (*GetChatMessagesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetChatMessagesResponse) GetCount() uint64
- func (x *GetChatMessagesResponse) GetMessages() []*ChatMessage
- func (*GetChatMessagesResponse) ProtoMessage()
- func (x *GetChatMessagesResponse) ProtoReflect() protoreflect.Message
- func (x *GetChatMessagesResponse) Reset()
- func (x *GetChatMessagesResponse) String() string
- type SendMessageRequest
- func (*SendMessageRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendMessageRequest) GetChatID() int64
- func (x *SendMessageRequest) GetText() string
- func (x *SendMessageRequest) GetTimestamp() *timestamppb.Timestamp
- func (*SendMessageRequest) ProtoMessage()
- func (x *SendMessageRequest) ProtoReflect() protoreflect.Message
- func (x *SendMessageRequest) Reset()
- func (x *SendMessageRequest) String() string
- type UnimplementedChatV1Server
- func (UnimplementedChatV1Server) ConnectChat(*ConnectChatRequest, ChatV1_ConnectChatServer) error
- func (UnimplementedChatV1Server) Create(context.Context, *CreateRequest) (*CreateResponse, error)
- func (UnimplementedChatV1Server) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
- func (UnimplementedChatV1Server) GetAvailableChats(context.Context, *GetAvailableChatsRequest) (*GetAvailableChatsResponse, error)
- func (UnimplementedChatV1Server) GetChatMessages(context.Context, *GetChatMessagesRequest) (*GetChatMessagesResponse, error)
- func (UnimplementedChatV1Server) SendMessage(context.Context, *SendMessageRequest) (*emptypb.Empty, error)
- type UnsafeChatV1Server
Constants ¶
This section is empty.
Variables ¶
var ChatV1_ServiceDesc = grpc.ServiceDesc{ ServiceName: "chat_v1.ChatV1", HandlerType: (*ChatV1Server)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _ChatV1_Create_Handler, }, { MethodName: "Delete", Handler: _ChatV1_Delete_Handler, }, { MethodName: "SendMessage", Handler: _ChatV1_SendMessage_Handler, }, { MethodName: "GetChatMessages", Handler: _ChatV1_GetChatMessages_Handler, }, { MethodName: "GetAvailableChats", Handler: _ChatV1_GetAvailableChats_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ConnectChat", Handler: _ChatV1_ConnectChat_Handler, ServerStreams: true, }, }, Metadata: "chat.proto", }
ChatV1_ServiceDesc is the grpc.ServiceDesc for ChatV1 service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_chat_proto protoreflect.FileDescriptor
Functions ¶
func RegisterChatV1Server ¶
func RegisterChatV1Server(s grpc.ServiceRegistrar, srv ChatV1Server)
Types ¶
type Chat ¶
type Chat struct { ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` Title string `protobuf:"bytes,2,opt,name=Title,proto3" json:"Title,omitempty"` Created *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created,proto3" json:"created,omitempty"` Updated *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated,proto3" json:"updated,omitempty"` // contains filtered or unexported fields }
func (*Chat) Descriptor
deprecated
func (*Chat) GetCreated ¶
func (x *Chat) GetCreated() *timestamppb.Timestamp
func (*Chat) GetUpdated ¶
func (x *Chat) GetUpdated() *timestamppb.Timestamp
func (*Chat) ProtoMessage ¶
func (*Chat) ProtoMessage()
func (*Chat) ProtoReflect ¶
func (x *Chat) ProtoReflect() protoreflect.Message
type ChatMessage ¶
type ChatMessage struct { ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` ChatID int64 `protobuf:"varint,2,opt,name=chatID,proto3" json:"chatID,omitempty"` Author string `protobuf:"bytes,3,opt,name=author,proto3" json:"author,omitempty"` Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` Created *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created,proto3" json:"created,omitempty"` Updated *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated,proto3" json:"updated,omitempty"` // contains filtered or unexported fields }
func (*ChatMessage) Descriptor
deprecated
func (*ChatMessage) Descriptor() ([]byte, []int)
Deprecated: Use ChatMessage.ProtoReflect.Descriptor instead.
func (*ChatMessage) GetAuthor ¶
func (x *ChatMessage) GetAuthor() string
func (*ChatMessage) GetChatID ¶
func (x *ChatMessage) GetChatID() int64
func (*ChatMessage) GetContent ¶
func (x *ChatMessage) GetContent() string
func (*ChatMessage) GetCreated ¶
func (x *ChatMessage) GetCreated() *timestamppb.Timestamp
func (*ChatMessage) GetID ¶
func (x *ChatMessage) GetID() int64
func (*ChatMessage) GetUpdated ¶
func (x *ChatMessage) GetUpdated() *timestamppb.Timestamp
func (*ChatMessage) ProtoMessage ¶
func (*ChatMessage) ProtoMessage()
func (*ChatMessage) ProtoReflect ¶
func (x *ChatMessage) ProtoReflect() protoreflect.Message
func (*ChatMessage) Reset ¶
func (x *ChatMessage) Reset()
func (*ChatMessage) String ¶
func (x *ChatMessage) String() string
type ChatV1Client ¶
type ChatV1Client interface { Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) SendMessage(ctx context.Context, in *SendMessageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) GetChatMessages(ctx context.Context, in *GetChatMessagesRequest, opts ...grpc.CallOption) (*GetChatMessagesResponse, error) GetAvailableChats(ctx context.Context, in *GetAvailableChatsRequest, opts ...grpc.CallOption) (*GetAvailableChatsResponse, error) ConnectChat(ctx context.Context, in *ConnectChatRequest, opts ...grpc.CallOption) (ChatV1_ConnectChatClient, error) }
ChatV1Client is the client API for ChatV1 service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewChatV1Client ¶
func NewChatV1Client(cc grpc.ClientConnInterface) ChatV1Client
type ChatV1Server ¶
type ChatV1Server interface { Create(context.Context, *CreateRequest) (*CreateResponse, error) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error) SendMessage(context.Context, *SendMessageRequest) (*emptypb.Empty, error) GetChatMessages(context.Context, *GetChatMessagesRequest) (*GetChatMessagesResponse, error) GetAvailableChats(context.Context, *GetAvailableChatsRequest) (*GetAvailableChatsResponse, error) ConnectChat(*ConnectChatRequest, ChatV1_ConnectChatServer) error // contains filtered or unexported methods }
ChatV1Server is the server API for ChatV1 service. All implementations must embed UnimplementedChatV1Server for forward compatibility
type ChatV1_ConnectChatClient ¶
type ChatV1_ConnectChatClient interface { Recv() (*ChatMessage, error) grpc.ClientStream }
type ChatV1_ConnectChatServer ¶
type ChatV1_ConnectChatServer interface { Send(*ChatMessage) error grpc.ServerStream }
type ConnectChatRequest ¶
type ConnectChatRequest struct { ChatId int64 `protobuf:"varint,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` // contains filtered or unexported fields }
func (*ConnectChatRequest) Descriptor
deprecated
func (*ConnectChatRequest) Descriptor() ([]byte, []int)
Deprecated: Use ConnectChatRequest.ProtoReflect.Descriptor instead.
func (*ConnectChatRequest) GetChatId ¶
func (x *ConnectChatRequest) GetChatId() int64
func (*ConnectChatRequest) ProtoMessage ¶
func (*ConnectChatRequest) ProtoMessage()
func (*ConnectChatRequest) ProtoReflect ¶
func (x *ConnectChatRequest) ProtoReflect() protoreflect.Message
func (*ConnectChatRequest) Reset ¶
func (x *ConnectChatRequest) Reset()
func (*ConnectChatRequest) String ¶
func (x *ConnectChatRequest) String() string
type CreateRequest ¶
type CreateRequest struct { Usernames []string `protobuf:"bytes,1,rep,name=usernames,proto3" json:"usernames,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetTitle ¶
func (x *CreateRequest) GetTitle() string
func (*CreateRequest) GetUsernames ¶
func (x *CreateRequest) GetUsernames() []string
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type CreateResponse ¶
type CreateResponse struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetId ¶
func (x *CreateResponse) GetId() int64
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
type DeleteRequest ¶
type DeleteRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetId ¶
func (x *DeleteRequest) GetId() int64
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type GetAvailableChatsRequest ¶
type GetAvailableChatsRequest struct { Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` PageSize int64 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"` // contains filtered or unexported fields }
func (*GetAvailableChatsRequest) Descriptor
deprecated
func (*GetAvailableChatsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAvailableChatsRequest.ProtoReflect.Descriptor instead.
func (*GetAvailableChatsRequest) GetPage ¶
func (x *GetAvailableChatsRequest) GetPage() int64
func (*GetAvailableChatsRequest) GetPageSize ¶
func (x *GetAvailableChatsRequest) GetPageSize() int64
func (*GetAvailableChatsRequest) ProtoMessage ¶
func (*GetAvailableChatsRequest) ProtoMessage()
func (*GetAvailableChatsRequest) ProtoReflect ¶
func (x *GetAvailableChatsRequest) ProtoReflect() protoreflect.Message
func (*GetAvailableChatsRequest) Reset ¶
func (x *GetAvailableChatsRequest) Reset()
func (*GetAvailableChatsRequest) String ¶
func (x *GetAvailableChatsRequest) String() string
type GetAvailableChatsResponse ¶
type GetAvailableChatsResponse struct { Chats []*Chat `protobuf:"bytes,1,rep,name=chats,proto3" json:"chats,omitempty"` Count uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*GetAvailableChatsResponse) Descriptor
deprecated
func (*GetAvailableChatsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetAvailableChatsResponse.ProtoReflect.Descriptor instead.
func (*GetAvailableChatsResponse) GetChats ¶
func (x *GetAvailableChatsResponse) GetChats() []*Chat
func (*GetAvailableChatsResponse) GetCount ¶
func (x *GetAvailableChatsResponse) GetCount() uint64
func (*GetAvailableChatsResponse) ProtoMessage ¶
func (*GetAvailableChatsResponse) ProtoMessage()
func (*GetAvailableChatsResponse) ProtoReflect ¶
func (x *GetAvailableChatsResponse) ProtoReflect() protoreflect.Message
func (*GetAvailableChatsResponse) Reset ¶
func (x *GetAvailableChatsResponse) Reset()
func (*GetAvailableChatsResponse) String ¶
func (x *GetAvailableChatsResponse) String() string
type GetChatMessagesRequest ¶
type GetChatMessagesRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Page int64 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"` PageSize int64 `protobuf:"varint,3,opt,name=pageSize,proto3" json:"pageSize,omitempty"` // contains filtered or unexported fields }
func (*GetChatMessagesRequest) Descriptor
deprecated
func (*GetChatMessagesRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetChatMessagesRequest.ProtoReflect.Descriptor instead.
func (*GetChatMessagesRequest) GetId ¶
func (x *GetChatMessagesRequest) GetId() int64
func (*GetChatMessagesRequest) GetPage ¶
func (x *GetChatMessagesRequest) GetPage() int64
func (*GetChatMessagesRequest) GetPageSize ¶
func (x *GetChatMessagesRequest) GetPageSize() int64
func (*GetChatMessagesRequest) ProtoMessage ¶
func (*GetChatMessagesRequest) ProtoMessage()
func (*GetChatMessagesRequest) ProtoReflect ¶
func (x *GetChatMessagesRequest) ProtoReflect() protoreflect.Message
func (*GetChatMessagesRequest) Reset ¶
func (x *GetChatMessagesRequest) Reset()
func (*GetChatMessagesRequest) String ¶
func (x *GetChatMessagesRequest) String() string
type GetChatMessagesResponse ¶
type GetChatMessagesResponse struct { Messages []*ChatMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` Count uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*GetChatMessagesResponse) Descriptor
deprecated
func (*GetChatMessagesResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetChatMessagesResponse.ProtoReflect.Descriptor instead.
func (*GetChatMessagesResponse) GetCount ¶
func (x *GetChatMessagesResponse) GetCount() uint64
func (*GetChatMessagesResponse) GetMessages ¶
func (x *GetChatMessagesResponse) GetMessages() []*ChatMessage
func (*GetChatMessagesResponse) ProtoMessage ¶
func (*GetChatMessagesResponse) ProtoMessage()
func (*GetChatMessagesResponse) ProtoReflect ¶
func (x *GetChatMessagesResponse) ProtoReflect() protoreflect.Message
func (*GetChatMessagesResponse) Reset ¶
func (x *GetChatMessagesResponse) Reset()
func (*GetChatMessagesResponse) String ¶
func (x *GetChatMessagesResponse) String() string
type SendMessageRequest ¶
type SendMessageRequest struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` ChatID int64 `protobuf:"varint,3,opt,name=chatID,proto3" json:"chatID,omitempty"` // contains filtered or unexported fields }
func (*SendMessageRequest) Descriptor
deprecated
func (*SendMessageRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendMessageRequest.ProtoReflect.Descriptor instead.
func (*SendMessageRequest) GetChatID ¶
func (x *SendMessageRequest) GetChatID() int64
func (*SendMessageRequest) GetText ¶
func (x *SendMessageRequest) GetText() string
func (*SendMessageRequest) GetTimestamp ¶
func (x *SendMessageRequest) GetTimestamp() *timestamppb.Timestamp
func (*SendMessageRequest) ProtoMessage ¶
func (*SendMessageRequest) ProtoMessage()
func (*SendMessageRequest) ProtoReflect ¶
func (x *SendMessageRequest) ProtoReflect() protoreflect.Message
func (*SendMessageRequest) Reset ¶
func (x *SendMessageRequest) Reset()
func (*SendMessageRequest) String ¶
func (x *SendMessageRequest) String() string
type UnimplementedChatV1Server ¶
type UnimplementedChatV1Server struct { }
UnimplementedChatV1Server must be embedded to have forward compatible implementations.
func (UnimplementedChatV1Server) ConnectChat ¶
func (UnimplementedChatV1Server) ConnectChat(*ConnectChatRequest, ChatV1_ConnectChatServer) error
func (UnimplementedChatV1Server) Create ¶
func (UnimplementedChatV1Server) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedChatV1Server) Delete ¶
func (UnimplementedChatV1Server) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
func (UnimplementedChatV1Server) GetAvailableChats ¶
func (UnimplementedChatV1Server) GetAvailableChats(context.Context, *GetAvailableChatsRequest) (*GetAvailableChatsResponse, error)
func (UnimplementedChatV1Server) GetChatMessages ¶
func (UnimplementedChatV1Server) GetChatMessages(context.Context, *GetChatMessagesRequest) (*GetChatMessagesResponse, error)
func (UnimplementedChatV1Server) SendMessage ¶
func (UnimplementedChatV1Server) SendMessage(context.Context, *SendMessageRequest) (*emptypb.Empty, error)
type UnsafeChatV1Server ¶
type UnsafeChatV1Server interface {
// contains filtered or unexported methods
}
UnsafeChatV1Server may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ChatV1Server will result in compilation errors.