add create channels to stream

This commit is contained in:
Asim Aslam
2021-11-03 16:03:20 +00:00
parent 784e1a71d3
commit 5ad499c8a0
6 changed files with 340 additions and 110 deletions

View File

@@ -111,8 +111,10 @@ type Channel struct {
// name of the channel
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// description for the channel
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
// last activity time
LastActive string `protobuf:"bytes,2,opt,name=last_active,json=lastActive,proto3" json:"last_active,omitempty"`
LastActive string `protobuf:"bytes,3,opt,name=last_active,json=lastActive,proto3" json:"last_active,omitempty"`
}
func (x *Channel) Reset() {
@@ -154,6 +156,13 @@ func (x *Channel) GetName() string {
return ""
}
func (x *Channel) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Channel) GetLastActive() string {
if x != nil {
return x.LastActive
@@ -161,7 +170,104 @@ func (x *Channel) GetLastActive() string {
return ""
}
// SendMessage a message to the stream.
// Create a channel with a given name and description. Channels are created automatically but
// this allows you to specify a description that's persisted for the lifetime of the channel.
type CreateChannelRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name of the channel
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// description for the channel
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
}
func (x *CreateChannelRequest) Reset() {
*x = CreateChannelRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_stream_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateChannelRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateChannelRequest) ProtoMessage() {}
func (x *CreateChannelRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_stream_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateChannelRequest.ProtoReflect.Descriptor instead.
func (*CreateChannelRequest) Descriptor() ([]byte, []int) {
return file_proto_stream_proto_rawDescGZIP(), []int{2}
}
func (x *CreateChannelRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CreateChannelRequest) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
type CreateChannelResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *CreateChannelResponse) Reset() {
*x = CreateChannelResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_stream_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateChannelResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateChannelResponse) ProtoMessage() {}
func (x *CreateChannelResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_stream_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateChannelResponse.ProtoReflect.Descriptor instead.
func (*CreateChannelResponse) Descriptor() ([]byte, []int) {
return file_proto_stream_proto_rawDescGZIP(), []int{3}
}
// Send a message to the stream.
type SendMessageRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -176,7 +282,7 @@ type SendMessageRequest struct {
func (x *SendMessageRequest) Reset() {
*x = SendMessageRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_stream_proto_msgTypes[2]
mi := &file_proto_stream_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -189,7 +295,7 @@ func (x *SendMessageRequest) String() string {
func (*SendMessageRequest) ProtoMessage() {}
func (x *SendMessageRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_stream_proto_msgTypes[2]
mi := &file_proto_stream_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -202,7 +308,7 @@ func (x *SendMessageRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use SendMessageRequest.ProtoReflect.Descriptor instead.
func (*SendMessageRequest) Descriptor() ([]byte, []int) {
return file_proto_stream_proto_rawDescGZIP(), []int{2}
return file_proto_stream_proto_rawDescGZIP(), []int{4}
}
func (x *SendMessageRequest) GetChannel() string {
@@ -228,7 +334,7 @@ type SendMessageResponse struct {
func (x *SendMessageResponse) Reset() {
*x = SendMessageResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_stream_proto_msgTypes[3]
mi := &file_proto_stream_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -241,7 +347,7 @@ func (x *SendMessageResponse) String() string {
func (*SendMessageResponse) ProtoMessage() {}
func (x *SendMessageResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_stream_proto_msgTypes[3]
mi := &file_proto_stream_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -254,7 +360,7 @@ func (x *SendMessageResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use SendMessageResponse.ProtoReflect.Descriptor instead.
func (*SendMessageResponse) Descriptor() ([]byte, []int) {
return file_proto_stream_proto_rawDescGZIP(), []int{3}
return file_proto_stream_proto_rawDescGZIP(), []int{5}
}
// List all the active channels
@@ -267,7 +373,7 @@ type ListChannelsRequest struct {
func (x *ListChannelsRequest) Reset() {
*x = ListChannelsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_stream_proto_msgTypes[4]
mi := &file_proto_stream_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -280,7 +386,7 @@ func (x *ListChannelsRequest) String() string {
func (*ListChannelsRequest) ProtoMessage() {}
func (x *ListChannelsRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_stream_proto_msgTypes[4]
mi := &file_proto_stream_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -293,7 +399,7 @@ func (x *ListChannelsRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListChannelsRequest.ProtoReflect.Descriptor instead.
func (*ListChannelsRequest) Descriptor() ([]byte, []int) {
return file_proto_stream_proto_rawDescGZIP(), []int{4}
return file_proto_stream_proto_rawDescGZIP(), []int{6}
}
type ListChannelsResponse struct {
@@ -307,7 +413,7 @@ type ListChannelsResponse struct {
func (x *ListChannelsResponse) Reset() {
*x = ListChannelsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_stream_proto_msgTypes[5]
mi := &file_proto_stream_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -320,7 +426,7 @@ func (x *ListChannelsResponse) String() string {
func (*ListChannelsResponse) ProtoMessage() {}
func (x *ListChannelsResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_stream_proto_msgTypes[5]
mi := &file_proto_stream_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -333,7 +439,7 @@ func (x *ListChannelsResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListChannelsResponse.ProtoReflect.Descriptor instead.
func (*ListChannelsResponse) Descriptor() ([]byte, []int) {
return file_proto_stream_proto_rawDescGZIP(), []int{5}
return file_proto_stream_proto_rawDescGZIP(), []int{7}
}
func (x *ListChannelsResponse) GetChannels() []*Channel {
@@ -358,7 +464,7 @@ type ListMessagesRequest struct {
func (x *ListMessagesRequest) Reset() {
*x = ListMessagesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_stream_proto_msgTypes[6]
mi := &file_proto_stream_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -371,7 +477,7 @@ func (x *ListMessagesRequest) String() string {
func (*ListMessagesRequest) ProtoMessage() {}
func (x *ListMessagesRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_stream_proto_msgTypes[6]
mi := &file_proto_stream_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -384,7 +490,7 @@ func (x *ListMessagesRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListMessagesRequest.ProtoReflect.Descriptor instead.
func (*ListMessagesRequest) Descriptor() ([]byte, []int) {
return file_proto_stream_proto_rawDescGZIP(), []int{6}
return file_proto_stream_proto_rawDescGZIP(), []int{8}
}
func (x *ListMessagesRequest) GetChannel() string {
@@ -408,14 +514,14 @@ type ListMessagesResponse struct {
// The channel subscribed to
Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"`
// Messages are returned in reverse order; latest first
// Messages are chronological order
Messages []*Message `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
}
func (x *ListMessagesResponse) Reset() {
*x = ListMessagesResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_proto_stream_proto_msgTypes[7]
mi := &file_proto_stream_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -428,7 +534,7 @@ func (x *ListMessagesResponse) String() string {
func (*ListMessagesResponse) ProtoMessage() {}
func (x *ListMessagesResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_stream_proto_msgTypes[7]
mi := &file_proto_stream_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -441,7 +547,7 @@ func (x *ListMessagesResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListMessagesResponse.ProtoReflect.Descriptor instead.
func (*ListMessagesResponse) Descriptor() ([]byte, []int) {
return file_proto_stream_proto_rawDescGZIP(), []int{7}
return file_proto_stream_proto_rawDescGZIP(), []int{9}
}
func (x *ListMessagesResponse) GetChannel() string {
@@ -476,50 +582,63 @@ var file_proto_stream_proto_rawDesc = []byte{
0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3e, 0x0a, 0x07,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x60, 0x0a, 0x07,
0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c,
0x61, 0x73, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x42, 0x0a, 0x12,
0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04,
0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74,
0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x43,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x43,
0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65,
0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61,
0x6d, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x73, 0x22, 0x45, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61,
0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20,
0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x5d, 0x0a, 0x14, 0x4c, 0x69,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64,
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a,
0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x22, 0x4c,
0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x17, 0x0a, 0x15,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x0a, 0x12, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, 0x6e,
0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x43, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x43,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x2b, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e,
0x65, 0x6c, 0x52, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x22, 0x45, 0x0a, 0x13,
0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x14, 0x0a,
0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69,
0x6d, 0x69, 0x74, 0x22, 0x5d, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2b, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d,
0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x73, 0x32, 0xbc, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x4e, 0x0a,
0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1c,
0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73,
0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a,
0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x73,
0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61,
0x6d, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2b, 0x0a, 0x08,
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f,
0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52,
0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x32, 0xec, 0x01, 0x0a, 0x06, 0x53, 0x74,
0x72, 0x65, 0x61, 0x6d, 0x12, 0x48, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x53, 0x65, 0x6e,
0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x1b, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b,
0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1b,
0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x74,
0x72, 0x65, 0x61, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0c, 0x4c,
0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x74,
0x72, 0x65, 0x61, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61,
0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x10, 0x5a, 0x0e, 0x2e, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x3b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x00, 0x42, 0x10, 0x5a, 0x0e, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x73, 0x74, 0x72,
0x65, 0x61, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -534,33 +653,37 @@ func file_proto_stream_proto_rawDescGZIP() []byte {
return file_proto_stream_proto_rawDescData
}
var file_proto_stream_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_proto_stream_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_proto_stream_proto_goTypes = []interface{}{
(*Message)(nil), // 0: stream.Message
(*Channel)(nil), // 1: stream.Channel
(*SendMessageRequest)(nil), // 2: stream.SendMessageRequest
(*SendMessageResponse)(nil), // 3: stream.SendMessageResponse
(*ListChannelsRequest)(nil), // 4: stream.ListChannelsRequest
(*ListChannelsResponse)(nil), // 5: stream.ListChannelsResponse
(*ListMessagesRequest)(nil), // 6: stream.ListMessagesRequest
(*ListMessagesResponse)(nil), // 7: stream.ListMessagesResponse
nil, // 8: stream.Message.MetadataEntry
(*Message)(nil), // 0: stream.Message
(*Channel)(nil), // 1: stream.Channel
(*CreateChannelRequest)(nil), // 2: stream.CreateChannelRequest
(*CreateChannelResponse)(nil), // 3: stream.CreateChannelResponse
(*SendMessageRequest)(nil), // 4: stream.SendMessageRequest
(*SendMessageResponse)(nil), // 5: stream.SendMessageResponse
(*ListChannelsRequest)(nil), // 6: stream.ListChannelsRequest
(*ListChannelsResponse)(nil), // 7: stream.ListChannelsResponse
(*ListMessagesRequest)(nil), // 8: stream.ListMessagesRequest
(*ListMessagesResponse)(nil), // 9: stream.ListMessagesResponse
nil, // 10: stream.Message.MetadataEntry
}
var file_proto_stream_proto_depIdxs = []int32{
8, // 0: stream.Message.metadata:type_name -> stream.Message.MetadataEntry
1, // 1: stream.ListChannelsResponse.channels:type_name -> stream.Channel
0, // 2: stream.ListMessagesResponse.messages:type_name -> stream.Message
2, // 3: stream.Stream.SendMessage:input_type -> stream.SendMessageRequest
6, // 4: stream.Stream.ListMessages:input_type -> stream.ListMessagesRequest
4, // 5: stream.Stream.ListChannels:input_type -> stream.ListChannelsRequest
3, // 6: stream.Stream.SendMessage:output_type -> stream.SendMessageResponse
7, // 7: stream.Stream.ListMessages:output_type -> stream.ListMessagesResponse
5, // 8: stream.Stream.ListChannels:output_type -> stream.ListChannelsResponse
6, // [6:9] is the sub-list for method output_type
3, // [3:6] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
10, // 0: stream.Message.metadata:type_name -> stream.Message.MetadataEntry
1, // 1: stream.ListChannelsResponse.channels:type_name -> stream.Channel
0, // 2: stream.ListMessagesResponse.messages:type_name -> stream.Message
2, // 3: stream.Stream.CreateChannel:input_type -> stream.CreateChannelRequest
4, // 4: stream.Stream.SendMessage:input_type -> stream.SendMessageRequest
8, // 5: stream.Stream.ListMessages:input_type -> stream.ListMessagesRequest
6, // 6: stream.Stream.ListChannels:input_type -> stream.ListChannelsRequest
3, // 7: stream.Stream.CreateChannel:output_type -> stream.CreateChannelResponse
5, // 8: stream.Stream.SendMessage:output_type -> stream.SendMessageResponse
9, // 9: stream.Stream.ListMessages:output_type -> stream.ListMessagesResponse
7, // 10: stream.Stream.ListChannels:output_type -> stream.ListChannelsResponse
7, // [7:11] is the sub-list for method output_type
3, // [3:7] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_proto_stream_proto_init() }
@@ -594,7 +717,7 @@ func file_proto_stream_proto_init() {
}
}
file_proto_stream_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendMessageRequest); i {
switch v := v.(*CreateChannelRequest); i {
case 0:
return &v.state
case 1:
@@ -606,7 +729,7 @@ func file_proto_stream_proto_init() {
}
}
file_proto_stream_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendMessageResponse); i {
switch v := v.(*CreateChannelResponse); i {
case 0:
return &v.state
case 1:
@@ -618,7 +741,7 @@ func file_proto_stream_proto_init() {
}
}
file_proto_stream_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListChannelsRequest); i {
switch v := v.(*SendMessageRequest); i {
case 0:
return &v.state
case 1:
@@ -630,7 +753,7 @@ func file_proto_stream_proto_init() {
}
}
file_proto_stream_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListChannelsResponse); i {
switch v := v.(*SendMessageResponse); i {
case 0:
return &v.state
case 1:
@@ -642,7 +765,7 @@ func file_proto_stream_proto_init() {
}
}
file_proto_stream_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListMessagesRequest); i {
switch v := v.(*ListChannelsRequest); i {
case 0:
return &v.state
case 1:
@@ -654,6 +777,30 @@ func file_proto_stream_proto_init() {
}
}
file_proto_stream_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListChannelsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_stream_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListMessagesRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_proto_stream_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListMessagesResponse); i {
case 0:
return &v.state
@@ -672,7 +819,7 @@ func file_proto_stream_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_proto_stream_proto_rawDesc,
NumEnums: 0,
NumMessages: 9,
NumMessages: 11,
NumExtensions: 0,
NumServices: 1,
},