diff --git a/grpcapi/agenda.pb.go b/grpcapi/agenda.pb.go index 820842c..0e99159 100644 --- a/grpcapi/agenda.pb.go +++ b/grpcapi/agenda.pb.go @@ -1,1100 +1,687 @@ -//COOPGO Agenda gRPC service definition - // Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.12.4 // source: agenda.proto package grpcapi import ( - _struct "github.com/golang/protobuf/ptypes/struct" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + math "math" ) -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type CreateEventRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` + Event *Event `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *CreateEventRequest) Reset() { - *x = CreateEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_agenda_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateEventRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateEventRequest) ProtoMessage() {} - -func (x *CreateEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_agenda_proto_msgTypes[0] - 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 CreateEventRequest.ProtoReflect.Descriptor instead. +func (m *CreateEventRequest) Reset() { *m = CreateEventRequest{} } +func (m *CreateEventRequest) String() string { return proto.CompactTextString(m) } +func (*CreateEventRequest) ProtoMessage() {} func (*CreateEventRequest) Descriptor() ([]byte, []int) { - return file_agenda_proto_rawDescGZIP(), []int{0} + return fileDescriptor_2c165b8e4ed40226, []int{0} } -func (x *CreateEventRequest) GetEvent() *Event { - if x != nil { - return x.Event +func (m *CreateEventRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateEventRequest.Unmarshal(m, b) +} +func (m *CreateEventRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateEventRequest.Marshal(b, m, deterministic) +} +func (m *CreateEventRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateEventRequest.Merge(m, src) +} +func (m *CreateEventRequest) XXX_Size() int { + return xxx_messageInfo_CreateEventRequest.Size(m) +} +func (m *CreateEventRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateEventRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateEventRequest proto.InternalMessageInfo + +func (m *CreateEventRequest) GetEvent() *Event { + if m != nil { + return m.Event } return nil } type CreateEventResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Event *Event `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` + Event *Event `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *CreateEventResponse) Reset() { - *x = CreateEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_agenda_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateEventResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateEventResponse) ProtoMessage() {} - -func (x *CreateEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_agenda_proto_msgTypes[1] - 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 CreateEventResponse.ProtoReflect.Descriptor instead. +func (m *CreateEventResponse) Reset() { *m = CreateEventResponse{} } +func (m *CreateEventResponse) String() string { return proto.CompactTextString(m) } +func (*CreateEventResponse) ProtoMessage() {} func (*CreateEventResponse) Descriptor() ([]byte, []int) { - return file_agenda_proto_rawDescGZIP(), []int{1} + return fileDescriptor_2c165b8e4ed40226, []int{1} } -func (x *CreateEventResponse) GetEvent() *Event { - if x != nil { - return x.Event +func (m *CreateEventResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateEventResponse.Unmarshal(m, b) +} +func (m *CreateEventResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateEventResponse.Marshal(b, m, deterministic) +} +func (m *CreateEventResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateEventResponse.Merge(m, src) +} +func (m *CreateEventResponse) XXX_Size() int { + return xxx_messageInfo_CreateEventResponse.Size(m) +} +func (m *CreateEventResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CreateEventResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateEventResponse proto.InternalMessageInfo + +func (m *CreateEventResponse) GetEvent() *Event { + if m != nil { + return m.Event } return nil } type GetEventRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *GetEventRequest) Reset() { - *x = GetEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_agenda_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetEventRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetEventRequest) ProtoMessage() {} - -func (x *GetEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_agenda_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 GetEventRequest.ProtoReflect.Descriptor instead. +func (m *GetEventRequest) Reset() { *m = GetEventRequest{} } +func (m *GetEventRequest) String() string { return proto.CompactTextString(m) } +func (*GetEventRequest) ProtoMessage() {} func (*GetEventRequest) Descriptor() ([]byte, []int) { - return file_agenda_proto_rawDescGZIP(), []int{2} + return fileDescriptor_2c165b8e4ed40226, []int{2} } -func (x *GetEventRequest) GetId() string { - if x != nil { - return x.Id +func (m *GetEventRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetEventRequest.Unmarshal(m, b) +} +func (m *GetEventRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetEventRequest.Marshal(b, m, deterministic) +} +func (m *GetEventRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetEventRequest.Merge(m, src) +} +func (m *GetEventRequest) XXX_Size() int { + return xxx_messageInfo_GetEventRequest.Size(m) +} +func (m *GetEventRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetEventRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetEventRequest proto.InternalMessageInfo + +func (m *GetEventRequest) GetId() string { + if m != nil { + return m.Id } return "" } type GetEventResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Event *Event `protobuf:"bytes,4,opt,name=event,proto3" json:"event,omitempty"` + Event *Event `protobuf:"bytes,4,opt,name=event,proto3" json:"event,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *GetEventResponse) Reset() { - *x = GetEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_agenda_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetEventResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetEventResponse) ProtoMessage() {} - -func (x *GetEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_agenda_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 GetEventResponse.ProtoReflect.Descriptor instead. +func (m *GetEventResponse) Reset() { *m = GetEventResponse{} } +func (m *GetEventResponse) String() string { return proto.CompactTextString(m) } +func (*GetEventResponse) ProtoMessage() {} func (*GetEventResponse) Descriptor() ([]byte, []int) { - return file_agenda_proto_rawDescGZIP(), []int{3} + return fileDescriptor_2c165b8e4ed40226, []int{3} } -func (x *GetEventResponse) GetEvent() *Event { - if x != nil { - return x.Event +func (m *GetEventResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetEventResponse.Unmarshal(m, b) +} +func (m *GetEventResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetEventResponse.Marshal(b, m, deterministic) +} +func (m *GetEventResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetEventResponse.Merge(m, src) +} +func (m *GetEventResponse) XXX_Size() int { + return xxx_messageInfo_GetEventResponse.Size(m) +} +func (m *GetEventResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetEventResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetEventResponse proto.InternalMessageInfo + +func (m *GetEventResponse) GetEvent() *Event { + if m != nil { + return m.Event } return nil } type DeleteEventRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *DeleteEventRequest) Reset() { - *x = DeleteEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_agenda_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteEventRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteEventRequest) ProtoMessage() {} - -func (x *DeleteEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_agenda_proto_msgTypes[4] - 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 DeleteEventRequest.ProtoReflect.Descriptor instead. +func (m *DeleteEventRequest) Reset() { *m = DeleteEventRequest{} } +func (m *DeleteEventRequest) String() string { return proto.CompactTextString(m) } +func (*DeleteEventRequest) ProtoMessage() {} func (*DeleteEventRequest) Descriptor() ([]byte, []int) { - return file_agenda_proto_rawDescGZIP(), []int{4} + return fileDescriptor_2c165b8e4ed40226, []int{4} } -func (x *DeleteEventRequest) GetId() string { - if x != nil { - return x.Id +func (m *DeleteEventRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteEventRequest.Unmarshal(m, b) +} +func (m *DeleteEventRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteEventRequest.Marshal(b, m, deterministic) +} +func (m *DeleteEventRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteEventRequest.Merge(m, src) +} +func (m *DeleteEventRequest) XXX_Size() int { + return xxx_messageInfo_DeleteEventRequest.Size(m) +} +func (m *DeleteEventRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteEventRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteEventRequest proto.InternalMessageInfo + +func (m *DeleteEventRequest) GetId() string { + if m != nil { + return m.Id } return "" } type DeleteEventResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ok bool `protobuf:"varint,6,opt,name=ok,proto3" json:"ok,omitempty"` + Ok bool `protobuf:"varint,6,opt,name=ok,proto3" json:"ok,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *DeleteEventResponse) Reset() { - *x = DeleteEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_agenda_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteEventResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteEventResponse) ProtoMessage() {} - -func (x *DeleteEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_agenda_proto_msgTypes[5] - 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 DeleteEventResponse.ProtoReflect.Descriptor instead. +func (m *DeleteEventResponse) Reset() { *m = DeleteEventResponse{} } +func (m *DeleteEventResponse) String() string { return proto.CompactTextString(m) } +func (*DeleteEventResponse) ProtoMessage() {} func (*DeleteEventResponse) Descriptor() ([]byte, []int) { - return file_agenda_proto_rawDescGZIP(), []int{5} + return fileDescriptor_2c165b8e4ed40226, []int{5} } -func (x *DeleteEventResponse) GetOk() bool { - if x != nil { - return x.Ok +func (m *DeleteEventResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteEventResponse.Unmarshal(m, b) +} +func (m *DeleteEventResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteEventResponse.Marshal(b, m, deterministic) +} +func (m *DeleteEventResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteEventResponse.Merge(m, src) +} +func (m *DeleteEventResponse) XXX_Size() int { + return xxx_messageInfo_DeleteEventResponse.Size(m) +} +func (m *DeleteEventResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteEventResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteEventResponse proto.InternalMessageInfo + +func (m *DeleteEventResponse) GetOk() bool { + if m != nil { + return m.Ok } return false } type GetEventsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespaces []string `protobuf:"bytes,10,rep,name=namespaces,proto3" json:"namespaces,omitempty"` - Mindate *timestamp.Timestamp `protobuf:"bytes,11,opt,name=mindate,proto3" json:"mindate,omitempty"` - Maxdate *timestamp.Timestamp `protobuf:"bytes,12,opt,name=maxdate,proto3" json:"maxdate,omitempty"` + Namespaces []string `protobuf:"bytes,10,rep,name=namespaces,proto3" json:"namespaces,omitempty"` + Mindate *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=mindate,proto3" json:"mindate,omitempty"` + Maxdate *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=maxdate,proto3" json:"maxdate,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *GetEventsRequest) Reset() { - *x = GetEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_agenda_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetEventsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetEventsRequest) ProtoMessage() {} - -func (x *GetEventsRequest) ProtoReflect() protoreflect.Message { - mi := &file_agenda_proto_msgTypes[6] - 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 GetEventsRequest.ProtoReflect.Descriptor instead. +func (m *GetEventsRequest) Reset() { *m = GetEventsRequest{} } +func (m *GetEventsRequest) String() string { return proto.CompactTextString(m) } +func (*GetEventsRequest) ProtoMessage() {} func (*GetEventsRequest) Descriptor() ([]byte, []int) { - return file_agenda_proto_rawDescGZIP(), []int{6} + return fileDescriptor_2c165b8e4ed40226, []int{6} } -func (x *GetEventsRequest) GetNamespaces() []string { - if x != nil { - return x.Namespaces +func (m *GetEventsRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetEventsRequest.Unmarshal(m, b) +} +func (m *GetEventsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetEventsRequest.Marshal(b, m, deterministic) +} +func (m *GetEventsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetEventsRequest.Merge(m, src) +} +func (m *GetEventsRequest) XXX_Size() int { + return xxx_messageInfo_GetEventsRequest.Size(m) +} +func (m *GetEventsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetEventsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetEventsRequest proto.InternalMessageInfo + +func (m *GetEventsRequest) GetNamespaces() []string { + if m != nil { + return m.Namespaces } return nil } -func (x *GetEventsRequest) GetMindate() *timestamp.Timestamp { - if x != nil { - return x.Mindate +func (m *GetEventsRequest) GetMindate() *timestamppb.Timestamp { + if m != nil { + return m.Mindate } return nil } -func (x *GetEventsRequest) GetMaxdate() *timestamp.Timestamp { - if x != nil { - return x.Maxdate +func (m *GetEventsRequest) GetMaxdate() *timestamppb.Timestamp { + if m != nil { + return m.Maxdate } return nil } type GetEventsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Events []*Event `protobuf:"bytes,13,rep,name=events,proto3" json:"events,omitempty"` + Events []*Event `protobuf:"bytes,13,rep,name=events,proto3" json:"events,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *GetEventsResponse) Reset() { - *x = GetEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_agenda_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetEventsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetEventsResponse) ProtoMessage() {} - -func (x *GetEventsResponse) ProtoReflect() protoreflect.Message { - mi := &file_agenda_proto_msgTypes[7] - 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 GetEventsResponse.ProtoReflect.Descriptor instead. +func (m *GetEventsResponse) Reset() { *m = GetEventsResponse{} } +func (m *GetEventsResponse) String() string { return proto.CompactTextString(m) } +func (*GetEventsResponse) ProtoMessage() {} func (*GetEventsResponse) Descriptor() ([]byte, []int) { - return file_agenda_proto_rawDescGZIP(), []int{7} + return fileDescriptor_2c165b8e4ed40226, []int{7} } -func (x *GetEventsResponse) GetEvents() []*Event { - if x != nil { - return x.Events +func (m *GetEventsResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetEventsResponse.Unmarshal(m, b) +} +func (m *GetEventsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetEventsResponse.Marshal(b, m, deterministic) +} +func (m *GetEventsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetEventsResponse.Merge(m, src) +} +func (m *GetEventsResponse) XXX_Size() int { + return xxx_messageInfo_GetEventsResponse.Size(m) +} +func (m *GetEventsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetEventsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetEventsResponse proto.InternalMessageInfo + +func (m *GetEventsResponse) GetEvents() []*Event { + if m != nil { + return m.Events } return nil } type SubscribeEventRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Subscriber string `protobuf:"bytes,20,opt,name=subscriber,proto3" json:"subscriber,omitempty"` - Eventid string `protobuf:"bytes,21,opt,name=eventid,proto3" json:"eventid,omitempty"` - Data *_struct.Struct `protobuf:"bytes,22,opt,name=data,proto3" json:"data,omitempty"` + Subscriber string `protobuf:"bytes,20,opt,name=subscriber,proto3" json:"subscriber,omitempty"` + Eventid string `protobuf:"bytes,21,opt,name=eventid,proto3" json:"eventid,omitempty"` + Data *structpb.Struct `protobuf:"bytes,22,opt,name=data,proto3" json:"data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *SubscribeEventRequest) Reset() { - *x = SubscribeEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_agenda_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubscribeEventRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubscribeEventRequest) ProtoMessage() {} - -func (x *SubscribeEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_agenda_proto_msgTypes[8] - 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 SubscribeEventRequest.ProtoReflect.Descriptor instead. +func (m *SubscribeEventRequest) Reset() { *m = SubscribeEventRequest{} } +func (m *SubscribeEventRequest) String() string { return proto.CompactTextString(m) } +func (*SubscribeEventRequest) ProtoMessage() {} func (*SubscribeEventRequest) Descriptor() ([]byte, []int) { - return file_agenda_proto_rawDescGZIP(), []int{8} + return fileDescriptor_2c165b8e4ed40226, []int{8} } -func (x *SubscribeEventRequest) GetSubscriber() string { - if x != nil { - return x.Subscriber +func (m *SubscribeEventRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SubscribeEventRequest.Unmarshal(m, b) +} +func (m *SubscribeEventRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SubscribeEventRequest.Marshal(b, m, deterministic) +} +func (m *SubscribeEventRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubscribeEventRequest.Merge(m, src) +} +func (m *SubscribeEventRequest) XXX_Size() int { + return xxx_messageInfo_SubscribeEventRequest.Size(m) +} +func (m *SubscribeEventRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SubscribeEventRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SubscribeEventRequest proto.InternalMessageInfo + +func (m *SubscribeEventRequest) GetSubscriber() string { + if m != nil { + return m.Subscriber } return "" } -func (x *SubscribeEventRequest) GetEventid() string { - if x != nil { - return x.Eventid +func (m *SubscribeEventRequest) GetEventid() string { + if m != nil { + return m.Eventid } return "" } -func (x *SubscribeEventRequest) GetData() *_struct.Struct { - if x != nil { - return x.Data +func (m *SubscribeEventRequest) GetData() *structpb.Struct { + if m != nil { + return m.Data } return nil } type SubscribeEventResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ok bool `protobuf:"varint,29,opt,name=ok,proto3" json:"ok,omitempty"` + Ok bool `protobuf:"varint,29,opt,name=ok,proto3" json:"ok,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *SubscribeEventResponse) Reset() { - *x = SubscribeEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_agenda_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubscribeEventResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubscribeEventResponse) ProtoMessage() {} - -func (x *SubscribeEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_agenda_proto_msgTypes[9] - 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 SubscribeEventResponse.ProtoReflect.Descriptor instead. +func (m *SubscribeEventResponse) Reset() { *m = SubscribeEventResponse{} } +func (m *SubscribeEventResponse) String() string { return proto.CompactTextString(m) } +func (*SubscribeEventResponse) ProtoMessage() {} func (*SubscribeEventResponse) Descriptor() ([]byte, []int) { - return file_agenda_proto_rawDescGZIP(), []int{9} + return fileDescriptor_2c165b8e4ed40226, []int{9} } -func (x *SubscribeEventResponse) GetOk() bool { - if x != nil { - return x.Ok +func (m *SubscribeEventResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SubscribeEventResponse.Unmarshal(m, b) +} +func (m *SubscribeEventResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SubscribeEventResponse.Marshal(b, m, deterministic) +} +func (m *SubscribeEventResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubscribeEventResponse.Merge(m, src) +} +func (m *SubscribeEventResponse) XXX_Size() int { + return xxx_messageInfo_SubscribeEventResponse.Size(m) +} +func (m *SubscribeEventResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SubscribeEventResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SubscribeEventResponse proto.InternalMessageInfo + +func (m *SubscribeEventResponse) GetOk() bool { + if m != nil { + return m.Ok } return false } type UnsubscribeEventRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Subscriber string `protobuf:"bytes,30,opt,name=subscriber,proto3" json:"subscriber,omitempty"` - Eventid string `protobuf:"bytes,31,opt,name=eventid,proto3" json:"eventid,omitempty"` + Subscriber string `protobuf:"bytes,30,opt,name=subscriber,proto3" json:"subscriber,omitempty"` + Eventid string `protobuf:"bytes,31,opt,name=eventid,proto3" json:"eventid,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *UnsubscribeEventRequest) Reset() { - *x = UnsubscribeEventRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_agenda_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnsubscribeEventRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnsubscribeEventRequest) ProtoMessage() {} - -func (x *UnsubscribeEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_agenda_proto_msgTypes[10] - 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 UnsubscribeEventRequest.ProtoReflect.Descriptor instead. +func (m *UnsubscribeEventRequest) Reset() { *m = UnsubscribeEventRequest{} } +func (m *UnsubscribeEventRequest) String() string { return proto.CompactTextString(m) } +func (*UnsubscribeEventRequest) ProtoMessage() {} func (*UnsubscribeEventRequest) Descriptor() ([]byte, []int) { - return file_agenda_proto_rawDescGZIP(), []int{10} + return fileDescriptor_2c165b8e4ed40226, []int{10} } -func (x *UnsubscribeEventRequest) GetSubscriber() string { - if x != nil { - return x.Subscriber +func (m *UnsubscribeEventRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnsubscribeEventRequest.Unmarshal(m, b) +} +func (m *UnsubscribeEventRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnsubscribeEventRequest.Marshal(b, m, deterministic) +} +func (m *UnsubscribeEventRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnsubscribeEventRequest.Merge(m, src) +} +func (m *UnsubscribeEventRequest) XXX_Size() int { + return xxx_messageInfo_UnsubscribeEventRequest.Size(m) +} +func (m *UnsubscribeEventRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UnsubscribeEventRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UnsubscribeEventRequest proto.InternalMessageInfo + +func (m *UnsubscribeEventRequest) GetSubscriber() string { + if m != nil { + return m.Subscriber } return "" } -func (x *UnsubscribeEventRequest) GetEventid() string { - if x != nil { - return x.Eventid +func (m *UnsubscribeEventRequest) GetEventid() string { + if m != nil { + return m.Eventid } return "" } type UnsubscribeEventResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ok bool `protobuf:"varint,39,opt,name=ok,proto3" json:"ok,omitempty"` + Ok bool `protobuf:"varint,39,opt,name=ok,proto3" json:"ok,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *UnsubscribeEventResponse) Reset() { - *x = UnsubscribeEventResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_agenda_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnsubscribeEventResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnsubscribeEventResponse) ProtoMessage() {} - -func (x *UnsubscribeEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_agenda_proto_msgTypes[11] - 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 UnsubscribeEventResponse.ProtoReflect.Descriptor instead. +func (m *UnsubscribeEventResponse) Reset() { *m = UnsubscribeEventResponse{} } +func (m *UnsubscribeEventResponse) String() string { return proto.CompactTextString(m) } +func (*UnsubscribeEventResponse) ProtoMessage() {} func (*UnsubscribeEventResponse) Descriptor() ([]byte, []int) { - return file_agenda_proto_rawDescGZIP(), []int{11} + return fileDescriptor_2c165b8e4ed40226, []int{11} } -func (x *UnsubscribeEventResponse) GetOk() bool { - if x != nil { - return x.Ok +func (m *UnsubscribeEventResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnsubscribeEventResponse.Unmarshal(m, b) +} +func (m *UnsubscribeEventResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnsubscribeEventResponse.Marshal(b, m, deterministic) +} +func (m *UnsubscribeEventResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnsubscribeEventResponse.Merge(m, src) +} +func (m *UnsubscribeEventResponse) XXX_Size() int { + return xxx_messageInfo_UnsubscribeEventResponse.Size(m) +} +func (m *UnsubscribeEventResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UnsubscribeEventResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_UnsubscribeEventResponse proto.InternalMessageInfo + +func (m *UnsubscribeEventResponse) GetOk() bool { + if m != nil { + return m.Ok } return false } type DeleteSubscriptionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Subscriber string `protobuf:"bytes,32,opt,name=subscriber,proto3" json:"subscriber,omitempty"` - Eventid string `protobuf:"bytes,33,opt,name=eventid,proto3" json:"eventid,omitempty"` - Data *_struct.Struct `protobuf:"bytes,34,opt,name=data,proto3" json:"data,omitempty"` + Subscriber string `protobuf:"bytes,32,opt,name=subscriber,proto3" json:"subscriber,omitempty"` + Eventid string `protobuf:"bytes,33,opt,name=eventid,proto3" json:"eventid,omitempty"` + Data *structpb.Struct `protobuf:"bytes,34,opt,name=data,proto3" json:"data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *DeleteSubscriptionRequest) Reset() { - *x = DeleteSubscriptionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_agenda_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteSubscriptionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSubscriptionRequest) ProtoMessage() {} - -func (x *DeleteSubscriptionRequest) ProtoReflect() protoreflect.Message { - mi := &file_agenda_proto_msgTypes[12] - 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 DeleteSubscriptionRequest.ProtoReflect.Descriptor instead. +func (m *DeleteSubscriptionRequest) Reset() { *m = DeleteSubscriptionRequest{} } +func (m *DeleteSubscriptionRequest) String() string { return proto.CompactTextString(m) } +func (*DeleteSubscriptionRequest) ProtoMessage() {} func (*DeleteSubscriptionRequest) Descriptor() ([]byte, []int) { - return file_agenda_proto_rawDescGZIP(), []int{12} + return fileDescriptor_2c165b8e4ed40226, []int{12} } -func (x *DeleteSubscriptionRequest) GetSubscriber() string { - if x != nil { - return x.Subscriber +func (m *DeleteSubscriptionRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteSubscriptionRequest.Unmarshal(m, b) +} +func (m *DeleteSubscriptionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteSubscriptionRequest.Marshal(b, m, deterministic) +} +func (m *DeleteSubscriptionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteSubscriptionRequest.Merge(m, src) +} +func (m *DeleteSubscriptionRequest) XXX_Size() int { + return xxx_messageInfo_DeleteSubscriptionRequest.Size(m) +} +func (m *DeleteSubscriptionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteSubscriptionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteSubscriptionRequest proto.InternalMessageInfo + +func (m *DeleteSubscriptionRequest) GetSubscriber() string { + if m != nil { + return m.Subscriber } return "" } -func (x *DeleteSubscriptionRequest) GetEventid() string { - if x != nil { - return x.Eventid +func (m *DeleteSubscriptionRequest) GetEventid() string { + if m != nil { + return m.Eventid } return "" } -func (x *DeleteSubscriptionRequest) GetData() *_struct.Struct { - if x != nil { - return x.Data +func (m *DeleteSubscriptionRequest) GetData() *structpb.Struct { + if m != nil { + return m.Data } return nil } type DeleteSubscriptionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ok bool `protobuf:"varint,41,opt,name=ok,proto3" json:"ok,omitempty"` + Ok bool `protobuf:"varint,41,opt,name=ok,proto3" json:"ok,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *DeleteSubscriptionResponse) Reset() { - *x = DeleteSubscriptionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_agenda_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteSubscriptionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSubscriptionResponse) ProtoMessage() {} - -func (x *DeleteSubscriptionResponse) ProtoReflect() protoreflect.Message { - mi := &file_agenda_proto_msgTypes[13] - 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 DeleteSubscriptionResponse.ProtoReflect.Descriptor instead. +func (m *DeleteSubscriptionResponse) Reset() { *m = DeleteSubscriptionResponse{} } +func (m *DeleteSubscriptionResponse) String() string { return proto.CompactTextString(m) } +func (*DeleteSubscriptionResponse) ProtoMessage() {} func (*DeleteSubscriptionResponse) Descriptor() ([]byte, []int) { - return file_agenda_proto_rawDescGZIP(), []int{13} + return fileDescriptor_2c165b8e4ed40226, []int{13} } -func (x *DeleteSubscriptionResponse) GetOk() bool { - if x != nil { - return x.Ok +func (m *DeleteSubscriptionResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteSubscriptionResponse.Unmarshal(m, b) +} +func (m *DeleteSubscriptionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteSubscriptionResponse.Marshal(b, m, deterministic) +} +func (m *DeleteSubscriptionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteSubscriptionResponse.Merge(m, src) +} +func (m *DeleteSubscriptionResponse) XXX_Size() int { + return xxx_messageInfo_DeleteSubscriptionResponse.Size(m) +} +func (m *DeleteSubscriptionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteSubscriptionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteSubscriptionResponse proto.InternalMessageInfo + +func (m *DeleteSubscriptionResponse) GetOk() bool { + if m != nil { + return m.Ok } return false } -var File_agenda_proto protoreflect.FileDescriptor - -var file_agenda_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x61, 0x67, 0x65, 0x6e, 0x64, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x32, 0x0a, 0x12, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x06, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, - 0x33, 0x0a, 0x13, 0x43, 0x72, 0x65, 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, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x22, 0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x30, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x05, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x24, 0x0a, 0x12, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, - 0x25, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x22, 0x9e, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x6d, - 0x69, 0x6e, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0b, 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, 0x07, 0x6d, 0x69, 0x6e, 0x64, 0x61, 0x74, - 0x65, 0x12, 0x34, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0c, 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, 0x07, - 0x6d, 0x61, 0x78, 0x64, 0x61, 0x74, 0x65, 0x22, 0x33, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x06, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x7e, 0x0a, 0x15, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x72, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x72, 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, - 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x16, 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, 0x22, 0x28, 0x0a, 0x16, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x1d, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x22, 0x53, 0x0a, 0x17, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x62, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x18, - 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, - 0x72, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x18, 0x1f, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x22, 0x2a, 0x0a, 0x18, 0x55, - 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x27, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x22, 0x82, 0x01, 0x0a, 0x19, 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, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, - 0x18, 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x64, 0x12, - 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x22, 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, 0x22, 0x2c, 0x0a, 0x1a, - 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, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, - 0x18, 0x29, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x32, 0xca, 0x03, 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, 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, +func init() { + proto.RegisterType((*CreateEventRequest)(nil), "CreateEventRequest") + proto.RegisterType((*CreateEventResponse)(nil), "CreateEventResponse") + proto.RegisterType((*GetEventRequest)(nil), "GetEventRequest") + proto.RegisterType((*GetEventResponse)(nil), "GetEventResponse") + proto.RegisterType((*DeleteEventRequest)(nil), "DeleteEventRequest") + proto.RegisterType((*DeleteEventResponse)(nil), "DeleteEventResponse") + proto.RegisterType((*GetEventsRequest)(nil), "GetEventsRequest") + proto.RegisterType((*GetEventsResponse)(nil), "GetEventsResponse") + proto.RegisterType((*SubscribeEventRequest)(nil), "SubscribeEventRequest") + proto.RegisterType((*SubscribeEventResponse)(nil), "SubscribeEventResponse") + proto.RegisterType((*UnsubscribeEventRequest)(nil), "UnsubscribeEventRequest") + proto.RegisterType((*UnsubscribeEventResponse)(nil), "UnsubscribeEventResponse") + proto.RegisterType((*DeleteSubscriptionRequest)(nil), "DeleteSubscriptionRequest") + proto.RegisterType((*DeleteSubscriptionResponse)(nil), "DeleteSubscriptionResponse") } -var ( - file_agenda_proto_rawDescOnce sync.Once - file_agenda_proto_rawDescData = file_agenda_proto_rawDesc -) - -func file_agenda_proto_rawDescGZIP() []byte { - file_agenda_proto_rawDescOnce.Do(func() { - file_agenda_proto_rawDescData = protoimpl.X.CompressGZIP(file_agenda_proto_rawDescData) - }) - return file_agenda_proto_rawDescData +func init() { + proto.RegisterFile("agenda.proto", fileDescriptor_2c165b8e4ed40226) } -var file_agenda_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -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 - (*Event)(nil), // 14: Event - (*timestamp.Timestamp)(nil), // 15: google.protobuf.Timestamp - (*_struct.Struct)(nil), // 16: google.protobuf.Struct -} -var file_agenda_proto_depIdxs = []int32{ - 14, // 0: CreateEventRequest.event:type_name -> Event - 14, // 1: CreateEventResponse.event:type_name -> Event - 14, // 2: GetEventResponse.event:type_name -> Event - 15, // 3: GetEventsRequest.mindate:type_name -> google.protobuf.Timestamp - 15, // 4: GetEventsRequest.maxdate:type_name -> google.protobuf.Timestamp - 14, // 5: GetEventsResponse.events:type_name -> Event - 16, // 6: SubscribeEventRequest.data:type_name -> google.protobuf.Struct - 16, // 7: DeleteSubscriptionRequest.data:type_name -> google.protobuf.Struct - 0, // 8: Agenda.CreateEvent:input_type -> CreateEventRequest - 2, // 9: Agenda.GetEvent:input_type -> GetEventRequest - 6, // 10: Agenda.GetEvents:input_type -> GetEventsRequest - 4, // 11: Agenda.DeleteEvent:input_type -> DeleteEventRequest - 8, // 12: Agenda.SubscribeEvent:input_type -> SubscribeEventRequest - 10, // 13: Agenda.UnsubscribeEvent:input_type -> UnsubscribeEventRequest - 12, // 14: Agenda.DeleteSubscription:input_type -> DeleteSubscriptionRequest - 1, // 15: Agenda.CreateEvent:output_type -> CreateEventResponse - 3, // 16: Agenda.GetEvent:output_type -> GetEventResponse - 7, // 17: Agenda.GetEvents:output_type -> GetEventsResponse - 5, // 18: Agenda.DeleteEvent:output_type -> DeleteEventResponse - 9, // 19: Agenda.SubscribeEvent:output_type -> SubscribeEventResponse - 11, // 20: Agenda.UnsubscribeEvent:output_type -> UnsubscribeEventResponse - 13, // 21: Agenda.DeleteSubscription:output_type -> DeleteSubscriptionResponse - 15, // [15:22] is the sub-list for method output_type - 8, // [8:15] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_agenda_proto_init() } -func file_agenda_proto_init() { - if File_agenda_proto != nil { - return - } - file_events_proto_init() - if !protoimpl.UnsafeEnabled { - file_agenda_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agenda_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateEventResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agenda_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agenda_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEventResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agenda_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agenda_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteEventResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agenda_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agenda_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agenda_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubscribeEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agenda_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubscribeEventResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agenda_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnsubscribeEventRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agenda_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnsubscribeEventResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agenda_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSubscriptionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_agenda_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSubscriptionResponse); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_agenda_proto_rawDesc, - NumEnums: 0, - NumMessages: 14, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_agenda_proto_goTypes, - DependencyIndexes: file_agenda_proto_depIdxs, - MessageInfos: file_agenda_proto_msgTypes, - }.Build() - File_agenda_proto = out.File - file_agenda_proto_rawDesc = nil - file_agenda_proto_goTypes = nil - file_agenda_proto_depIdxs = nil +var fileDescriptor_2c165b8e4ed40226 = []byte{ + // 588 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x41, 0x73, 0xd2, 0x40, + 0x18, 0x4d, 0xa0, 0xa5, 0xed, 0x07, 0x22, 0x5d, 0x28, 0x6c, 0x63, 0xa5, 0xe9, 0x8e, 0x8e, 0xa8, + 0x75, 0x51, 0xe8, 0xc9, 0x9b, 0x56, 0xc7, 0xf1, 0xe4, 0x4c, 0xd0, 0x8b, 0xb7, 0x85, 0x6c, 0x33, + 0x99, 0x42, 0x36, 0x66, 0x17, 0xc7, 0x93, 0x07, 0x7f, 0x88, 0x3f, 0xc8, 0x5f, 0xe5, 0x74, 0x93, + 0x40, 0x12, 0x42, 0x87, 0x1b, 0xfb, 0xed, 0xfb, 0xbe, 0x7d, 0xbc, 0x7d, 0x6f, 0x03, 0x0d, 0xe6, + 0xf1, 0xc0, 0x65, 0x34, 0x8c, 0x84, 0x12, 0xd6, 0xb9, 0x27, 0x84, 0x37, 0xe7, 0x43, 0xbd, 0x9a, + 0x2e, 0x6f, 0x86, 0xca, 0x5f, 0x70, 0xa9, 0xd8, 0x22, 0x4c, 0x00, 0x67, 0x45, 0x80, 0x54, 0xd1, + 0x72, 0xa6, 0x92, 0xdd, 0x06, 0xff, 0xc9, 0x03, 0x25, 0xe3, 0x15, 0x19, 0x01, 0xba, 0x8e, 0x38, + 0x53, 0xfc, 0xe3, 0x5d, 0xd5, 0xe1, 0x3f, 0x96, 0x5c, 0x2a, 0x74, 0x06, 0xfb, 0x1a, 0x85, 0x4d, + 0xdb, 0x1c, 0xd4, 0x47, 0x35, 0x1a, 0xef, 0xc6, 0x45, 0x32, 0x86, 0x76, 0xae, 0x47, 0x86, 0x22, + 0x90, 0x7c, 0xdd, 0x54, 0x29, 0x6b, 0xba, 0x80, 0x87, 0x9f, 0xb8, 0xca, 0x9d, 0xd2, 0x84, 0x8a, + 0xef, 0xe2, 0xaa, 0x6d, 0x0e, 0x8e, 0x9c, 0x8a, 0xef, 0x92, 0xd7, 0xd0, 0x5a, 0x43, 0x8a, 0x43, + 0xf7, 0xca, 0x86, 0x3e, 0x01, 0xf4, 0x81, 0xcf, 0x79, 0x81, 0x7d, 0x3c, 0x77, 0x7f, 0x35, 0xf7, + 0x29, 0xb4, 0x73, 0xa8, 0x64, 0x74, 0x13, 0x2a, 0xe2, 0x16, 0xd7, 0x6c, 0x73, 0x70, 0xe8, 0x54, + 0xc4, 0x2d, 0xf9, 0x6b, 0xae, 0xcf, 0x97, 0xe9, 0xac, 0x3e, 0x40, 0xc0, 0x16, 0x5c, 0x86, 0x6c, + 0xc6, 0x25, 0x06, 0xbb, 0x3a, 0x38, 0x72, 0x32, 0x15, 0x74, 0x05, 0x07, 0x0b, 0x3f, 0x70, 0x99, + 0xe2, 0xb8, 0xae, 0x19, 0x5a, 0x34, 0x56, 0x9f, 0xa6, 0xea, 0xd3, 0xaf, 0xe9, 0xf5, 0x38, 0x29, + 0x54, 0x77, 0xb1, 0x5f, 0xba, 0xab, 0xb1, 0x43, 0x57, 0x0c, 0x25, 0x63, 0x38, 0xce, 0xf0, 0x4b, + 0xfe, 0x45, 0x1f, 0x6a, 0xf1, 0x85, 0xe2, 0x07, 0x76, 0x35, 0xa3, 0x50, 0x52, 0x25, 0xbf, 0xe1, + 0x64, 0xb2, 0x9c, 0xca, 0x59, 0xe4, 0x4f, 0xf3, 0x2a, 0xf5, 0x01, 0x64, 0xba, 0x11, 0xe1, 0x8e, + 0x56, 0x2b, 0x53, 0x41, 0x18, 0x0e, 0xf4, 0x08, 0xdf, 0xc5, 0x27, 0x7a, 0x33, 0x5d, 0xa2, 0x97, + 0xb0, 0xe7, 0x32, 0xc5, 0x70, 0x57, 0x53, 0xef, 0x6d, 0x50, 0x9f, 0x68, 0xbb, 0x39, 0x1a, 0x44, + 0x06, 0xd0, 0x2d, 0x9e, 0x9f, 0xd3, 0xff, 0xf1, 0x4a, 0xff, 0x09, 0xf4, 0xbe, 0x05, 0x72, 0x07, + 0xae, 0xfd, 0xfb, 0xb8, 0x9e, 0xe7, 0xb8, 0x92, 0x17, 0x80, 0x37, 0x87, 0xe6, 0x08, 0x3c, 0x5b, + 0x11, 0xf8, 0x63, 0xc2, 0x69, 0x6c, 0x94, 0x84, 0x71, 0xa8, 0x7c, 0x11, 0x94, 0x73, 0xb0, 0xef, + 0xe3, 0x70, 0x51, 0xae, 0x17, 0xd9, 0x45, 0xaf, 0x4b, 0xb0, 0xca, 0x38, 0xe4, 0x28, 0x3f, 0x4f, + 0x29, 0x8f, 0xfe, 0x55, 0xa1, 0xf6, 0x4e, 0x3f, 0x0e, 0xe8, 0x2d, 0xd4, 0x33, 0xa9, 0x44, 0x6d, + 0xba, 0x99, 0x6b, 0xab, 0x43, 0x4b, 0x82, 0x4b, 0x0c, 0xf4, 0x06, 0x0e, 0x53, 0x67, 0xa1, 0x16, + 0x2d, 0xe4, 0xd4, 0x3a, 0xa6, 0xc5, 0x58, 0x12, 0x03, 0x5d, 0xc1, 0xd1, 0xca, 0x8c, 0x68, 0x8d, + 0x48, 0x83, 0x63, 0x21, 0xba, 0xe1, 0x55, 0x62, 0xdc, 0x91, 0xcc, 0x44, 0x11, 0xb5, 0xe9, 0x66, + 0x7c, 0xad, 0x0e, 0x2d, 0x49, 0x2b, 0x31, 0xd0, 0x35, 0x34, 0xf3, 0x4e, 0x42, 0x5d, 0x5a, 0x6a, + 0x6d, 0xab, 0x47, 0xcb, 0x2d, 0x47, 0x0c, 0xf4, 0x19, 0x5a, 0x45, 0x3f, 0x20, 0x4c, 0xb7, 0xf8, + 0xce, 0x3a, 0xa5, 0xdb, 0xcc, 0x43, 0x0c, 0xf4, 0x25, 0x7d, 0x7c, 0xb2, 0x37, 0x85, 0x2c, 0xba, + 0xd5, 0x42, 0xd6, 0x23, 0xba, 0xfd, 0x6a, 0x89, 0xf1, 0x9e, 0x7e, 0xbf, 0xf4, 0x7c, 0x45, 0x67, + 0x42, 0x84, 0x9e, 0xa0, 0xbe, 0x18, 0xc6, 0xbf, 0x5e, 0x85, 0x73, 0xa6, 0x6e, 0x44, 0xb4, 0x18, + 0xc6, 0x9f, 0x81, 0xa1, 0x17, 0x85, 0x33, 0x16, 0xfa, 0xd3, 0x9a, 0x76, 0xd0, 0xf8, 0x7f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x57, 0xd4, 0x2d, 0xc7, 0x1f, 0x06, 0x00, 0x00, } diff --git a/grpcapi/agenda_grpc.pb.go b/grpcapi/agenda_grpc.pb.go index 2853067..000265e 100644 --- a/grpcapi/agenda_grpc.pb.go +++ b/grpcapi/agenda_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.12.4 +// - protoc v3.21.12 // source: agenda.proto package grpcapi diff --git a/grpcapi/events.go b/grpcapi/events.go index cd3961d..f4c4584 100644 --- a/grpcapi/events.go +++ b/grpcapi/events.go @@ -26,6 +26,7 @@ func (e Event) ToStorageType() storage.Event { Allday: e.Allday, MaxSubscribers: e.MaxSubscribers, Subscriptions: []storage.Subscription{}, + DeletedSubscription: []storage.Subscription{}, Data: map[string]any{}, } @@ -33,6 +34,10 @@ func (e Event) ToStorageType() storage.Event { event.Subscriptions = append(event.Subscriptions, v.ToStorageType()) } + for _, v := range e.DeletedSubscription { + event.DeletedSubscription = append(event.DeletedSubscription, v.ToStorageType()) + } + for k, d := range e.Data.GetFields() { jsondata, err := protojson.Marshal(d) if err != nil { @@ -72,12 +77,18 @@ func EventFromStorageType(event *storage.Event) (*Event, error) { } subscriptions := []*Subscription{} + deletedsubscription := []*Subscription{} for _, v := range event.Subscriptions { sub, _ := SubscriptionFromStorageType(v) subscriptions = append(subscriptions, sub) } + for _, v := range event.DeletedSubscription { + sub, _ := SubscriptionFromStorageType(v) + deletedsubscription = append(deletedsubscription, sub) + } + return &Event{ Id: event.ID, Namespace: event.Namespace, @@ -93,6 +104,7 @@ func EventFromStorageType(event *storage.Event) (*Event, error) { Allday: event.Allday, MaxSubscribers: event.MaxSubscribers, Subscriptions: subscriptions, + DeletedSubscription: deletedsubscription, Data: data, }, nil } diff --git a/grpcapi/events.pb.go b/grpcapi/events.pb.go index 01b03ff..77fbe17 100644 --- a/grpcapi/events.pb.go +++ b/grpcapi/events.pb.go @@ -1,403 +1,295 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 // source: events.proto package grpcapi import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fmt "fmt" + proto "github.com/golang/protobuf/proto" structpb "google.golang.org/protobuf/types/known/structpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" + math "math" ) -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type Event struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` - Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` - Owners []string `protobuf:"bytes,4,rep,name=owners,proto3" json:"owners,omitempty"` - RestrictedTo []string `protobuf:"bytes,5,rep,name=restricted_to,json=restrictedTo,proto3" json:"restricted_to,omitempty"` - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` - Startdate *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=startdate,proto3" json:"startdate,omitempty"` - Enddate *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=enddate,proto3" json:"enddate,omitempty"` - Allday bool `protobuf:"varint,10,opt,name=allday,proto3" json:"allday,omitempty"` - Starttime string `protobuf:"bytes,11,opt,name=starttime,proto3" json:"starttime,omitempty"` - Endtime string `protobuf:"bytes,12,opt,name=endtime,proto3" json:"endtime,omitempty"` - MaxSubscribers int64 `protobuf:"varint,13,opt,name=max_subscribers,json=maxSubscribers,proto3" json:"max_subscribers,omitempty"` - Subscriptions []*Subscription `protobuf:"bytes,14,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` - Data *structpb.Struct `protobuf:"bytes,15,opt,name=data,proto3" json:"data,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + Owners []string `protobuf:"bytes,4,rep,name=owners,proto3" json:"owners,omitempty"` + RestrictedTo []string `protobuf:"bytes,5,rep,name=restricted_to,json=restrictedTo,proto3" json:"restricted_to,omitempty"` + Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` + Startdate *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=startdate,proto3" json:"startdate,omitempty"` + Enddate *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=enddate,proto3" json:"enddate,omitempty"` + Allday bool `protobuf:"varint,10,opt,name=allday,proto3" json:"allday,omitempty"` + Starttime string `protobuf:"bytes,11,opt,name=starttime,proto3" json:"starttime,omitempty"` + Endtime string `protobuf:"bytes,12,opt,name=endtime,proto3" json:"endtime,omitempty"` + MaxSubscribers int64 `protobuf:"varint,13,opt,name=max_subscribers,json=maxSubscribers,proto3" json:"max_subscribers,omitempty"` + Subscriptions []*Subscription `protobuf:"bytes,14,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` + DeletedSubscription []*Subscription `protobuf:"bytes,16,rep,name=deleted_subscription,json=deletedSubscription,proto3" json:"deleted_subscription,omitempty"` + Data *structpb.Struct `protobuf:"bytes,15,opt,name=data,proto3" json:"data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *Event) Reset() { - *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_events_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Event) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Event) ProtoMessage() {} - -func (x *Event) ProtoReflect() protoreflect.Message { - mi := &file_events_proto_msgTypes[0] - 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 Event.ProtoReflect.Descriptor instead. +func (m *Event) Reset() { *m = Event{} } +func (m *Event) String() string { return proto.CompactTextString(m) } +func (*Event) ProtoMessage() {} func (*Event) Descriptor() ([]byte, []int) { - return file_events_proto_rawDescGZIP(), []int{0} + return fileDescriptor_8f22242cb04491f9, []int{0} } -func (x *Event) GetId() string { - if x != nil { - return x.Id +func (m *Event) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Event.Unmarshal(m, b) +} +func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Event.Marshal(b, m, deterministic) +} +func (m *Event) XXX_Merge(src proto.Message) { + xxx_messageInfo_Event.Merge(m, src) +} +func (m *Event) XXX_Size() int { + return xxx_messageInfo_Event.Size(m) +} +func (m *Event) XXX_DiscardUnknown() { + xxx_messageInfo_Event.DiscardUnknown(m) +} + +var xxx_messageInfo_Event proto.InternalMessageInfo + +func (m *Event) GetId() string { + if m != nil { + return m.Id } return "" } -func (x *Event) GetNamespace() string { - if x != nil { - return x.Namespace +func (m *Event) GetNamespace() string { + if m != nil { + return m.Namespace } return "" } -func (x *Event) GetType() string { - if x != nil { - return x.Type +func (m *Event) GetType() string { + if m != nil { + return m.Type } return "" } -func (x *Event) GetOwners() []string { - if x != nil { - return x.Owners +func (m *Event) GetOwners() []string { + if m != nil { + return m.Owners } return nil } -func (x *Event) GetRestrictedTo() []string { - if x != nil { - return x.RestrictedTo +func (m *Event) GetRestrictedTo() []string { + if m != nil { + return m.RestrictedTo } return nil } -func (x *Event) GetName() string { - if x != nil { - return x.Name +func (m *Event) GetName() string { + if m != nil { + return m.Name } return "" } -func (x *Event) GetDescription() string { - if x != nil { - return x.Description +func (m *Event) GetDescription() string { + if m != nil { + return m.Description } return "" } -func (x *Event) GetStartdate() *timestamppb.Timestamp { - if x != nil { - return x.Startdate +func (m *Event) GetStartdate() *timestamppb.Timestamp { + if m != nil { + return m.Startdate } return nil } -func (x *Event) GetEnddate() *timestamppb.Timestamp { - if x != nil { - return x.Enddate +func (m *Event) GetEnddate() *timestamppb.Timestamp { + if m != nil { + return m.Enddate } return nil } -func (x *Event) GetAllday() bool { - if x != nil { - return x.Allday +func (m *Event) GetAllday() bool { + if m != nil { + return m.Allday } return false } -func (x *Event) GetStarttime() string { - if x != nil { - return x.Starttime +func (m *Event) GetStarttime() string { + if m != nil { + return m.Starttime } return "" } -func (x *Event) GetEndtime() string { - if x != nil { - return x.Endtime +func (m *Event) GetEndtime() string { + if m != nil { + return m.Endtime } return "" } -func (x *Event) GetMaxSubscribers() int64 { - if x != nil { - return x.MaxSubscribers +func (m *Event) GetMaxSubscribers() int64 { + if m != nil { + return m.MaxSubscribers } return 0 } -func (x *Event) GetSubscriptions() []*Subscription { - if x != nil { - return x.Subscriptions +func (m *Event) GetSubscriptions() []*Subscription { + if m != nil { + return m.Subscriptions } return nil } -func (x *Event) GetData() *structpb.Struct { - if x != nil { - return x.Data +func (m *Event) GetDeletedSubscription() []*Subscription { + if m != nil { + return m.DeletedSubscription + } + return nil +} + +func (m *Event) GetData() *structpb.Struct { + if m != nil { + return m.Data } return nil } type Subscription struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - 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 *structpb.Struct `protobuf:"bytes,23,opt,name=data,proto3" json:"data,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,24,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + 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 *structpb.Struct `protobuf:"bytes,23,opt,name=data,proto3" json:"data,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,24,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *Subscription) Reset() { - *x = Subscription{} - if protoimpl.UnsafeEnabled { - mi := &file_events_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Subscription) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Subscription) ProtoMessage() {} - -func (x *Subscription) ProtoReflect() protoreflect.Message { - mi := &file_events_proto_msgTypes[1] - 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 Subscription.ProtoReflect.Descriptor instead. +func (m *Subscription) Reset() { *m = Subscription{} } +func (m *Subscription) String() string { return proto.CompactTextString(m) } +func (*Subscription) ProtoMessage() {} func (*Subscription) Descriptor() ([]byte, []int) { - return file_events_proto_rawDescGZIP(), []int{1} + return fileDescriptor_8f22242cb04491f9, []int{1} } -func (x *Subscription) GetId() string { - if x != nil { - return x.Id +func (m *Subscription) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Subscription.Unmarshal(m, b) +} +func (m *Subscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Subscription.Marshal(b, m, deterministic) +} +func (m *Subscription) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subscription.Merge(m, src) +} +func (m *Subscription) XXX_Size() int { + return xxx_messageInfo_Subscription.Size(m) +} +func (m *Subscription) XXX_DiscardUnknown() { + xxx_messageInfo_Subscription.DiscardUnknown(m) +} + +var xxx_messageInfo_Subscription proto.InternalMessageInfo + +func (m *Subscription) GetId() string { + if m != nil { + return m.Id } return "" } -func (x *Subscription) GetSubscriber() string { - if x != nil { - return x.Subscriber +func (m *Subscription) GetSubscriber() string { + if m != nil { + return m.Subscriber } return "" } -func (x *Subscription) GetTags() []string { - if x != nil { - return x.Tags +func (m *Subscription) GetTags() []string { + if m != nil { + return m.Tags } return nil } -func (x *Subscription) GetData() *structpb.Struct { - if x != nil { - return x.Data +func (m *Subscription) GetData() *structpb.Struct { + if m != nil { + return m.Data } return nil } -func (x *Subscription) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt +func (m *Subscription) GetCreatedAt() *timestamppb.Timestamp { + if m != nil { + return m.CreatedAt } return nil } -var File_events_proto protoreflect.FileDescriptor - -var file_events_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x04, - 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, 0x5f, - 0x74, 0x6f, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, - 0x63, 0x74, 0x65, 0x64, 0x54, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, - 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, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x09, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x64, 0x61, 0x74, 0x65, 0x18, 0x08, 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, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x64, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x64, 0x61, 0x74, - 0x65, 0x18, 0x09, 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, 0x07, 0x65, 0x6e, 0x64, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x6c, - 0x6c, 0x64, 0x61, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x69, - 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, - 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x73, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x62, 0x65, 0x72, 0x73, 0x12, 0x33, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x53, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x0f, 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, 0x22, 0xba, 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, +func init() { + proto.RegisterType((*Event)(nil), "Event") + proto.RegisterType((*Subscription)(nil), "Subscription") } -var ( - file_events_proto_rawDescOnce sync.Once - file_events_proto_rawDescData = file_events_proto_rawDesc -) - -func file_events_proto_rawDescGZIP() []byte { - file_events_proto_rawDescOnce.Do(func() { - file_events_proto_rawDescData = protoimpl.X.CompressGZIP(file_events_proto_rawDescData) - }) - return file_events_proto_rawDescData +func init() { + proto.RegisterFile("events.proto", fileDescriptor_8f22242cb04491f9) } -var file_events_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_events_proto_goTypes = []interface{}{ - (*Event)(nil), // 0: Event - (*Subscription)(nil), // 1: Subscription - (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp - (*structpb.Struct)(nil), // 3: google.protobuf.Struct -} -var file_events_proto_depIdxs = []int32{ - 2, // 0: Event.startdate:type_name -> google.protobuf.Timestamp - 2, // 1: Event.enddate:type_name -> google.protobuf.Timestamp - 1, // 2: Event.subscriptions:type_name -> Subscription - 3, // 3: Event.data:type_name -> google.protobuf.Struct - 3, // 4: Subscription.data:type_name -> google.protobuf.Struct - 2, // 5: Subscription.created_at:type_name -> google.protobuf.Timestamp - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_events_proto_init() } -func file_events_proto_init() { - if File_events_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Subscription); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_events_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_events_proto_goTypes, - DependencyIndexes: file_events_proto_depIdxs, - MessageInfos: file_events_proto_msgTypes, - }.Build() - File_events_proto = out.File - file_events_proto_rawDesc = nil - file_events_proto_goTypes = nil - file_events_proto_depIdxs = nil +var fileDescriptor_8f22242cb04491f9 = []byte{ + // 458 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x4d, 0x6f, 0xd4, 0x30, + 0x10, 0x55, 0x76, 0xb7, 0xdb, 0x66, 0xf6, 0xa3, 0xc8, 0x94, 0xd6, 0xaa, 0x2a, 0x88, 0xca, 0x81, + 0x48, 0x40, 0x22, 0xb5, 0x1c, 0xe0, 0x06, 0x48, 0xfc, 0x81, 0x6c, 0x4f, 0x5c, 0x2a, 0x6f, 0xec, + 0x46, 0x91, 0x92, 0xd8, 0xb2, 0x67, 0xa1, 0xfd, 0x6b, 0xfc, 0x03, 0xfe, 0x15, 0xf2, 0x24, 0xbb, + 0x49, 0x01, 0x69, 0x7b, 0x9b, 0x79, 0xef, 0xcd, 0xd8, 0xef, 0x69, 0x60, 0xae, 0x7e, 0xa8, 0x06, + 0x5d, 0x62, 0xac, 0x46, 0x7d, 0x7e, 0x51, 0x68, 0x5d, 0x54, 0x2a, 0xa5, 0x6e, 0xbd, 0xb9, 0x4b, + 0x1d, 0xda, 0x4d, 0x8e, 0x1d, 0xfb, 0xea, 0x6f, 0x16, 0xcb, 0x5a, 0x39, 0x14, 0xb5, 0x69, 0x05, + 0x97, 0xbf, 0x27, 0x70, 0xf0, 0xcd, 0xef, 0x63, 0x4b, 0x18, 0x95, 0x92, 0x07, 0x51, 0x10, 0x87, + 0xd9, 0xa8, 0x94, 0xec, 0x02, 0xc2, 0x46, 0xd4, 0xca, 0x19, 0x91, 0x2b, 0x3e, 0x22, 0xb8, 0x07, + 0x18, 0x83, 0x09, 0x3e, 0x18, 0xc5, 0xc7, 0x44, 0x50, 0xcd, 0x4e, 0x61, 0xaa, 0x7f, 0x36, 0xca, + 0x3a, 0x3e, 0x89, 0xc6, 0x71, 0x98, 0x75, 0x1d, 0x7b, 0x0d, 0x0b, 0xab, 0x1c, 0xda, 0x32, 0x47, + 0x25, 0x6f, 0x51, 0xf3, 0x03, 0xa2, 0xe7, 0x3d, 0x78, 0xa3, 0xfd, 0x42, 0xbf, 0x9d, 0x4f, 0xdb, + 0x85, 0xbe, 0x66, 0x11, 0xcc, 0xa4, 0x72, 0xb9, 0x2d, 0x0d, 0x96, 0xba, 0xe1, 0x87, 0x44, 0x0d, + 0x21, 0xf6, 0x11, 0x42, 0x87, 0xc2, 0xa2, 0x14, 0xa8, 0xf8, 0x51, 0x14, 0xc4, 0xb3, 0xab, 0xf3, + 0xa4, 0xf5, 0x9c, 0x6c, 0x3d, 0x27, 0x37, 0x5b, 0xcf, 0x59, 0x2f, 0x66, 0x1f, 0xe0, 0x50, 0x35, + 0x92, 0xe6, 0xc2, 0xbd, 0x73, 0x5b, 0xa9, 0xb7, 0x28, 0xaa, 0x4a, 0x8a, 0x07, 0x0e, 0x51, 0x10, + 0x1f, 0x65, 0x5d, 0xe7, 0xc3, 0xa2, 0xd5, 0x3e, 0x5e, 0x3e, 0x6b, 0xc3, 0xda, 0x01, 0x8c, 0xd3, + 0x5b, 0xc4, 0xcd, 0x89, 0xdb, 0xb6, 0xec, 0x0d, 0x1c, 0xd7, 0xe2, 0xfe, 0xd6, 0x6d, 0xd6, 0xde, + 0xd3, 0xda, 0x67, 0xb7, 0x88, 0x82, 0x78, 0x9c, 0x2d, 0x6b, 0x71, 0xbf, 0xea, 0x51, 0x76, 0x0d, + 0x8b, 0x4e, 0x44, 0xc6, 0x1d, 0x5f, 0x46, 0xe3, 0x78, 0x76, 0xb5, 0x48, 0x56, 0x03, 0x34, 0x7b, + 0xac, 0x61, 0x9f, 0xe1, 0x44, 0xaa, 0x4a, 0xf9, 0xd4, 0x87, 0x04, 0x7f, 0xf6, 0xbf, 0xd9, 0xe7, + 0x9d, 0x74, 0x08, 0xb2, 0xb7, 0x30, 0x91, 0x02, 0x05, 0x3f, 0xa6, 0x88, 0xce, 0xfe, 0x89, 0x68, + 0x45, 0xc7, 0x96, 0x91, 0xe8, 0xf2, 0x57, 0x00, 0xf3, 0x47, 0xd3, 0xed, 0x49, 0x9d, 0xec, 0x4e, + 0xea, 0x25, 0x40, 0xef, 0x94, 0xbf, 0x20, 0x7c, 0x80, 0xd0, 0x51, 0x89, 0xc2, 0xf1, 0x53, 0xba, + 0x0f, 0xaa, 0x77, 0x3f, 0x38, 0x7b, 0xc2, 0x0f, 0xd8, 0x27, 0x80, 0xdc, 0x2a, 0xe1, 0x0d, 0x0b, + 0xe4, 0x7c, 0xff, 0x3d, 0x74, 0xea, 0x2f, 0xf8, 0x35, 0xf9, 0xfe, 0xae, 0x28, 0x31, 0xc9, 0xb5, + 0x36, 0x85, 0x4e, 0x4a, 0x9d, 0xb6, 0xd5, 0x7b, 0x53, 0x09, 0xbc, 0xd3, 0xb6, 0x4e, 0x45, 0xa1, + 0x1a, 0x29, 0xd2, 0xc2, 0x9a, 0x5c, 0x98, 0x72, 0x3d, 0xa5, 0x75, 0xd7, 0x7f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x5f, 0xdb, 0xa6, 0x2e, 0x8e, 0x03, 0x00, 0x00, } diff --git a/grpcapi/events.proto b/grpcapi/events.proto index f90cd5f..c93d675 100644 --- a/grpcapi/events.proto +++ b/grpcapi/events.proto @@ -20,6 +20,7 @@ message Event { string endtime = 12; int64 max_subscribers = 13; repeated Subscription subscriptions = 14; + repeated Subscription deleted_subscription = 16; google.protobuf.Struct data = 15; } diff --git a/storage/mongodb.go b/storage/mongodb.go index 016f10d..23dbe02 100644 --- a/storage/mongodb.go +++ b/storage/mongodb.go @@ -63,6 +63,8 @@ func (s MongoDBStorage) GetEvent(id string) (*Event, error) { return nil, err } + fmt.Printf("%+v\n", event) + return event, nil } @@ -132,7 +134,7 @@ func (s MongoDBStorage) UpdateSubscription(eventid string, subscriber string, de for i := range event.Subscriptions { if event.Subscriptions[i].Subscriber == subscriber { filter := bson.M{"_id": eventid} - push := bson.M{"$push": bson.M{"deletesubscriptions": deletesubscription}} + push := bson.M{"$push": bson.M{"deletedsubscriptions": deletesubscription}} pull := bson.M{"$pull": bson.M{"subscriptions": bson.M{"subscriber": subscriber}}} _, er := collection.UpdateOne(context.TODO(), filter, push) if _, err := collection.UpdateOne(context.TODO(), filter, pull); err != nil {