From 66cc1868f94a0e4d31cd059d0eff5ee366eb4d47 Mon Sep 17 00:00:00 2001 From: Damien Whitten Date: Fri, 11 Apr 2025 12:14:28 -0700 Subject: [PATCH] Replay Protos --- .../gen/o5/ges/v1/ges_spb/events.p.j5s.pb.go | 473 ++++++++++++++---- .../o5/ges/v1/ges_spb/events.p.j5s_grpc.pb.go | 127 +++++ internal/service/app.go | 20 +- internal/service/command.go | 61 +++ internal/service/query.go | 17 +- schema/ges/o5/ges/v1/events.j5s | 32 ++ .../ges/o5/ges/v1/service/events.p.j5s.proto | 63 +++ schema/test/gestest/v1/topic/foo.p.j5s.proto | 12 +- 8 files changed, 701 insertions(+), 104 deletions(-) create mode 100644 internal/service/command.go diff --git a/internal/gen/o5/ges/v1/ges_spb/events.p.j5s.pb.go b/internal/gen/o5/ges/v1/ges_spb/events.p.j5s.pb.go index a43ea09..be5d050 100644 --- a/internal/gen/o5/ges/v1/ges_spb/events.p.j5s.pb.go +++ b/internal/gen/o5/ges/v1/ges_spb/events.p.j5s.pb.go @@ -9,6 +9,7 @@ package ges_spb import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" ges_pb "github.com/pentops/ges/internal/gen/o5/ges/v1/ges_pb" _ "github.com/pentops/j5/gen/j5/ext/v1/ext_j5pb" list_j5pb "github.com/pentops/j5/gen/j5/list/v1/list_j5pb" @@ -246,76 +247,324 @@ func (x *UpsertListResponse) GetEvents() []*ges_pb.Upsert { return nil } +type ReplayEventsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QueueUrl string `protobuf:"bytes,1,opt,name=queue_url,json=queueUrl,proto3" json:"queue_url,omitempty"` + GrpcService string `protobuf:"bytes,2,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` + GrpcMethod string `protobuf:"bytes,3,opt,name=grpc_method,json=grpcMethod,proto3" json:"grpc_method,omitempty"` +} + +func (x *ReplayEventsRequest) Reset() { + *x = ReplayEventsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_o5_ges_v1_service_events_p_j5s_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReplayEventsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReplayEventsRequest) ProtoMessage() {} + +func (x *ReplayEventsRequest) ProtoReflect() protoreflect.Message { + mi := &file_o5_ges_v1_service_events_p_j5s_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 ReplayEventsRequest.ProtoReflect.Descriptor instead. +func (*ReplayEventsRequest) Descriptor() ([]byte, []int) { + return file_o5_ges_v1_service_events_p_j5s_proto_rawDescGZIP(), []int{4} +} + +func (x *ReplayEventsRequest) GetQueueUrl() string { + if x != nil { + return x.QueueUrl + } + return "" +} + +func (x *ReplayEventsRequest) GetGrpcService() string { + if x != nil { + return x.GrpcService + } + return "" +} + +func (x *ReplayEventsRequest) GetGrpcMethod() string { + if x != nil { + return x.GrpcMethod + } + return "" +} + +type ReplayEventsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ReplayEventsResponse) Reset() { + *x = ReplayEventsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_o5_ges_v1_service_events_p_j5s_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReplayEventsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReplayEventsResponse) ProtoMessage() {} + +func (x *ReplayEventsResponse) ProtoReflect() protoreflect.Message { + mi := &file_o5_ges_v1_service_events_p_j5s_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 ReplayEventsResponse.ProtoReflect.Descriptor instead. +func (*ReplayEventsResponse) Descriptor() ([]byte, []int) { + return file_o5_ges_v1_service_events_p_j5s_proto_rawDescGZIP(), []int{5} +} + +type ReplayUpsertsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QueueUrl string `protobuf:"bytes,1,opt,name=queue_url,json=queueUrl,proto3" json:"queue_url,omitempty"` + GrpcService string `protobuf:"bytes,2,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` + GrpcMethod string `protobuf:"bytes,3,opt,name=grpc_method,json=grpcMethod,proto3" json:"grpc_method,omitempty"` +} + +func (x *ReplayUpsertsRequest) Reset() { + *x = ReplayUpsertsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_o5_ges_v1_service_events_p_j5s_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReplayUpsertsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReplayUpsertsRequest) ProtoMessage() {} + +func (x *ReplayUpsertsRequest) ProtoReflect() protoreflect.Message { + mi := &file_o5_ges_v1_service_events_p_j5s_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 ReplayUpsertsRequest.ProtoReflect.Descriptor instead. +func (*ReplayUpsertsRequest) Descriptor() ([]byte, []int) { + return file_o5_ges_v1_service_events_p_j5s_proto_rawDescGZIP(), []int{6} +} + +func (x *ReplayUpsertsRequest) GetQueueUrl() string { + if x != nil { + return x.QueueUrl + } + return "" +} + +func (x *ReplayUpsertsRequest) GetGrpcService() string { + if x != nil { + return x.GrpcService + } + return "" +} + +func (x *ReplayUpsertsRequest) GetGrpcMethod() string { + if x != nil { + return x.GrpcMethod + } + return "" +} + +type ReplayUpsertsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ReplayUpsertsResponse) Reset() { + *x = ReplayUpsertsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_o5_ges_v1_service_events_p_j5s_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReplayUpsertsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReplayUpsertsResponse) ProtoMessage() {} + +func (x *ReplayUpsertsResponse) ProtoReflect() protoreflect.Message { + mi := &file_o5_ges_v1_service_events_p_j5s_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 ReplayUpsertsResponse.ProtoReflect.Descriptor instead. +func (*ReplayUpsertsResponse) Descriptor() ([]byte, []int) { + return file_o5_ges_v1_service_events_p_j5s_proto_rawDescGZIP(), []int{7} +} + var File_o5_ges_v1_service_events_p_j5s_proto protoreflect.FileDescriptor var file_o5_ges_v1_service_events_p_j5s_proto_rawDesc = []byte{ 0x0a, 0x24, 0x6f, 0x35, 0x2f, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x2e, 0x6a, 0x35, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x6f, 0x35, 0x2e, 0x67, 0x65, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6a, 0x35, 0x2f, 0x65, 0x78, 0x74, 0x2f, - 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x6a, 0x35, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x2f, 0x76, 0x31, - 0x2f, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x6a, 0x35, 0x2f, - 0x6c, 0x69, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x6f, 0x35, 0x2f, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x6a, 0x35, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x8b, 0x01, 0x0a, 0x11, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6a, 0x35, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x07, 0xc2, 0xff, - 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6a, 0x35, 0x2e, - 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x42, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x05, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x3a, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x22, 0x88, 0x01, - 0x0a, 0x12, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6a, 0x35, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x07, 0xc2, 0xff, - 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x35, - 0x2e, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xc2, - 0xff, 0x8e, 0x02, 0x03, 0xaa, 0x01, 0x00, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3a, - 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x22, 0x8b, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x73, - 0x65, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, - 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6a, - 0x35, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x04, - 0x70, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6a, 0x35, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x07, 0xc2, - 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x3a, 0x07, 0xc2, - 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x22, 0x89, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x73, 0x65, 0x72, - 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, - 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6a, 0x35, - 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x04, - 0x70, 0x61, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x35, 0x2e, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x42, 0x08, 0xc2, 0xff, 0x8e, 0x02, 0x03, 0xaa, 0x01, - 0x00, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, - 0x52, 0x00, 0x32, 0xf4, 0x01, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x71, 0x0a, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x24, 0x2e, 0x6f, 0x35, 0x2e, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6f, 0x35, 0x2e, 0x67, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x71, 0x0a, 0x0a, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, - 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x6f, 0x35, 0x2e, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6f, 0x35, 0x2e, - 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x55, - 0x70, 0x73, 0x65, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x67, 0x65, 0x73, 0x2f, - 0x76, 0x31, 0x2f, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x6e, 0x74, 0x6f, 0x70, 0x73, 0x2f, - 0x67, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x6f, 0x35, 0x2f, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x73, 0x5f, 0x73, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6a, 0x35, 0x2f, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x31, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x15, 0x6a, 0x35, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, + 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x6a, 0x35, 0x2f, 0x6c, 0x69, 0x73, + 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1a, 0x6f, 0x35, 0x2f, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x6a, 0x35, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8b, 0x01, 0x0a, + 0x11, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x34, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x6a, 0x35, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, + 0x52, 0x00, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6a, 0x35, 0x2e, 0x6c, 0x69, 0x73, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x42, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x3a, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x22, 0x88, 0x01, 0x0a, 0x12, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x35, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x6a, 0x35, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, + 0x52, 0x00, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6f, 0x35, 0x2e, 0x67, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xc2, 0xff, 0x8e, 0x02, + 0x03, 0xaa, 0x01, 0x00, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x07, 0xc2, 0xff, + 0x8e, 0x02, 0x02, 0x52, 0x00, 0x22, 0x8b, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x04, 0x70, + 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6a, 0x35, 0x2e, 0x6c, + 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x42, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x04, 0x70, 0x61, 0x67, + 0x65, 0x12, 0x37, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x6a, 0x35, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x07, 0xc2, 0xff, 0x8e, 0x02, + 0x02, 0x52, 0x00, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x3a, 0x07, 0xc2, 0xff, 0x8e, 0x02, + 0x02, 0x52, 0x00, 0x22, 0x89, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x70, 0x61, + 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6a, 0x35, 0x2e, 0x6c, 0x69, + 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x04, 0x70, 0x61, 0x67, + 0x65, 0x12, 0x33, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x35, 0x2e, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, + 0x73, 0x65, 0x72, 0x74, 0x42, 0x08, 0xc2, 0xff, 0x8e, 0x02, 0x03, 0xaa, 0x01, 0x00, 0x52, 0x06, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x22, + 0xaf, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, + 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x03, 0xf2, 0x01, 0x00, 0x52, 0x08, 0x71, 0x75, 0x65, 0x75, + 0x65, 0x55, 0x72, 0x6c, 0x12, 0x31, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x03, 0xf2, 0x01, 0x00, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x5f, + 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x03, 0xf2, 0x01, 0x00, 0x52, 0x0a, 0x67, 0x72, + 0x70, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3a, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, + 0x00, 0x22, 0x1f, 0x0a, 0x14, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, + 0x52, 0x00, 0x22, 0xb0, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x55, 0x70, 0x73, + 0x65, 0x72, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x09, 0x71, + 0x75, 0x65, 0x75, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x03, 0xf2, 0x01, 0x00, 0x52, 0x08, + 0x71, 0x75, 0x65, 0x75, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x31, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, + 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x03, 0xf2, 0x01, 0x00, 0x52, 0x0b, + 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x0b, 0x67, + 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x0e, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x03, 0xf2, 0x01, 0x00, + 0x52, 0x0a, 0x67, 0x72, 0x70, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3a, 0x07, 0xc2, 0xff, + 0x8e, 0x02, 0x02, 0x52, 0x00, 0x22, 0x20, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x55, + 0x70, 0x73, 0x65, 0x72, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x07, + 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x32, 0xf4, 0x01, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x71, 0x0a, 0x0a, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x6f, 0x35, 0x2e, 0x67, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6f, + 0x35, 0x2e, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x67, 0x65, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x71, 0x0a, 0x0a, 0x55, + 0x70, 0x73, 0x65, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x6f, 0x35, 0x2e, 0x67, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x55, 0x70, + 0x73, 0x65, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x25, 0x2e, 0x6f, 0x35, 0x2e, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, + 0x2f, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x32, 0x9c, + 0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x26, 0x2e, 0x6f, 0x35, 0x2e, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6f, 0x35, 0x2e, + 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, + 0x65, 0x70, 0x6c, 0x61, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, + 0x2f, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x72, + 0x65, 0x70, 0x6c, 0x61, 0x79, 0x12, 0x85, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, + 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x73, 0x12, 0x27, 0x2e, 0x6f, 0x35, 0x2e, 0x67, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6c, + 0x61, 0x79, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x28, 0x2e, 0x6f, 0x35, 0x2e, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x55, 0x70, 0x73, 0x65, 0x72, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x75, + 0x70, 0x73, 0x65, 0x72, 0x74, 0x73, 0x2f, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x42, 0x37, 0x5a, + 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x6e, 0x74, + 0x6f, 0x70, 0x73, 0x2f, 0x67, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x35, 0x2f, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x67, + 0x65, 0x73, 0x5f, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -330,33 +579,41 @@ func file_o5_ges_v1_service_events_p_j5s_proto_rawDescGZIP() []byte { return file_o5_ges_v1_service_events_p_j5s_proto_rawDescData } -var file_o5_ges_v1_service_events_p_j5s_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_o5_ges_v1_service_events_p_j5s_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_o5_ges_v1_service_events_p_j5s_proto_goTypes = []interface{}{ (*EventsListRequest)(nil), // 0: o5.ges.v1.service.EventsListRequest (*EventsListResponse)(nil), // 1: o5.ges.v1.service.EventsListResponse (*UpsertListRequest)(nil), // 2: o5.ges.v1.service.UpsertListRequest (*UpsertListResponse)(nil), // 3: o5.ges.v1.service.UpsertListResponse - (*list_j5pb.PageRequest)(nil), // 4: j5.list.v1.PageRequest - (*list_j5pb.QueryRequest)(nil), // 5: j5.list.v1.QueryRequest - (*list_j5pb.PageResponse)(nil), // 6: j5.list.v1.PageResponse - (*ges_pb.Event)(nil), // 7: o5.ges.v1.Event - (*ges_pb.Upsert)(nil), // 8: o5.ges.v1.Upsert + (*ReplayEventsRequest)(nil), // 4: o5.ges.v1.service.ReplayEventsRequest + (*ReplayEventsResponse)(nil), // 5: o5.ges.v1.service.ReplayEventsResponse + (*ReplayUpsertsRequest)(nil), // 6: o5.ges.v1.service.ReplayUpsertsRequest + (*ReplayUpsertsResponse)(nil), // 7: o5.ges.v1.service.ReplayUpsertsResponse + (*list_j5pb.PageRequest)(nil), // 8: j5.list.v1.PageRequest + (*list_j5pb.QueryRequest)(nil), // 9: j5.list.v1.QueryRequest + (*list_j5pb.PageResponse)(nil), // 10: j5.list.v1.PageResponse + (*ges_pb.Event)(nil), // 11: o5.ges.v1.Event + (*ges_pb.Upsert)(nil), // 12: o5.ges.v1.Upsert } var file_o5_ges_v1_service_events_p_j5s_proto_depIdxs = []int32{ - 4, // 0: o5.ges.v1.service.EventsListRequest.page:type_name -> j5.list.v1.PageRequest - 5, // 1: o5.ges.v1.service.EventsListRequest.query:type_name -> j5.list.v1.QueryRequest - 6, // 2: o5.ges.v1.service.EventsListResponse.page:type_name -> j5.list.v1.PageResponse - 7, // 3: o5.ges.v1.service.EventsListResponse.events:type_name -> o5.ges.v1.Event - 4, // 4: o5.ges.v1.service.UpsertListRequest.page:type_name -> j5.list.v1.PageRequest - 5, // 5: o5.ges.v1.service.UpsertListRequest.query:type_name -> j5.list.v1.QueryRequest - 6, // 6: o5.ges.v1.service.UpsertListResponse.page:type_name -> j5.list.v1.PageResponse - 8, // 7: o5.ges.v1.service.UpsertListResponse.events:type_name -> o5.ges.v1.Upsert + 8, // 0: o5.ges.v1.service.EventsListRequest.page:type_name -> j5.list.v1.PageRequest + 9, // 1: o5.ges.v1.service.EventsListRequest.query:type_name -> j5.list.v1.QueryRequest + 10, // 2: o5.ges.v1.service.EventsListResponse.page:type_name -> j5.list.v1.PageResponse + 11, // 3: o5.ges.v1.service.EventsListResponse.events:type_name -> o5.ges.v1.Event + 8, // 4: o5.ges.v1.service.UpsertListRequest.page:type_name -> j5.list.v1.PageRequest + 9, // 5: o5.ges.v1.service.UpsertListRequest.query:type_name -> j5.list.v1.QueryRequest + 10, // 6: o5.ges.v1.service.UpsertListResponse.page:type_name -> j5.list.v1.PageResponse + 12, // 7: o5.ges.v1.service.UpsertListResponse.events:type_name -> o5.ges.v1.Upsert 0, // 8: o5.ges.v1.service.QueryService.EventsList:input_type -> o5.ges.v1.service.EventsListRequest 2, // 9: o5.ges.v1.service.QueryService.UpsertList:input_type -> o5.ges.v1.service.UpsertListRequest - 1, // 10: o5.ges.v1.service.QueryService.EventsList:output_type -> o5.ges.v1.service.EventsListResponse - 3, // 11: o5.ges.v1.service.QueryService.UpsertList:output_type -> o5.ges.v1.service.UpsertListResponse - 10, // [10:12] is the sub-list for method output_type - 8, // [8:10] is the sub-list for method input_type + 4, // 10: o5.ges.v1.service.CommandService.ReplayEvents:input_type -> o5.ges.v1.service.ReplayEventsRequest + 6, // 11: o5.ges.v1.service.CommandService.ReplayUpserts:input_type -> o5.ges.v1.service.ReplayUpsertsRequest + 1, // 12: o5.ges.v1.service.QueryService.EventsList:output_type -> o5.ges.v1.service.EventsListResponse + 3, // 13: o5.ges.v1.service.QueryService.UpsertList:output_type -> o5.ges.v1.service.UpsertListResponse + 5, // 14: o5.ges.v1.service.CommandService.ReplayEvents:output_type -> o5.ges.v1.service.ReplayEventsResponse + 7, // 15: o5.ges.v1.service.CommandService.ReplayUpserts:output_type -> o5.ges.v1.service.ReplayUpsertsResponse + 12, // [12:16] is the sub-list for method output_type + 8, // [8:12] 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 @@ -416,6 +673,54 @@ func file_o5_ges_v1_service_events_p_j5s_proto_init() { return nil } } + file_o5_ges_v1_service_events_p_j5s_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReplayEventsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_o5_ges_v1_service_events_p_j5s_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReplayEventsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_o5_ges_v1_service_events_p_j5s_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReplayUpsertsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_o5_ges_v1_service_events_p_j5s_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReplayUpsertsResponse); 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{ @@ -423,9 +728,9 @@ func file_o5_ges_v1_service_events_p_j5s_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_o5_ges_v1_service_events_p_j5s_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 8, NumExtensions: 0, - NumServices: 1, + NumServices: 2, }, GoTypes: file_o5_ges_v1_service_events_p_j5s_proto_goTypes, DependencyIndexes: file_o5_ges_v1_service_events_p_j5s_proto_depIdxs, diff --git a/internal/gen/o5/ges/v1/ges_spb/events.p.j5s_grpc.pb.go b/internal/gen/o5/ges/v1/ges_spb/events.p.j5s_grpc.pb.go index 1329698..b0965a4 100644 --- a/internal/gen/o5/ges/v1/ges_spb/events.p.j5s_grpc.pb.go +++ b/internal/gen/o5/ges/v1/ges_spb/events.p.j5s_grpc.pb.go @@ -146,3 +146,130 @@ var QueryService_ServiceDesc = grpc.ServiceDesc{ Streams: []grpc.StreamDesc{}, Metadata: "o5/ges/v1/service/events.p.j5s.proto", } + +const ( + CommandService_ReplayEvents_FullMethodName = "/o5.ges.v1.service.CommandService/ReplayEvents" + CommandService_ReplayUpserts_FullMethodName = "/o5.ges.v1.service.CommandService/ReplayUpserts" +) + +// CommandServiceClient is the client API for CommandService 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 CommandServiceClient interface { + ReplayEvents(ctx context.Context, in *ReplayEventsRequest, opts ...grpc.CallOption) (*ReplayEventsResponse, error) + ReplayUpserts(ctx context.Context, in *ReplayUpsertsRequest, opts ...grpc.CallOption) (*ReplayUpsertsResponse, error) +} + +type commandServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewCommandServiceClient(cc grpc.ClientConnInterface) CommandServiceClient { + return &commandServiceClient{cc} +} + +func (c *commandServiceClient) ReplayEvents(ctx context.Context, in *ReplayEventsRequest, opts ...grpc.CallOption) (*ReplayEventsResponse, error) { + out := new(ReplayEventsResponse) + err := c.cc.Invoke(ctx, CommandService_ReplayEvents_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *commandServiceClient) ReplayUpserts(ctx context.Context, in *ReplayUpsertsRequest, opts ...grpc.CallOption) (*ReplayUpsertsResponse, error) { + out := new(ReplayUpsertsResponse) + err := c.cc.Invoke(ctx, CommandService_ReplayUpserts_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CommandServiceServer is the server API for CommandService service. +// All implementations must embed UnimplementedCommandServiceServer +// for forward compatibility +type CommandServiceServer interface { + ReplayEvents(context.Context, *ReplayEventsRequest) (*ReplayEventsResponse, error) + ReplayUpserts(context.Context, *ReplayUpsertsRequest) (*ReplayUpsertsResponse, error) + mustEmbedUnimplementedCommandServiceServer() +} + +// UnimplementedCommandServiceServer must be embedded to have forward compatible implementations. +type UnimplementedCommandServiceServer struct { +} + +func (UnimplementedCommandServiceServer) ReplayEvents(context.Context, *ReplayEventsRequest) (*ReplayEventsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplayEvents not implemented") +} +func (UnimplementedCommandServiceServer) ReplayUpserts(context.Context, *ReplayUpsertsRequest) (*ReplayUpsertsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplayUpserts not implemented") +} +func (UnimplementedCommandServiceServer) mustEmbedUnimplementedCommandServiceServer() {} + +// UnsafeCommandServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CommandServiceServer will +// result in compilation errors. +type UnsafeCommandServiceServer interface { + mustEmbedUnimplementedCommandServiceServer() +} + +func RegisterCommandServiceServer(s grpc.ServiceRegistrar, srv CommandServiceServer) { + s.RegisterService(&CommandService_ServiceDesc, srv) +} + +func _CommandService_ReplayEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReplayEventsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CommandServiceServer).ReplayEvents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CommandService_ReplayEvents_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CommandServiceServer).ReplayEvents(ctx, req.(*ReplayEventsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CommandService_ReplayUpserts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReplayUpsertsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CommandServiceServer).ReplayUpserts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CommandService_ReplayUpserts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CommandServiceServer).ReplayUpserts(ctx, req.(*ReplayUpsertsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// CommandService_ServiceDesc is the grpc.ServiceDesc for CommandService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var CommandService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "o5.ges.v1.service.CommandService", + HandlerType: (*CommandServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ReplayEvents", + Handler: _CommandService_ReplayEvents_Handler, + }, + { + MethodName: "ReplayUpserts", + Handler: _CommandService_ReplayUpserts_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "o5/ges/v1/service/events.p.j5s.proto", +} diff --git a/internal/service/app.go b/internal/service/app.go index 9105c68..273d246 100644 --- a/internal/service/app.go +++ b/internal/service/app.go @@ -11,9 +11,10 @@ import ( ) type App struct { - QueryService *QueryService - EventWorker *EventWorker - ReplayWorker *ReplayWorker + QueryService *QueryService + CommandService *CommandService + EventWorker *EventWorker + ReplayWorker *ReplayWorker } func NewApp(db sqrlx.Transactor) (*App, error) { @@ -22,18 +23,25 @@ func NewApp(db sqrlx.Transactor) (*App, error) { return nil, fmt.Errorf("failed to create query service: %w", err) } + cs, err := NewCommandService(db) + if err != nil { + return nil, fmt.Errorf("failed to create command service: %w", err) + } + replayWorker := NewReplayWorker(db) app := &App{ - QueryService: qs, - EventWorker: NewEventWorker(db), - ReplayWorker: replayWorker, + QueryService: qs, + CommandService: cs, + EventWorker: NewEventWorker(db), + ReplayWorker: replayWorker, } return app, nil } func (a *App) RegisterGRPC(server grpc.ServiceRegistrar) { a.QueryService.RegisterGRPC(server) + a.CommandService.RegisterGRPC(server) a.EventWorker.RegisterGRPC(server) a.ReplayWorker.RegisterGRPC(server) } diff --git a/internal/service/command.go b/internal/service/command.go new file mode 100644 index 0000000..7351743 --- /dev/null +++ b/internal/service/command.go @@ -0,0 +1,61 @@ +package service + +import ( + "context" + + "github.com/pentops/ges/internal/gen/o5/ges/v1/ges_spb" + "github.com/pentops/ges/internal/gen/o5/ges/v1/ges_tpb" + "github.com/pentops/o5-messaging/outbox" + "github.com/pentops/sqrlx.go/sqrlx" + "google.golang.org/grpc" +) + +type CommandService struct { + db sqrlx.Transactor + + ges_spb.UnsafeCommandServiceServer +} + +func NewCommandService(db sqrlx.Transactor) (*CommandService, error) { + return &CommandService{ + db: db, + }, nil +} + +func (s *CommandService) RegisterGRPC(server grpc.ServiceRegistrar) { + ges_spb.RegisterCommandServiceServer(server, s) +} + +func (s *CommandService) ReplayEvents(ctx context.Context, req *ges_spb.ReplayEventsRequest) (*ges_spb.ReplayEventsResponse, error) { + msg := &ges_tpb.EventsMessage{ + QueueUrl: req.QueueUrl, + GrpcService: req.GrpcService, + GrpcMethod: req.GrpcService, + } + if err := s.db.Transact(ctx, &sqrlx.TxOptions{ + ReadOnly: false, + Retryable: true, + }, func(ctx context.Context, tx sqrlx.Transaction) error { + return outbox.Send(ctx, tx, msg) + }); err != nil { + return nil, err + } + return &ges_spb.ReplayEventsResponse{}, nil +} + +func (s *CommandService) ReplayUpserts(ctx context.Context, req *ges_spb.ReplayUpsertsRequest) (*ges_spb.ReplayUpsertsResponse, error) { + msg := &ges_tpb.UpsertsMessage{ + QueueUrl: req.QueueUrl, + GrpcService: req.GrpcService, + GrpcMethod: req.GrpcService, + } + if err := s.db.Transact(ctx, &sqrlx.TxOptions{ + ReadOnly: false, + Retryable: true, + }, func(ctx context.Context, tx sqrlx.Transaction) error { + return outbox.Send(ctx, tx, msg) + }); err != nil { + return nil, err + } + return &ges_spb.ReplayUpsertsResponse{}, nil +} diff --git a/internal/service/query.go b/internal/service/query.go index d127216..16defaf 100644 --- a/internal/service/query.go +++ b/internal/service/query.go @@ -19,10 +19,7 @@ type QueryService struct { ges_spb.UnsafeQueryServiceServer } -var _ ges_spb.QueryServiceServer = &QueryService{} - func NewQueryService(db sqrlx.Transactor) (*QueryService, error) { - eventLister, err := pquery.NewLister( pquery.ListSpec[*ges_spb.EventsListRequest, *ges_spb.EventsListResponse]{ TableSpec: pquery.TableSpec{ @@ -32,12 +29,11 @@ func NewQueryService(db sqrlx.Transactor) (*QueryService, error) { pquery.NewProtoField("metadata.timestamp", gl.Ptr("timestamp")), pquery.NewProtoField("metadata.event_id", gl.Ptr("id")), }, - //Auth: - //AuthJoin: + // Auth: + // AuthJoin: }, - //RequestFilter: smSpec.ListRequestFilter, + // RequestFilter: smSpec.ListRequestFilter, }) - if err != nil { return nil, fmt.Errorf("create event lister: %w", err) } @@ -51,12 +47,11 @@ func NewQueryService(db sqrlx.Transactor) (*QueryService, error) { pquery.NewProtoField("entity_id", gl.Ptr("entity_id")), pquery.NewProtoField("last_event_timestamp", gl.Ptr("last_event_timestamp")), }, - //Auth: - //AuthJoin: + // Auth: + // AuthJoin: }, - //RequestFilter: smSpec.ListRequestFilter, + // RequestFilter: smSpec.ListRequestFilter, }) - if err != nil { return nil, fmt.Errorf("create upsert lister: %w", err) } diff --git a/schema/ges/o5/ges/v1/events.j5s b/schema/ges/o5/ges/v1/events.j5s index a9dab09..a9ed5cf 100644 --- a/schema/ges/o5/ges/v1/events.j5s +++ b/schema/ges/o5/ges/v1/events.j5s @@ -35,6 +35,37 @@ service Query { field events array:object:Upsert } } +} + +service Command { + basePath = "/ges/v1" + method ReplayEvents { + httpMethod = "POST" + httpPath = "/events/replay" + + request { + field queueURL ! string + field grpcService ! string + field grpcMethod ! string + } + + response { + } + } + + method ReplayUpserts { + httpMethod = "POST" + httpPath = "/upserts/replay" + + request { + field queueURL ! string + field grpcService ! string + field grpcMethod ! string + } + + response { + } + } } @@ -80,3 +111,4 @@ object Upsert { field lastEventTimestamp ! timestamp field data ! any } + diff --git a/schema/ges/o5/ges/v1/service/events.p.j5s.proto b/schema/ges/o5/ges/v1/service/events.p.j5s.proto index f671b13..a44ca99 100644 --- a/schema/ges/o5/ges/v1/service/events.p.j5s.proto +++ b/schema/ges/o5/ges/v1/service/events.p.j5s.proto @@ -4,6 +4,7 @@ syntax = "proto3"; package o5.ges.v1.service; +import "buf/validate/validate.proto"; import "google/api/annotations.proto"; import "j5/ext/v1/annotations.proto"; import "j5/list/v1/page.proto"; @@ -20,6 +21,22 @@ service QueryService { } } +service CommandService { + rpc ReplayEvents(ReplayEventsRequest) returns (ReplayEventsResponse) { + option (google.api.http) = { + post: "/ges/v1/events/replay" + body: "*" + }; + } + + rpc ReplayUpserts(ReplayUpsertsRequest) returns (ReplayUpsertsResponse) { + option (google.api.http) = { + post: "/ges/v1/upserts/replay" + body: "*" + }; + } +} + message EventsListRequest { option (j5.ext.v1.message).object = {}; @@ -51,3 +68,49 @@ message UpsertListResponse { repeated o5.ges.v1.Upsert events = 2 [(j5.ext.v1.field).array = {}]; } + +message ReplayEventsRequest { + option (j5.ext.v1.message).object = {}; + + string queue_url = 1 [ + (buf.validate.field).required = true, + (j5.ext.v1.field).string = {} + ]; + + string grpc_service = 2 [ + (buf.validate.field).required = true, + (j5.ext.v1.field).string = {} + ]; + + string grpc_method = 3 [ + (buf.validate.field).required = true, + (j5.ext.v1.field).string = {} + ]; +} + +message ReplayEventsResponse { + option (j5.ext.v1.message).object = {}; +} + +message ReplayUpsertsRequest { + option (j5.ext.v1.message).object = {}; + + string queue_url = 1 [ + (buf.validate.field).required = true, + (j5.ext.v1.field).string = {} + ]; + + string grpc_service = 2 [ + (buf.validate.field).required = true, + (j5.ext.v1.field).string = {} + ]; + + string grpc_method = 3 [ + (buf.validate.field).required = true, + (j5.ext.v1.field).string = {} + ]; +} + +message ReplayUpsertsResponse { + option (j5.ext.v1.message).object = {}; +} diff --git a/schema/test/gestest/v1/topic/foo.p.j5s.proto b/schema/test/gestest/v1/topic/foo.p.j5s.proto index a26a621..bb62a81 100644 --- a/schema/test/gestest/v1/topic/foo.p.j5s.proto +++ b/schema/test/gestest/v1/topic/foo.p.j5s.proto @@ -15,7 +15,9 @@ import "j5/state/v1/metadata.proto"; service FooPublishTopic { option (j5.messaging.v1.service) = { topic_name: "foo_publish" - event: {entity_name: "gestest.v1.Foo"} + event: { + entity_name: "gestest.v1.Foo" + } }; rpc FooEvent(FooEventMessage) returns (google.protobuf.Empty) {} @@ -24,7 +26,9 @@ service FooPublishTopic { service FooSummaryTopic { option (j5.messaging.v1.service) = { topic_name: "foo_summary" - upsert: {entity_name: "gestest.v1.Foo"} + upsert: { + entity_name: "gestest.v1.Foo" + } }; rpc FooSummary(FooSummaryMessage) returns (google.protobuf.Empty) {} @@ -56,7 +60,9 @@ message FooEventMessage { gestest.v1.FooStatus status = 5 [ (buf.validate.field) = { required: true - enum: {defined_only: true} + enum: { + defined_only: true + } }, (j5.ext.v1.field).enum = {} ];