[+] add function GetSubscriberByUser for the agenda-widget
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v3.12.4
|
||||
// source: agenda.proto
|
||||
|
||||
@@ -832,6 +832,100 @@ func (x *UpdateEventResponse) GetEvent() *Event {
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetSubscriptionByUserRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Subscriber string `protobuf:"bytes,54,opt,name=subscriber,proto3" json:"subscriber,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetSubscriptionByUserRequest) Reset() {
|
||||
*x = GetSubscriptionByUserRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_agenda_proto_msgTypes[16]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetSubscriptionByUserRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetSubscriptionByUserRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetSubscriptionByUserRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agenda_proto_msgTypes[16]
|
||||
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 GetSubscriptionByUserRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetSubscriptionByUserRequest) Descriptor() ([]byte, []int) {
|
||||
return file_agenda_proto_rawDescGZIP(), []int{16}
|
||||
}
|
||||
|
||||
func (x *GetSubscriptionByUserRequest) GetSubscriber() string {
|
||||
if x != nil {
|
||||
return x.Subscriber
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetSubscriptionByUserResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Subscription []*Subscription `protobuf:"bytes,55,rep,name=subscription,proto3" json:"subscription,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetSubscriptionByUserResponse) Reset() {
|
||||
*x = GetSubscriptionByUserResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_agenda_proto_msgTypes[17]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetSubscriptionByUserResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetSubscriptionByUserResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetSubscriptionByUserResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_agenda_proto_msgTypes[17]
|
||||
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 GetSubscriptionByUserResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetSubscriptionByUserResponse) Descriptor() ([]byte, []int) {
|
||||
return file_agenda_proto_rawDescGZIP(), []int{17}
|
||||
}
|
||||
|
||||
func (x *GetSubscriptionByUserResponse) GetSubscription() []*Subscription {
|
||||
if x != nil {
|
||||
return x.Subscription
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_agenda_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_agenda_proto_rawDesc = []byte{
|
||||
@@ -907,43 +1001,58 @@ var file_agenda_proto_rawDesc = []byte{
|
||||
0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x35,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76,
|
||||
0x65, 0x6e, 0x74, 0x32, 0x86, 0x04, 0x0a, 0x06, 0x41, 0x67, 0x65, 0x6e, 0x64, 0x61, 0x12, 0x3a,
|
||||
0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x13, 0x2e,
|
||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x14, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x08, 0x47, 0x65,
|
||||
0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e,
|
||||
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76,
|
||||
0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x34, 0x0a,
|
||||
0x09, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x11, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e,
|
||||
0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x76, 0x65,
|
||||
0x6e, 0x74, 0x12, 0x13, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x65, 0x6e, 0x74, 0x22, 0x3e, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72,
|
||||
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
|
||||
0x72, 0x18, 0x36, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
|
||||
0x62, 0x65, 0x72, 0x22, 0x52, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72,
|
||||
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x37, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, 0x75, 0x62,
|
||||
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x63,
|
||||
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xe0, 0x04, 0x0a, 0x06, 0x41, 0x67, 0x65, 0x6e,
|
||||
0x64, 0x61, 0x12, 0x3a, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e,
|
||||
0x74, 0x12, 0x13, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45,
|
||||
0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x31,
|
||||
0x0a, 0x08, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x00, 0x12, 0x34, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x11,
|
||||
0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x12, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x13, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45,
|
||||
0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65,
|
||||
0x6e, 0x74, 0x12, 0x13, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
|
||||
0x3a, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x13,
|
||||
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e,
|
||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0e, 0x53,
|
||||
0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x2e,
|
||||
0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
|
||||
0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x12, 0x49, 0x0a, 0x10, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x45,
|
||||
0x76, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
|
||||
0x62, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
|
||||
0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x45, 0x76, 0x65, 0x6e,
|
||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x12, 0x44,
|
||||
0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x12, 0x1a, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72,
|
||||
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2e, 0x5a, 0x2c,
|
||||
0x67, 0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f,
|
||||
0x6f, 0x70, 0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x61, 0x67,
|
||||
0x65, 0x6e, 0x64, 0x61, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
0x43, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x45, 0x76, 0x65, 0x6e,
|
||||
0x74, 0x12, 0x16, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x45, 0x76, 0x65,
|
||||
0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x53, 0x75, 0x62, 0x73,
|
||||
0x63, 0x72, 0x69, 0x62, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x10, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72,
|
||||
0x69, 0x62, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62,
|
||||
0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x19, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
|
||||
0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
|
||||
0x4f, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
|
||||
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75,
|
||||
0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x1b, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72,
|
||||
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x12, 0x58, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x47, 0x65, 0x74, 0x53,
|
||||
0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x55, 0x73, 0x65,
|
||||
0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75,
|
||||
0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69,
|
||||
0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70,
|
||||
0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x61, 0x67, 0x65, 0x6e,
|
||||
0x64, 0x61, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -958,60 +1067,66 @@ func file_agenda_proto_rawDescGZIP() []byte {
|
||||
return file_agenda_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_agenda_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
|
||||
var file_agenda_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
|
||||
var file_agenda_proto_goTypes = []interface{}{
|
||||
(*CreateEventRequest)(nil), // 0: CreateEventRequest
|
||||
(*CreateEventResponse)(nil), // 1: CreateEventResponse
|
||||
(*GetEventRequest)(nil), // 2: GetEventRequest
|
||||
(*GetEventResponse)(nil), // 3: GetEventResponse
|
||||
(*DeleteEventRequest)(nil), // 4: DeleteEventRequest
|
||||
(*DeleteEventResponse)(nil), // 5: DeleteEventResponse
|
||||
(*GetEventsRequest)(nil), // 6: GetEventsRequest
|
||||
(*GetEventsResponse)(nil), // 7: GetEventsResponse
|
||||
(*SubscribeEventRequest)(nil), // 8: SubscribeEventRequest
|
||||
(*SubscribeEventResponse)(nil), // 9: SubscribeEventResponse
|
||||
(*UnsubscribeEventRequest)(nil), // 10: UnsubscribeEventRequest
|
||||
(*UnsubscribeEventResponse)(nil), // 11: UnsubscribeEventResponse
|
||||
(*DeleteSubscriptionRequest)(nil), // 12: DeleteSubscriptionRequest
|
||||
(*DeleteSubscriptionResponse)(nil), // 13: DeleteSubscriptionResponse
|
||||
(*UpdateEventRequest)(nil), // 14: UpdateEventRequest
|
||||
(*UpdateEventResponse)(nil), // 15: UpdateEventResponse
|
||||
(*Event)(nil), // 16: Event
|
||||
(*timestamp.Timestamp)(nil), // 17: google.protobuf.Timestamp
|
||||
(*_struct.Struct)(nil), // 18: google.protobuf.Struct
|
||||
(*CreateEventRequest)(nil), // 0: CreateEventRequest
|
||||
(*CreateEventResponse)(nil), // 1: CreateEventResponse
|
||||
(*GetEventRequest)(nil), // 2: GetEventRequest
|
||||
(*GetEventResponse)(nil), // 3: GetEventResponse
|
||||
(*DeleteEventRequest)(nil), // 4: DeleteEventRequest
|
||||
(*DeleteEventResponse)(nil), // 5: DeleteEventResponse
|
||||
(*GetEventsRequest)(nil), // 6: GetEventsRequest
|
||||
(*GetEventsResponse)(nil), // 7: GetEventsResponse
|
||||
(*SubscribeEventRequest)(nil), // 8: SubscribeEventRequest
|
||||
(*SubscribeEventResponse)(nil), // 9: SubscribeEventResponse
|
||||
(*UnsubscribeEventRequest)(nil), // 10: UnsubscribeEventRequest
|
||||
(*UnsubscribeEventResponse)(nil), // 11: UnsubscribeEventResponse
|
||||
(*DeleteSubscriptionRequest)(nil), // 12: DeleteSubscriptionRequest
|
||||
(*DeleteSubscriptionResponse)(nil), // 13: DeleteSubscriptionResponse
|
||||
(*UpdateEventRequest)(nil), // 14: UpdateEventRequest
|
||||
(*UpdateEventResponse)(nil), // 15: UpdateEventResponse
|
||||
(*GetSubscriptionByUserRequest)(nil), // 16: GetSubscriptionByUserRequest
|
||||
(*GetSubscriptionByUserResponse)(nil), // 17: GetSubscriptionByUserResponse
|
||||
(*Event)(nil), // 18: Event
|
||||
(*timestamp.Timestamp)(nil), // 19: google.protobuf.Timestamp
|
||||
(*_struct.Struct)(nil), // 20: google.protobuf.Struct
|
||||
(*Subscription)(nil), // 21: Subscription
|
||||
}
|
||||
var file_agenda_proto_depIdxs = []int32{
|
||||
16, // 0: CreateEventRequest.event:type_name -> Event
|
||||
16, // 1: CreateEventResponse.event:type_name -> Event
|
||||
16, // 2: GetEventResponse.event:type_name -> Event
|
||||
17, // 3: GetEventsRequest.mindate:type_name -> google.protobuf.Timestamp
|
||||
17, // 4: GetEventsRequest.maxdate:type_name -> google.protobuf.Timestamp
|
||||
16, // 5: GetEventsResponse.events:type_name -> Event
|
||||
18, // 6: SubscribeEventRequest.data:type_name -> google.protobuf.Struct
|
||||
18, // 7: DeleteSubscriptionRequest.data:type_name -> google.protobuf.Struct
|
||||
16, // 8: UpdateEventRequest.event:type_name -> Event
|
||||
16, // 9: UpdateEventResponse.event:type_name -> Event
|
||||
0, // 10: Agenda.CreateEvent:input_type -> CreateEventRequest
|
||||
2, // 11: Agenda.GetEvent:input_type -> GetEventRequest
|
||||
6, // 12: Agenda.GetEvents:input_type -> GetEventsRequest
|
||||
4, // 13: Agenda.DeleteEvent:input_type -> DeleteEventRequest
|
||||
14, // 14: Agenda.UpdateEvent:input_type -> UpdateEventRequest
|
||||
8, // 15: Agenda.SubscribeEvent:input_type -> SubscribeEventRequest
|
||||
10, // 16: Agenda.UnsubscribeEvent:input_type -> UnsubscribeEventRequest
|
||||
12, // 17: Agenda.DeleteSubscription:input_type -> DeleteSubscriptionRequest
|
||||
1, // 18: Agenda.CreateEvent:output_type -> CreateEventResponse
|
||||
3, // 19: Agenda.GetEvent:output_type -> GetEventResponse
|
||||
7, // 20: Agenda.GetEvents:output_type -> GetEventsResponse
|
||||
5, // 21: Agenda.DeleteEvent:output_type -> DeleteEventResponse
|
||||
15, // 22: Agenda.UpdateEvent:output_type -> UpdateEventResponse
|
||||
9, // 23: Agenda.SubscribeEvent:output_type -> SubscribeEventResponse
|
||||
11, // 24: Agenda.UnsubscribeEvent:output_type -> UnsubscribeEventResponse
|
||||
13, // 25: Agenda.DeleteSubscription:output_type -> DeleteSubscriptionResponse
|
||||
18, // [18:26] is the sub-list for method output_type
|
||||
10, // [10:18] is the sub-list for method input_type
|
||||
10, // [10:10] is the sub-list for extension type_name
|
||||
10, // [10:10] is the sub-list for extension extendee
|
||||
0, // [0:10] is the sub-list for field type_name
|
||||
18, // 0: CreateEventRequest.event:type_name -> Event
|
||||
18, // 1: CreateEventResponse.event:type_name -> Event
|
||||
18, // 2: GetEventResponse.event:type_name -> Event
|
||||
19, // 3: GetEventsRequest.mindate:type_name -> google.protobuf.Timestamp
|
||||
19, // 4: GetEventsRequest.maxdate:type_name -> google.protobuf.Timestamp
|
||||
18, // 5: GetEventsResponse.events:type_name -> Event
|
||||
20, // 6: SubscribeEventRequest.data:type_name -> google.protobuf.Struct
|
||||
20, // 7: DeleteSubscriptionRequest.data:type_name -> google.protobuf.Struct
|
||||
18, // 8: UpdateEventRequest.event:type_name -> Event
|
||||
18, // 9: UpdateEventResponse.event:type_name -> Event
|
||||
21, // 10: GetSubscriptionByUserResponse.subscription:type_name -> Subscription
|
||||
0, // 11: Agenda.CreateEvent:input_type -> CreateEventRequest
|
||||
2, // 12: Agenda.GetEvent:input_type -> GetEventRequest
|
||||
6, // 13: Agenda.GetEvents:input_type -> GetEventsRequest
|
||||
4, // 14: Agenda.DeleteEvent:input_type -> DeleteEventRequest
|
||||
14, // 15: Agenda.UpdateEvent:input_type -> UpdateEventRequest
|
||||
8, // 16: Agenda.SubscribeEvent:input_type -> SubscribeEventRequest
|
||||
10, // 17: Agenda.UnsubscribeEvent:input_type -> UnsubscribeEventRequest
|
||||
12, // 18: Agenda.DeleteSubscription:input_type -> DeleteSubscriptionRequest
|
||||
16, // 19: Agenda.GetSubscriptionByUser:input_type -> GetSubscriptionByUserRequest
|
||||
1, // 20: Agenda.CreateEvent:output_type -> CreateEventResponse
|
||||
3, // 21: Agenda.GetEvent:output_type -> GetEventResponse
|
||||
7, // 22: Agenda.GetEvents:output_type -> GetEventsResponse
|
||||
5, // 23: Agenda.DeleteEvent:output_type -> DeleteEventResponse
|
||||
15, // 24: Agenda.UpdateEvent:output_type -> UpdateEventResponse
|
||||
9, // 25: Agenda.SubscribeEvent:output_type -> SubscribeEventResponse
|
||||
11, // 26: Agenda.UnsubscribeEvent:output_type -> UnsubscribeEventResponse
|
||||
13, // 27: Agenda.DeleteSubscription:output_type -> DeleteSubscriptionResponse
|
||||
17, // 28: Agenda.GetSubscriptionByUser:output_type -> GetSubscriptionByUserResponse
|
||||
20, // [20:29] is the sub-list for method output_type
|
||||
11, // [11:20] is the sub-list for method input_type
|
||||
11, // [11:11] is the sub-list for extension type_name
|
||||
11, // [11:11] is the sub-list for extension extendee
|
||||
0, // [0:11] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_agenda_proto_init() }
|
||||
@@ -1213,6 +1328,30 @@ func file_agenda_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_agenda_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetSubscriptionByUserRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_agenda_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetSubscriptionByUserResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
@@ -1220,7 +1359,7 @@ func file_agenda_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_agenda_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 16,
|
||||
NumMessages: 18,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
@@ -17,6 +17,7 @@ service Agenda {
|
||||
rpc SubscribeEvent(SubscribeEventRequest) returns (SubscribeEventResponse) {}
|
||||
rpc UnsubscribeEvent(UnsubscribeEventRequest) returns (UnsubscribeEventResponse) {}
|
||||
rpc DeleteSubscription(DeleteSubscriptionRequest) returns (DeleteSubscriptionResponse) {}
|
||||
rpc GetSubscriptionByUser(GetSubscriptionByUserRequest) returns (GetSubscriptionByUserResponse) {}
|
||||
}
|
||||
|
||||
message CreateEventRequest {
|
||||
@@ -88,4 +89,12 @@ message UpdateEventRequest {
|
||||
|
||||
message UpdateEventResponse {
|
||||
Event event = 53;
|
||||
}
|
||||
}
|
||||
|
||||
message GetSubscriptionByUserRequest {
|
||||
string subscriber = 54;
|
||||
}
|
||||
|
||||
message GetSubscriptionByUserResponse {
|
||||
repeated Subscription subscription = 55;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
//COOPGO Agenda gRPC service definition
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v3.12.4
|
||||
// source: agenda.proto
|
||||
|
||||
@@ -18,6 +20,18 @@ import (
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
Agenda_CreateEvent_FullMethodName = "/Agenda/CreateEvent"
|
||||
Agenda_GetEvent_FullMethodName = "/Agenda/GetEvent"
|
||||
Agenda_GetEvents_FullMethodName = "/Agenda/GetEvents"
|
||||
Agenda_DeleteEvent_FullMethodName = "/Agenda/DeleteEvent"
|
||||
Agenda_UpdateEvent_FullMethodName = "/Agenda/UpdateEvent"
|
||||
Agenda_SubscribeEvent_FullMethodName = "/Agenda/SubscribeEvent"
|
||||
Agenda_UnsubscribeEvent_FullMethodName = "/Agenda/UnsubscribeEvent"
|
||||
Agenda_DeleteSubscription_FullMethodName = "/Agenda/DeleteSubscription"
|
||||
Agenda_GetSubscriptionByUser_FullMethodName = "/Agenda/GetSubscriptionByUser"
|
||||
)
|
||||
|
||||
// AgendaClient is the client API for Agenda 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.
|
||||
@@ -30,6 +44,7 @@ type AgendaClient interface {
|
||||
SubscribeEvent(ctx context.Context, in *SubscribeEventRequest, opts ...grpc.CallOption) (*SubscribeEventResponse, error)
|
||||
UnsubscribeEvent(ctx context.Context, in *UnsubscribeEventRequest, opts ...grpc.CallOption) (*UnsubscribeEventResponse, error)
|
||||
DeleteSubscription(ctx context.Context, in *DeleteSubscriptionRequest, opts ...grpc.CallOption) (*DeleteSubscriptionResponse, error)
|
||||
GetSubscriptionByUser(ctx context.Context, in *GetSubscriptionByUserRequest, opts ...grpc.CallOption) (*GetSubscriptionByUserResponse, error)
|
||||
}
|
||||
|
||||
type agendaClient struct {
|
||||
@@ -42,7 +57,7 @@ func NewAgendaClient(cc grpc.ClientConnInterface) AgendaClient {
|
||||
|
||||
func (c *agendaClient) CreateEvent(ctx context.Context, in *CreateEventRequest, opts ...grpc.CallOption) (*CreateEventResponse, error) {
|
||||
out := new(CreateEventResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/CreateEvent", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Agenda_CreateEvent_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -51,7 +66,7 @@ func (c *agendaClient) CreateEvent(ctx context.Context, in *CreateEventRequest,
|
||||
|
||||
func (c *agendaClient) GetEvent(ctx context.Context, in *GetEventRequest, opts ...grpc.CallOption) (*GetEventResponse, error) {
|
||||
out := new(GetEventResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/GetEvent", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Agenda_GetEvent_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -60,7 +75,7 @@ func (c *agendaClient) GetEvent(ctx context.Context, in *GetEventRequest, opts .
|
||||
|
||||
func (c *agendaClient) GetEvents(ctx context.Context, in *GetEventsRequest, opts ...grpc.CallOption) (*GetEventsResponse, error) {
|
||||
out := new(GetEventsResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/GetEvents", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Agenda_GetEvents_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -69,7 +84,7 @@ func (c *agendaClient) GetEvents(ctx context.Context, in *GetEventsRequest, opts
|
||||
|
||||
func (c *agendaClient) DeleteEvent(ctx context.Context, in *DeleteEventRequest, opts ...grpc.CallOption) (*DeleteEventResponse, error) {
|
||||
out := new(DeleteEventResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/DeleteEvent", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Agenda_DeleteEvent_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -78,7 +93,7 @@ func (c *agendaClient) DeleteEvent(ctx context.Context, in *DeleteEventRequest,
|
||||
|
||||
func (c *agendaClient) UpdateEvent(ctx context.Context, in *UpdateEventRequest, opts ...grpc.CallOption) (*UpdateEventResponse, error) {
|
||||
out := new(UpdateEventResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/UpdateEvent", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Agenda_UpdateEvent_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -87,7 +102,7 @@ func (c *agendaClient) UpdateEvent(ctx context.Context, in *UpdateEventRequest,
|
||||
|
||||
func (c *agendaClient) SubscribeEvent(ctx context.Context, in *SubscribeEventRequest, opts ...grpc.CallOption) (*SubscribeEventResponse, error) {
|
||||
out := new(SubscribeEventResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/SubscribeEvent", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Agenda_SubscribeEvent_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -96,7 +111,7 @@ func (c *agendaClient) SubscribeEvent(ctx context.Context, in *SubscribeEventReq
|
||||
|
||||
func (c *agendaClient) UnsubscribeEvent(ctx context.Context, in *UnsubscribeEventRequest, opts ...grpc.CallOption) (*UnsubscribeEventResponse, error) {
|
||||
out := new(UnsubscribeEventResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/UnsubscribeEvent", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Agenda_UnsubscribeEvent_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -105,7 +120,16 @@ func (c *agendaClient) UnsubscribeEvent(ctx context.Context, in *UnsubscribeEven
|
||||
|
||||
func (c *agendaClient) DeleteSubscription(ctx context.Context, in *DeleteSubscriptionRequest, opts ...grpc.CallOption) (*DeleteSubscriptionResponse, error) {
|
||||
out := new(DeleteSubscriptionResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/DeleteSubscription", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Agenda_DeleteSubscription_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agendaClient) GetSubscriptionByUser(ctx context.Context, in *GetSubscriptionByUserRequest, opts ...grpc.CallOption) (*GetSubscriptionByUserResponse, error) {
|
||||
out := new(GetSubscriptionByUserResponse)
|
||||
err := c.cc.Invoke(ctx, Agenda_GetSubscriptionByUser_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -124,6 +148,7 @@ type AgendaServer interface {
|
||||
SubscribeEvent(context.Context, *SubscribeEventRequest) (*SubscribeEventResponse, error)
|
||||
UnsubscribeEvent(context.Context, *UnsubscribeEventRequest) (*UnsubscribeEventResponse, error)
|
||||
DeleteSubscription(context.Context, *DeleteSubscriptionRequest) (*DeleteSubscriptionResponse, error)
|
||||
GetSubscriptionByUser(context.Context, *GetSubscriptionByUserRequest) (*GetSubscriptionByUserResponse, error)
|
||||
mustEmbedUnimplementedAgendaServer()
|
||||
}
|
||||
|
||||
@@ -155,6 +180,9 @@ func (UnimplementedAgendaServer) UnsubscribeEvent(context.Context, *UnsubscribeE
|
||||
func (UnimplementedAgendaServer) DeleteSubscription(context.Context, *DeleteSubscriptionRequest) (*DeleteSubscriptionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteSubscription not implemented")
|
||||
}
|
||||
func (UnimplementedAgendaServer) GetSubscriptionByUser(context.Context, *GetSubscriptionByUserRequest) (*GetSubscriptionByUserResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetSubscriptionByUser not implemented")
|
||||
}
|
||||
func (UnimplementedAgendaServer) mustEmbedUnimplementedAgendaServer() {}
|
||||
|
||||
// UnsafeAgendaServer may be embedded to opt out of forward compatibility for this service.
|
||||
@@ -178,7 +206,7 @@ func _Agenda_CreateEvent_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/CreateEvent",
|
||||
FullMethod: Agenda_CreateEvent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).CreateEvent(ctx, req.(*CreateEventRequest))
|
||||
@@ -196,7 +224,7 @@ func _Agenda_GetEvent_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/GetEvent",
|
||||
FullMethod: Agenda_GetEvent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).GetEvent(ctx, req.(*GetEventRequest))
|
||||
@@ -214,7 +242,7 @@ func _Agenda_GetEvents_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/GetEvents",
|
||||
FullMethod: Agenda_GetEvents_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).GetEvents(ctx, req.(*GetEventsRequest))
|
||||
@@ -232,7 +260,7 @@ func _Agenda_DeleteEvent_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/DeleteEvent",
|
||||
FullMethod: Agenda_DeleteEvent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).DeleteEvent(ctx, req.(*DeleteEventRequest))
|
||||
@@ -250,7 +278,7 @@ func _Agenda_UpdateEvent_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/UpdateEvent",
|
||||
FullMethod: Agenda_UpdateEvent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).UpdateEvent(ctx, req.(*UpdateEventRequest))
|
||||
@@ -268,7 +296,7 @@ func _Agenda_SubscribeEvent_Handler(srv interface{}, ctx context.Context, dec fu
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/SubscribeEvent",
|
||||
FullMethod: Agenda_SubscribeEvent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).SubscribeEvent(ctx, req.(*SubscribeEventRequest))
|
||||
@@ -286,7 +314,7 @@ func _Agenda_UnsubscribeEvent_Handler(srv interface{}, ctx context.Context, dec
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/UnsubscribeEvent",
|
||||
FullMethod: Agenda_UnsubscribeEvent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).UnsubscribeEvent(ctx, req.(*UnsubscribeEventRequest))
|
||||
@@ -304,7 +332,7 @@ func _Agenda_DeleteSubscription_Handler(srv interface{}, ctx context.Context, de
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/DeleteSubscription",
|
||||
FullMethod: Agenda_DeleteSubscription_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).DeleteSubscription(ctx, req.(*DeleteSubscriptionRequest))
|
||||
@@ -312,6 +340,24 @@ func _Agenda_DeleteSubscription_Handler(srv interface{}, ctx context.Context, de
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Agenda_GetSubscriptionByUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetSubscriptionByUserRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgendaServer).GetSubscriptionByUser(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Agenda_GetSubscriptionByUser_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).GetSubscriptionByUser(ctx, req.(*GetSubscriptionByUserRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Agenda_ServiceDesc is the grpc.ServiceDesc for Agenda service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -351,6 +397,10 @@ var Agenda_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "DeleteSubscription",
|
||||
Handler: _Agenda_DeleteSubscription_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetSubscriptionByUser",
|
||||
Handler: _Agenda_GetSubscriptionByUser_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "agenda.proto",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v3.12.4
|
||||
// source: events.proto
|
||||
|
||||
@@ -203,10 +203,11 @@ type Subscription struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,20,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Subscriber string `protobuf:"bytes,21,opt,name=subscriber,proto3" json:"subscriber,omitempty"`
|
||||
Tags []string `protobuf:"bytes,22,rep,name=tags,proto3" json:"tags,omitempty"`
|
||||
Data *_struct.Struct `protobuf:"bytes,23,opt,name=data,proto3" json:"data,omitempty"`
|
||||
CreatedAt *timestamp.Timestamp `protobuf:"bytes,24,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
|
||||
Eventid string `protobuf:"bytes,21,opt,name=eventid,proto3" json:"eventid,omitempty"`
|
||||
Subscriber string `protobuf:"bytes,22,opt,name=subscriber,proto3" json:"subscriber,omitempty"`
|
||||
Tags []string `protobuf:"bytes,23,rep,name=tags,proto3" json:"tags,omitempty"`
|
||||
Data *_struct.Struct `protobuf:"bytes,24,opt,name=data,proto3" json:"data,omitempty"`
|
||||
CreatedAt *timestamp.Timestamp `protobuf:"bytes,25,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Subscription) Reset() {
|
||||
@@ -248,6 +249,13 @@ func (x *Subscription) GetId() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Subscription) GetEventid() string {
|
||||
if x != nil {
|
||||
return x.Eventid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Subscription) GetSubscriber() string {
|
||||
if x != nil {
|
||||
return x.Subscriber
|
||||
@@ -322,22 +330,24 @@ var file_events_proto_rawDesc = []byte{
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72,
|
||||
0x75, 0x63, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x64, 0x22, 0xba, 0x01, 0x0a, 0x0c, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70,
|
||||
0x74, 0x65, 0x64, 0x22, 0xd4, 0x01, 0x0a, 0x0c, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
|
||||
0x65, 0x72, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72,
|
||||
0x69, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x16, 0x20, 0x03,
|
||||
0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||
0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52,
|
||||
0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
|
||||
0x5f, 0x61, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
|
||||
0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74,
|
||||
0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69,
|
||||
0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
|
||||
0x6d, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x64, 0x61, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x61, 0x70, 0x69,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18,
|
||||
0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, 0x1e,
|
||||
0x0a, 0x0a, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x18, 0x16, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61,
|
||||
0x67, 0x73, 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12,
|
||||
0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x19, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
|
||||
0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69,
|
||||
0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70,
|
||||
0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x61, 0x67, 0x65, 0x6e,
|
||||
0x64, 0x61, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -27,8 +27,9 @@ message Event {
|
||||
|
||||
message Subscription {
|
||||
string id = 20;
|
||||
string subscriber = 21;
|
||||
repeated string tags = 22;
|
||||
google.protobuf.Struct data = 23;
|
||||
google.protobuf.Timestamp created_at = 24;
|
||||
string eventid = 21;
|
||||
string subscriber = 22;
|
||||
repeated string tags = 23;
|
||||
google.protobuf.Struct data = 24;
|
||||
google.protobuf.Timestamp created_at = 25;
|
||||
}
|
||||
@@ -8,11 +8,14 @@ import (
|
||||
"time"
|
||||
|
||||
"git.coopgo.io/coopgo-platform/agenda/handlers"
|
||||
"git.coopgo.io/coopgo-platform/agenda/storage"
|
||||
timestamp "github.com/golang/protobuf/ptypes/timestamp"
|
||||
"github.com/spf13/viper"
|
||||
"google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/reflection"
|
||||
status "google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/structpb"
|
||||
)
|
||||
|
||||
type AgendaServerImpl struct {
|
||||
@@ -95,6 +98,76 @@ func (s AgendaServerImpl) UnsubscribeEvent(context.Context, *UnsubscribeEventReq
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Unsubscribe not implemented")
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
func ConvertStorageToProtoSubscription(storageSubs []*storage.Subscription) ([]*Subscription, error) {
|
||||
var protoSubs []*Subscription
|
||||
for _, storageSub := range storageSubs {
|
||||
dataStruct, err := ConvertMapToStruct(storageSub.Data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
protoSub := &Subscription{
|
||||
Id: storageSub.ID,
|
||||
Eventid: storageSub.EventID,
|
||||
Subscriber: storageSub.Subscriber,
|
||||
Tags: storageSub.Tags,
|
||||
CreatedAt: ×tamp.Timestamp{Seconds: storageSub.CreatedAt.Unix()},
|
||||
Data: dataStruct,
|
||||
}
|
||||
protoSubs = append(protoSubs, protoSub)
|
||||
}
|
||||
|
||||
return protoSubs, nil
|
||||
}
|
||||
|
||||
// ConvertMapToStruct converts a map[string]interface{} to a google.protobuf.Struct
|
||||
func ConvertMapToStruct(dataMap map[string]interface{}) (*structpb.Struct, error) {
|
||||
fields := make(map[string]*structpb.Value)
|
||||
for key, value := range dataMap {
|
||||
fieldValue, err := structpb.NewValue(value)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
fields[key] = fieldValue
|
||||
}
|
||||
|
||||
return &structpb.Struct{
|
||||
Fields: fields,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s AgendaServerImpl) GetSubscriptionByUser(ctx context.Context, req *GetSubscriptionByUserRequest) (*GetSubscriptionByUserResponse, error) {
|
||||
results, err := s.handler.GetSubscriptionByUser(req.Subscriber)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return nil, status.Errorf(codes.NotFound, "could not get subscriptions : %v", err)
|
||||
}
|
||||
var subscriptions []*storage.Subscription
|
||||
for _, result := range results {
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return nil, status.Errorf(codes.Internal, "could not get subscriptions : %v", err)
|
||||
}
|
||||
subscription := &storage.Subscription{
|
||||
ID: result.ID,
|
||||
EventID: result.EventID,
|
||||
Subscriber: result.Subscriber,
|
||||
Tags: result.Tags,
|
||||
Data: result.Data,
|
||||
CreatedAt: result.CreatedAt,
|
||||
}
|
||||
subscriptions = append(subscriptions, subscription)
|
||||
}
|
||||
sub, err := ConvertStorageToProtoSubscription(subscriptions)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return nil, status.Errorf(codes.Internal, "could not get subscriptions : %v", err)
|
||||
}
|
||||
return &GetSubscriptionByUserResponse{Subscription: sub}, nil
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
func (s AgendaServerImpl) DeleteSubscription(ctx context.Context, req *DeleteSubscriptionRequest) (*DeleteSubscriptionResponse, error) {
|
||||
err := s.handler.DeleteSubscription(req.Eventid, req.Subscriber, req.Data.AsMap())
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,321 +0,0 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.12.4
|
||||
// source: agenda.proto
|
||||
|
||||
package grpcapi
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// AgendaClient is the client API for Agenda 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.
|
||||
type AgendaClient interface {
|
||||
CreateEvent(ctx context.Context, in *CreateEventRequest, opts ...grpc.CallOption) (*CreateEventResponse, error)
|
||||
GetEvent(ctx context.Context, in *GetEventRequest, opts ...grpc.CallOption) (*GetEventResponse, error)
|
||||
GetEvents(ctx context.Context, in *GetEventsRequest, opts ...grpc.CallOption) (*GetEventsResponse, error)
|
||||
DeleteEvent(ctx context.Context, in *DeleteEventRequest, opts ...grpc.CallOption) (*DeleteEventResponse, error)
|
||||
SubscribeEvent(ctx context.Context, in *SubscribeEventRequest, opts ...grpc.CallOption) (*SubscribeEventResponse, error)
|
||||
UnsubscribeEvent(ctx context.Context, in *UnsubscribeEventRequest, opts ...grpc.CallOption) (*UnsubscribeEventResponse, error)
|
||||
DeleteSubscription(ctx context.Context, in *DeleteSubscriptionRequest, opts ...grpc.CallOption) (*DeleteSubscriptionResponse, error)
|
||||
}
|
||||
|
||||
type agendaClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAgendaClient(cc grpc.ClientConnInterface) AgendaClient {
|
||||
return &agendaClient{cc}
|
||||
}
|
||||
|
||||
func (c *agendaClient) CreateEvent(ctx context.Context, in *CreateEventRequest, opts ...grpc.CallOption) (*CreateEventResponse, error) {
|
||||
out := new(CreateEventResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/CreateEvent", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agendaClient) GetEvent(ctx context.Context, in *GetEventRequest, opts ...grpc.CallOption) (*GetEventResponse, error) {
|
||||
out := new(GetEventResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/GetEvent", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agendaClient) GetEvents(ctx context.Context, in *GetEventsRequest, opts ...grpc.CallOption) (*GetEventsResponse, error) {
|
||||
out := new(GetEventsResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/GetEvents", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agendaClient) DeleteEvent(ctx context.Context, in *DeleteEventRequest, opts ...grpc.CallOption) (*DeleteEventResponse, error) {
|
||||
out := new(DeleteEventResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/DeleteEvent", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agendaClient) SubscribeEvent(ctx context.Context, in *SubscribeEventRequest, opts ...grpc.CallOption) (*SubscribeEventResponse, error) {
|
||||
out := new(SubscribeEventResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/SubscribeEvent", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agendaClient) UnsubscribeEvent(ctx context.Context, in *UnsubscribeEventRequest, opts ...grpc.CallOption) (*UnsubscribeEventResponse, error) {
|
||||
out := new(UnsubscribeEventResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/UnsubscribeEvent", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agendaClient) DeleteSubscription(ctx context.Context, in *DeleteSubscriptionRequest, opts ...grpc.CallOption) (*DeleteSubscriptionResponse, error) {
|
||||
out := new(DeleteSubscriptionResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/DeleteSubscription", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AgendaServer is the server API for Agenda service.
|
||||
// All implementations must embed UnimplementedAgendaServer
|
||||
// for forward compatibility
|
||||
type AgendaServer interface {
|
||||
CreateEvent(context.Context, *CreateEventRequest) (*CreateEventResponse, error)
|
||||
GetEvent(context.Context, *GetEventRequest) (*GetEventResponse, error)
|
||||
GetEvents(context.Context, *GetEventsRequest) (*GetEventsResponse, error)
|
||||
DeleteEvent(context.Context, *DeleteEventRequest) (*DeleteEventResponse, error)
|
||||
SubscribeEvent(context.Context, *SubscribeEventRequest) (*SubscribeEventResponse, error)
|
||||
UnsubscribeEvent(context.Context, *UnsubscribeEventRequest) (*UnsubscribeEventResponse, error)
|
||||
DeleteSubscription(context.Context, *DeleteSubscriptionRequest) (*DeleteSubscriptionResponse, error)
|
||||
mustEmbedUnimplementedAgendaServer()
|
||||
}
|
||||
|
||||
// UnimplementedAgendaServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedAgendaServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedAgendaServer) CreateEvent(context.Context, *CreateEventRequest) (*CreateEventResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateEvent not implemented")
|
||||
}
|
||||
func (UnimplementedAgendaServer) GetEvent(context.Context, *GetEventRequest) (*GetEventResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetEvent not implemented")
|
||||
}
|
||||
func (UnimplementedAgendaServer) GetEvents(context.Context, *GetEventsRequest) (*GetEventsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetEvents not implemented")
|
||||
}
|
||||
func (UnimplementedAgendaServer) DeleteEvent(context.Context, *DeleteEventRequest) (*DeleteEventResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteEvent not implemented")
|
||||
}
|
||||
func (UnimplementedAgendaServer) SubscribeEvent(context.Context, *SubscribeEventRequest) (*SubscribeEventResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SubscribeEvent not implemented")
|
||||
}
|
||||
func (UnimplementedAgendaServer) UnsubscribeEvent(context.Context, *UnsubscribeEventRequest) (*UnsubscribeEventResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UnsubscribeEvent not implemented")
|
||||
}
|
||||
func (UnimplementedAgendaServer) DeleteSubscription(context.Context, *DeleteSubscriptionRequest) (*DeleteSubscriptionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteSubscription not implemented")
|
||||
}
|
||||
func (UnimplementedAgendaServer) mustEmbedUnimplementedAgendaServer() {}
|
||||
|
||||
// UnsafeAgendaServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to AgendaServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeAgendaServer interface {
|
||||
mustEmbedUnimplementedAgendaServer()
|
||||
}
|
||||
|
||||
func RegisterAgendaServer(s grpc.ServiceRegistrar, srv AgendaServer) {
|
||||
s.RegisterService(&Agenda_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Agenda_CreateEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateEventRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgendaServer).CreateEvent(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/CreateEvent",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).CreateEvent(ctx, req.(*CreateEventRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Agenda_GetEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetEventRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgendaServer).GetEvent(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/GetEvent",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).GetEvent(ctx, req.(*GetEventRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Agenda_GetEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetEventsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgendaServer).GetEvents(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/GetEvents",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).GetEvents(ctx, req.(*GetEventsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Agenda_DeleteEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteEventRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgendaServer).DeleteEvent(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/DeleteEvent",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).DeleteEvent(ctx, req.(*DeleteEventRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Agenda_SubscribeEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SubscribeEventRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgendaServer).SubscribeEvent(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/SubscribeEvent",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).SubscribeEvent(ctx, req.(*SubscribeEventRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Agenda_UnsubscribeEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UnsubscribeEventRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgendaServer).UnsubscribeEvent(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/UnsubscribeEvent",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).UnsubscribeEvent(ctx, req.(*UnsubscribeEventRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Agenda_DeleteSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteSubscriptionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgendaServer).DeleteSubscription(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/DeleteSubscription",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).DeleteSubscription(ctx, req.(*DeleteSubscriptionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Agenda_ServiceDesc is the grpc.ServiceDesc for Agenda service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Agenda_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "Agenda",
|
||||
HandlerType: (*AgendaServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateEvent",
|
||||
Handler: _Agenda_CreateEvent_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetEvent",
|
||||
Handler: _Agenda_GetEvent_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetEvents",
|
||||
Handler: _Agenda_GetEvents_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteEvent",
|
||||
Handler: _Agenda_DeleteEvent_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SubscribeEvent",
|
||||
Handler: _Agenda_SubscribeEvent_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UnsubscribeEvent",
|
||||
Handler: _Agenda_UnsubscribeEvent_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteSubscription",
|
||||
Handler: _Agenda_DeleteSubscription_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "agenda.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user