From 86ce136b441b36b236de69437b69934a9f99d108 Mon Sep 17 00:00:00 2001 From: constient-altrova Date: Thu, 30 Nov 2023 06:54:20 +0000 Subject: [PATCH 1/6] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'livetail/'?= =?UTF-8?q?=20with=20remote=20'livetail/'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- livetail/livetail.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/livetail/livetail.go b/livetail/livetail.go index fb587e2..ef09511 100644 --- a/livetail/livetail.go +++ b/livetail/livetail.go @@ -28,7 +28,7 @@ var request = &pb.FilterRequest{ FieldBasedFilters: []*pb.FieldBasedFilter{}, SearchQueries: []string{}, Sources: []*pb.Source{}, - BatchSize: 100, + BatchSize: 15, IsScrollDown: true, } @@ -106,18 +106,20 @@ func (l *Livetail) CreateConnection() { l.FilterService = grpcutil.NewFilterService() } -func (l *Livetail) GenerateLogs(stop chan error, cfg config.Config) { +func (l *Livetail) GenerateLogs(ctx context.Context, cfg config.Config) { request.Sources = l.pbSources theme := cfg.Get().Theme for { select { - case <-stop: + case <-ctx.Done(): return default: response, err := l.FilterService.Client.GetFilteredData(context.Background(), request) if err != nil { - stop <- err + _, cancel := context.WithCancel(ctx) + defer cancel() + return } @@ -186,7 +188,7 @@ func addOffset(sources []*pb.Source, offset map[string]uint64) []*pb.Source { } // getFilteredData makes the actual grpc call to connect with flink-service. -// func getFilteredData(client pb.FlinkServiceClient, sources []*pb.Source) (*pb.FilteredRecords, error) { +// func getFilteredData(client pb.FilterServiceClient, sources []*pb.Source) (*pb.FilteredRecords, error) { // // Invoke the gRPC method // request.Sources = sources From 94600057705a94683c6f5c8e7592f265e2536b71 Mon Sep 17 00:00:00 2001 From: constient-altrova Date: Thu, 30 Nov 2023 06:54:20 +0000 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'services/'?= =?UTF-8?q?=20with=20remote=20'services/'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/.DS_Store | Bin 0 -> 6148 bytes services/flink-service/.DS_Store | Bin 0 -> 6148 bytes services/flink-service/flink-service.pb.go | 2857 ++++++++++++++--- services/flink-service/flink-service.proto | 201 +- .../flink-service/flink-service_grpc.pb.go | 176 +- 5 files changed, 2640 insertions(+), 594 deletions(-) create mode 100644 services/.DS_Store create mode 100644 services/flink-service/.DS_Store diff --git a/services/.DS_Store b/services/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..a56d3d4da1df3f8225fe57b793da411f38933f2c GIT binary patch literal 6148 zcmeHK%}T>S5T0$TO%b67g&r5YR&5LQ2QRVKgI6PZP^pcL8XB|G^yg3tIqM7gB)*Q$ z>~2M=dekB_F#AnrXExa{VJ8CsqA}=H0g3?Npb};ZID8>APdXzR>&YSty+#+-A%OsT zFr0~I$2>AX?`|1xAc7EL`1t-pxQ5^;QrCW@e2k(`WFK|oRSQ}_X8NP#!Dc@D4^f!( zE0q_K$>tUo^G@DbaxT3)HS+rH{vc_zd*^g@qEzHh?Y4g!2BTJSP~G^mgC)8r7XAVwaKL5tgdbD9k;sC zeXJh!9zfu?t7X~Z6rRxdft#V%iz5}^V$^hnX(l5xzzi@0^UZ)gwVb8-eoTHkW`G&^ z0|w}Pkf?;N#nhlaI&jb}0Adc^TF|B+Maq#DU5lwfoIw#L715*$+hPclj(%z5T#Kne zlMcc*AHv>Q*bYVLyW{#&hl6kp^2iJ@1D_e7-Vdcn_5bku{$B_2zzi@0|C0fcYkJKF z?#a<)%gqTe1u)@I6g37!rw5k~+<8P4%dx>Ro^Xp6uLFtx;*{1t!yRg@ z@qm8)YgF9H0*@%E@6lY;O;y%S$q3RVZ^XsBiEZqsEG-&5?`FX{V^4co=6h_9UWBG0uaZX zHleM(gvKPt!m-Q96^i6gVh$B=F(ij`KDl4v*k#P&5N|%j-~8FUh`pWplet5RjG=>p zU|^d8?R_azz5mbn$qY96<`OCx2nPNu12SG+u9n=L->u*FsdsJSxaLq%zfKJb?X8~x iKIl0zx5d1k)TUqI*k#l#I&a~`_z^HdLInfAz`zHd>Ou$r literal 0 HcmV?d00001 diff --git a/services/flink-service/flink-service.pb.go b/services/flink-service/flink-service.pb.go index 990e6da..7dd2429 100644 --- a/services/flink-service/flink-service.pb.go +++ b/services/flink-service/flink-service.pb.go @@ -1,10 +1,10 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 -// protoc v4.24.0--rc2 +// protoc v4.25.1 // source: flink-service.proto -package flink_service +package logfire import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -152,20 +152,205 @@ func (x FieldBasedFilter_Operator) Number() protoreflect.EnumNumber { // Deprecated: Use FieldBasedFilter_Operator.Descriptor instead. func (FieldBasedFilter_Operator) EnumDescriptor() ([]byte, []int) { - return file_flink_service_proto_rawDescGZIP(), []int{6, 0} + return file_flink_service_proto_rawDescGZIP(), []int{11, 0} } -type DateTimeFilter struct { +type StructuredAlertRequest_AlertWhen int32 + +const ( + StructuredAlertRequest_EQUALS StructuredAlertRequest_AlertWhen = 0 + StructuredAlertRequest_NOT_EQUALS StructuredAlertRequest_AlertWhen = 1 + StructuredAlertRequest_GREATER_THAN StructuredAlertRequest_AlertWhen = 2 + StructuredAlertRequest_GREATER_THAN_EQUALS StructuredAlertRequest_AlertWhen = 3 + StructuredAlertRequest_LESS_THAN StructuredAlertRequest_AlertWhen = 4 + StructuredAlertRequest_LESS_THAN_EQUALS StructuredAlertRequest_AlertWhen = 5 +) + +// Enum value maps for StructuredAlertRequest_AlertWhen. +var ( + StructuredAlertRequest_AlertWhen_name = map[int32]string{ + 0: "EQUALS", + 1: "NOT_EQUALS", + 2: "GREATER_THAN", + 3: "GREATER_THAN_EQUALS", + 4: "LESS_THAN", + 5: "LESS_THAN_EQUALS", + } + StructuredAlertRequest_AlertWhen_value = map[string]int32{ + "EQUALS": 0, + "NOT_EQUALS": 1, + "GREATER_THAN": 2, + "GREATER_THAN_EQUALS": 3, + "LESS_THAN": 4, + "LESS_THAN_EQUALS": 5, + } +) + +func (x StructuredAlertRequest_AlertWhen) Enum() *StructuredAlertRequest_AlertWhen { + p := new(StructuredAlertRequest_AlertWhen) + *p = x + return p +} + +func (x StructuredAlertRequest_AlertWhen) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StructuredAlertRequest_AlertWhen) Descriptor() protoreflect.EnumDescriptor { + return file_flink_service_proto_enumTypes[2].Descriptor() +} + +func (StructuredAlertRequest_AlertWhen) Type() protoreflect.EnumType { + return &file_flink_service_proto_enumTypes[2] +} + +func (x StructuredAlertRequest_AlertWhen) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StructuredAlertRequest_AlertWhen.Descriptor instead. +func (StructuredAlertRequest_AlertWhen) EnumDescriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{21, 0} +} + +type StructuredAlertRequest_Aggregation_AggregationFunction int32 + +const ( + StructuredAlertRequest_Aggregation_COUNT StructuredAlertRequest_Aggregation_AggregationFunction = 0 + StructuredAlertRequest_Aggregation_DISTINCT StructuredAlertRequest_Aggregation_AggregationFunction = 1 + StructuredAlertRequest_Aggregation_SUM StructuredAlertRequest_Aggregation_AggregationFunction = 2 + StructuredAlertRequest_Aggregation_MIN StructuredAlertRequest_Aggregation_AggregationFunction = 3 + StructuredAlertRequest_Aggregation_AVG StructuredAlertRequest_Aggregation_AggregationFunction = 4 + StructuredAlertRequest_Aggregation_FIRST_VALUE StructuredAlertRequest_Aggregation_AggregationFunction = 5 + StructuredAlertRequest_Aggregation_LAST_VALUE StructuredAlertRequest_Aggregation_AggregationFunction = 6 + StructuredAlertRequest_Aggregation_VARIANCE_POPULATION StructuredAlertRequest_Aggregation_AggregationFunction = 7 + StructuredAlertRequest_Aggregation_VARIANCE_SAMPLE StructuredAlertRequest_Aggregation_AggregationFunction = 8 + StructuredAlertRequest_Aggregation_STANDARD_DEVIATION_SAMPLE StructuredAlertRequest_Aggregation_AggregationFunction = 9 + StructuredAlertRequest_Aggregation_STANDARD_DEVIATION_POPULATION StructuredAlertRequest_Aggregation_AggregationFunction = 10 +) + +// Enum value maps for StructuredAlertRequest_Aggregation_AggregationFunction. +var ( + StructuredAlertRequest_Aggregation_AggregationFunction_name = map[int32]string{ + 0: "COUNT", + 1: "DISTINCT", + 2: "SUM", + 3: "MIN", + 4: "AVG", + 5: "FIRST_VALUE", + 6: "LAST_VALUE", + 7: "VARIANCE_POPULATION", + 8: "VARIANCE_SAMPLE", + 9: "STANDARD_DEVIATION_SAMPLE", + 10: "STANDARD_DEVIATION_POPULATION", + } + StructuredAlertRequest_Aggregation_AggregationFunction_value = map[string]int32{ + "COUNT": 0, + "DISTINCT": 1, + "SUM": 2, + "MIN": 3, + "AVG": 4, + "FIRST_VALUE": 5, + "LAST_VALUE": 6, + "VARIANCE_POPULATION": 7, + "VARIANCE_SAMPLE": 8, + "STANDARD_DEVIATION_SAMPLE": 9, + "STANDARD_DEVIATION_POPULATION": 10, + } +) + +func (x StructuredAlertRequest_Aggregation_AggregationFunction) Enum() *StructuredAlertRequest_Aggregation_AggregationFunction { + p := new(StructuredAlertRequest_Aggregation_AggregationFunction) + *p = x + return p +} + +func (x StructuredAlertRequest_Aggregation_AggregationFunction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StructuredAlertRequest_Aggregation_AggregationFunction) Descriptor() protoreflect.EnumDescriptor { + return file_flink_service_proto_enumTypes[3].Descriptor() +} + +func (StructuredAlertRequest_Aggregation_AggregationFunction) Type() protoreflect.EnumType { + return &file_flink_service_proto_enumTypes[3] +} + +func (x StructuredAlertRequest_Aggregation_AggregationFunction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StructuredAlertRequest_Aggregation_AggregationFunction.Descriptor instead. +func (StructuredAlertRequest_Aggregation_AggregationFunction) EnumDescriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{21, 0, 0} +} + +type AlertActions_WebhookAction_HttpMethod int32 + +const ( + AlertActions_WebhookAction_POST AlertActions_WebhookAction_HttpMethod = 0 + AlertActions_WebhookAction_HEAD AlertActions_WebhookAction_HttpMethod = 1 + AlertActions_WebhookAction_GET AlertActions_WebhookAction_HttpMethod = 2 + AlertActions_WebhookAction_PUT AlertActions_WebhookAction_HttpMethod = 3 + AlertActions_WebhookAction_PATCH AlertActions_WebhookAction_HttpMethod = 4 +) + +// Enum value maps for AlertActions_WebhookAction_HttpMethod. +var ( + AlertActions_WebhookAction_HttpMethod_name = map[int32]string{ + 0: "POST", + 1: "HEAD", + 2: "GET", + 3: "PUT", + 4: "PATCH", + } + AlertActions_WebhookAction_HttpMethod_value = map[string]int32{ + "POST": 0, + "HEAD": 1, + "GET": 2, + "PUT": 3, + "PATCH": 4, + } +) + +func (x AlertActions_WebhookAction_HttpMethod) Enum() *AlertActions_WebhookAction_HttpMethod { + p := new(AlertActions_WebhookAction_HttpMethod) + *p = x + return p +} + +func (x AlertActions_WebhookAction_HttpMethod) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AlertActions_WebhookAction_HttpMethod) Descriptor() protoreflect.EnumDescriptor { + return file_flink_service_proto_enumTypes[4].Descriptor() +} + +func (AlertActions_WebhookAction_HttpMethod) Type() protoreflect.EnumType { + return &file_flink_service_proto_enumTypes[4] +} + +func (x AlertActions_WebhookAction_HttpMethod) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AlertActions_WebhookAction_HttpMethod.Descriptor instead. +func (AlertActions_WebhookAction_HttpMethod) EnumDescriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{22, 0, 0} +} + +type RegisteredAlert struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - StartTimeStamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=startTimeStamp,proto3" json:"startTimeStamp,omitempty"` - EndTimeStamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=endTimeStamp,proto3" json:"endTimeStamp,omitempty"` + AlertID string `protobuf:"bytes,1,opt,name=alertID,proto3" json:"alertID,omitempty"` } -func (x *DateTimeFilter) Reset() { - *x = DateTimeFilter{} +func (x *RegisteredAlert) Reset() { + *x = RegisteredAlert{} if protoimpl.UnsafeEnabled { mi := &file_flink_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -173,13 +358,13 @@ func (x *DateTimeFilter) Reset() { } } -func (x *DateTimeFilter) String() string { +func (x *RegisteredAlert) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DateTimeFilter) ProtoMessage() {} +func (*RegisteredAlert) ProtoMessage() {} -func (x *DateTimeFilter) ProtoReflect() protoreflect.Message { +func (x *RegisteredAlert) ProtoReflect() protoreflect.Message { mi := &file_flink_service_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -191,35 +376,26 @@ func (x *DateTimeFilter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DateTimeFilter.ProtoReflect.Descriptor instead. -func (*DateTimeFilter) Descriptor() ([]byte, []int) { +// Deprecated: Use RegisteredAlert.ProtoReflect.Descriptor instead. +func (*RegisteredAlert) Descriptor() ([]byte, []int) { return file_flink_service_proto_rawDescGZIP(), []int{0} } -func (x *DateTimeFilter) GetStartTimeStamp() *timestamppb.Timestamp { - if x != nil { - return x.StartTimeStamp - } - return nil -} - -func (x *DateTimeFilter) GetEndTimeStamp() *timestamppb.Timestamp { +func (x *RegisteredAlert) GetAlertID() string { if x != nil { - return x.EndTimeStamp + return x.AlertID } - return nil + return "" } -type RecordDetails struct { +type Empty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Record string `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` } -func (x *RecordDetails) Reset() { - *x = RecordDetails{} +func (x *Empty) Reset() { + *x = Empty{} if protoimpl.UnsafeEnabled { mi := &file_flink_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -227,13 +403,13 @@ func (x *RecordDetails) Reset() { } } -func (x *RecordDetails) String() string { +func (x *Empty) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RecordDetails) ProtoMessage() {} +func (*Empty) ProtoMessage() {} -func (x *RecordDetails) ProtoReflect() protoreflect.Message { +func (x *Empty) ProtoReflect() protoreflect.Message { mi := &file_flink_service_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -245,26 +421,22 @@ func (x *RecordDetails) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RecordDetails.ProtoReflect.Descriptor instead. -func (*RecordDetails) Descriptor() ([]byte, []int) { +// Deprecated: Use Empty.ProtoReflect.Descriptor instead. +func (*Empty) Descriptor() ([]byte, []int) { return file_flink_service_proto_rawDescGZIP(), []int{1} } -func (x *RecordDetails) GetRecord() string { - if x != nil { - return x.Record - } - return "" -} - -type Empty struct { +type SourceInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Source *Source `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + LatestTimestamp *string `protobuf:"bytes,2,opt,name=latestTimestamp,proto3,oneof" json:"latestTimestamp,omitempty"` } -func (x *Empty) Reset() { - *x = Empty{} +func (x *SourceInfo) Reset() { + *x = SourceInfo{} if protoimpl.UnsafeEnabled { mi := &file_flink_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -272,13 +444,13 @@ func (x *Empty) Reset() { } } -func (x *Empty) String() string { +func (x *SourceInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Empty) ProtoMessage() {} +func (*SourceInfo) ProtoMessage() {} -func (x *Empty) ProtoReflect() protoreflect.Message { +func (x *SourceInfo) ProtoReflect() protoreflect.Message { mi := &file_flink_service_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -290,25 +462,39 @@ func (x *Empty) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Empty.ProtoReflect.Descriptor instead. -func (*Empty) Descriptor() ([]byte, []int) { +// Deprecated: Use SourceInfo.ProtoReflect.Descriptor instead. +func (*SourceInfo) Descriptor() ([]byte, []int) { return file_flink_service_proto_rawDescGZIP(), []int{2} } -type Source struct { +func (x *SourceInfo) GetSource() *Source { + if x != nil { + return x.Source + } + return nil +} + +func (x *SourceInfo) GetLatestTimestamp() string { + if x != nil && x.LatestTimestamp != nil { + return *x.LatestTimestamp + } + return "" +} + +type SQLRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SourceID string `protobuf:"bytes,1,opt,name=sourceID,proto3" json:"sourceID,omitempty"` - SourceName string `protobuf:"bytes,2,opt,name=sourceName,proto3" json:"sourceName,omitempty"` - StartingOffset uint64 `protobuf:"varint,3,opt,name=startingOffset,proto3" json:"startingOffset,omitempty"` - EndingOffset uint64 `protobuf:"varint,4,opt,name=endingOffset,proto3" json:"endingOffset,omitempty"` - TeamID string `protobuf:"bytes,5,opt,name=teamID,proto3" json:"teamID,omitempty"` + Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` + Sources []*Source `protobuf:"bytes,2,rep,name=sources,proto3" json:"sources,omitempty"` + BatchSize uint32 `protobuf:"varint,3,opt,name=batchSize,proto3" json:"batchSize,omitempty"` + DateTimeFilter *DateTimeFilter `protobuf:"bytes,4,opt,name=dateTimeFilter,proto3" json:"dateTimeFilter,omitempty"` + TeamID string `protobuf:"bytes,5,opt,name=teamID,proto3" json:"teamID,omitempty"` } -func (x *Source) Reset() { - *x = Source{} +func (x *SQLRequest) Reset() { + *x = SQLRequest{} if protoimpl.UnsafeEnabled { mi := &file_flink_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -316,13 +502,13 @@ func (x *Source) Reset() { } } -func (x *Source) String() string { +func (x *SQLRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Source) ProtoMessage() {} +func (*SQLRequest) ProtoMessage() {} -func (x *Source) ProtoReflect() protoreflect.Message { +func (x *SQLRequest) ProtoReflect() protoreflect.Message { mi := &file_flink_service_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -334,71 +520,1255 @@ func (x *Source) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Source.ProtoReflect.Descriptor instead. -func (*Source) Descriptor() ([]byte, []int) { +// Deprecated: Use SQLRequest.ProtoReflect.Descriptor instead. +func (*SQLRequest) Descriptor() ([]byte, []int) { return file_flink_service_proto_rawDescGZIP(), []int{3} } -func (x *Source) GetSourceID() string { +func (x *SQLRequest) GetSql() string { if x != nil { - return x.SourceID + return x.Sql + } + return "" +} + +func (x *SQLRequest) GetSources() []*Source { + if x != nil { + return x.Sources + } + return nil +} + +func (x *SQLRequest) GetBatchSize() uint32 { + if x != nil { + return x.BatchSize + } + return 0 +} + +func (x *SQLRequest) GetDateTimeFilter() *DateTimeFilter { + if x != nil { + return x.DateTimeFilter + } + return nil +} + +func (x *SQLRequest) GetTeamID() string { + if x != nil { + return x.TeamID + } + return "" +} + +type SQLResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Source *Source `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` +} + +func (x *SQLResponse) Reset() { + *x = SQLResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_flink_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SQLResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SQLResponse) ProtoMessage() {} + +func (x *SQLResponse) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_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 SQLResponse.ProtoReflect.Descriptor instead. +func (*SQLResponse) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{4} +} + +func (x *SQLResponse) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *SQLResponse) GetSource() *Source { + if x != nil { + return x.Source + } + return nil +} + +type RecordDetailsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SourceName string `protobuf:"bytes,1,opt,name=sourceName,proto3" json:"sourceName,omitempty"` + Offset uint64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"` + SourceID string `protobuf:"bytes,4,opt,name=sourceID,proto3" json:"sourceID,omitempty"` + TeamID string `protobuf:"bytes,5,opt,name=teamID,proto3" json:"teamID,omitempty"` +} + +func (x *RecordDetailsRequest) Reset() { + *x = RecordDetailsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_flink_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RecordDetailsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordDetailsRequest) ProtoMessage() {} + +func (x *RecordDetailsRequest) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_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 RecordDetailsRequest.ProtoReflect.Descriptor instead. +func (*RecordDetailsRequest) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{5} +} + +func (x *RecordDetailsRequest) GetSourceName() string { + if x != nil { + return x.SourceName + } + return "" +} + +func (x *RecordDetailsRequest) GetOffset() uint64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *RecordDetailsRequest) GetSourceID() string { + if x != nil { + return x.SourceID + } + return "" +} + +func (x *RecordDetailsRequest) GetTeamID() string { + if x != nil { + return x.TeamID + } + return "" +} + +type DateTimeFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StartTimeStamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=startTimeStamp,proto3" json:"startTimeStamp,omitempty"` + EndTimeStamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=endTimeStamp,proto3" json:"endTimeStamp,omitempty"` +} + +func (x *DateTimeFilter) Reset() { + *x = DateTimeFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_flink_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DateTimeFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DateTimeFilter) ProtoMessage() {} + +func (x *DateTimeFilter) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_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 DateTimeFilter.ProtoReflect.Descriptor instead. +func (*DateTimeFilter) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{6} +} + +func (x *DateTimeFilter) GetStartTimeStamp() *timestamppb.Timestamp { + if x != nil { + return x.StartTimeStamp + } + return nil +} + +func (x *DateTimeFilter) GetEndTimeStamp() *timestamppb.Timestamp { + if x != nil { + return x.EndTimeStamp + } + return nil +} + +type RecordDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Record string `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` +} + +func (x *RecordDetails) Reset() { + *x = RecordDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_flink_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RecordDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordDetails) ProtoMessage() {} + +func (x *RecordDetails) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_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 RecordDetails.ProtoReflect.Descriptor instead. +func (*RecordDetails) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{7} +} + +func (x *RecordDetails) GetRecord() string { + if x != nil { + return x.Record + } + return "" +} + +type Source struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SourceID string `protobuf:"bytes,1,opt,name=sourceID,proto3" json:"sourceID,omitempty"` + SourceName string `protobuf:"bytes,2,opt,name=sourceName,proto3" json:"sourceName,omitempty"` + StartingOffset uint64 `protobuf:"varint,3,opt,name=startingOffset,proto3" json:"startingOffset,omitempty"` + EndingOffset uint64 `protobuf:"varint,4,opt,name=endingOffset,proto3" json:"endingOffset,omitempty"` + TeamID string `protobuf:"bytes,5,opt,name=teamID,proto3" json:"teamID,omitempty"` +} + +func (x *Source) Reset() { + *x = Source{} + if protoimpl.UnsafeEnabled { + mi := &file_flink_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Source) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Source) ProtoMessage() {} + +func (x *Source) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_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 Source.ProtoReflect.Descriptor instead. +func (*Source) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{8} +} + +func (x *Source) GetSourceID() string { + if x != nil { + return x.SourceID + } + return "" +} + +func (x *Source) GetSourceName() string { + if x != nil { + return x.SourceName + } + return "" +} + +func (x *Source) GetStartingOffset() uint64 { + if x != nil { + return x.StartingOffset + } + return 0 +} + +func (x *Source) GetEndingOffset() uint64 { + if x != nil { + return x.EndingOffset + } + return 0 +} + +func (x *Source) GetTeamID() string { + if x != nil { + return x.TeamID + } + return "" +} + +type FilterCancellationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + JobName string `protobuf:"bytes,1,opt,name=jobName,proto3" json:"jobName,omitempty"` +} + +func (x *FilterCancellationRequest) Reset() { + *x = FilterCancellationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_flink_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilterCancellationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilterCancellationRequest) ProtoMessage() {} + +func (x *FilterCancellationRequest) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_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 FilterCancellationRequest.ProtoReflect.Descriptor instead. +func (*FilterCancellationRequest) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{9} +} + +func (x *FilterCancellationRequest) GetJobName() string { + if x != nil { + return x.JobName + } + return "" +} + +type FilterCancellationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *FilterCancellationResponse) Reset() { + *x = FilterCancellationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_flink_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilterCancellationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilterCancellationResponse) ProtoMessage() {} + +func (x *FilterCancellationResponse) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_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 FilterCancellationResponse.ProtoReflect.Descriptor instead. +func (*FilterCancellationResponse) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{10} +} + +func (x *FilterCancellationResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type FieldBasedFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FieldName string `protobuf:"bytes,1,opt,name=fieldName,proto3" json:"fieldName,omitempty"` + FieldValue string `protobuf:"bytes,2,opt,name=fieldValue,proto3" json:"fieldValue,omitempty"` + Operator FieldBasedFilter_Operator `protobuf:"varint,3,opt,name=operator,proto3,enum=ai.logfire.FieldBasedFilter_Operator" json:"operator,omitempty"` +} + +func (x *FieldBasedFilter) Reset() { + *x = FieldBasedFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_flink_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FieldBasedFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldBasedFilter) ProtoMessage() {} + +func (x *FieldBasedFilter) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_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 FieldBasedFilter.ProtoReflect.Descriptor instead. +func (*FieldBasedFilter) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{11} +} + +func (x *FieldBasedFilter) GetFieldName() string { + if x != nil { + return x.FieldName + } + return "" +} + +func (x *FieldBasedFilter) GetFieldValue() string { + if x != nil { + return x.FieldValue + } + return "" +} + +func (x *FieldBasedFilter) GetOperator() FieldBasedFilter_Operator { + if x != nil { + return x.Operator + } + return FieldBasedFilter_CONTAINS +} + +type FilterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TeamID string `protobuf:"bytes,1,opt,name=teamID,proto3" json:"teamID,omitempty"` + ViewID string `protobuf:"bytes,2,opt,name=viewID,proto3" json:"viewID,omitempty"` + SeverityLevels []SeverityLevel `protobuf:"varint,3,rep,packed,name=severityLevels,proto3,enum=ai.logfire.SeverityLevel" json:"severityLevels,omitempty"` + DateTimeFilter *DateTimeFilter `protobuf:"bytes,4,opt,name=dateTimeFilter,proto3" json:"dateTimeFilter,omitempty"` + SearchQueries []string `protobuf:"bytes,5,rep,name=searchQueries,proto3" json:"searchQueries,omitempty"` + SqlQuery string `protobuf:"bytes,6,opt,name=sqlQuery,proto3" json:"sqlQuery,omitempty"` + FieldBasedFilters []*FieldBasedFilter `protobuf:"bytes,7,rep,name=fieldBasedFilters,proto3" json:"fieldBasedFilters,omitempty"` + Sources []*Source `protobuf:"bytes,8,rep,name=sources,proto3" json:"sources,omitempty"` + BatchSize uint32 `protobuf:"varint,9,opt,name=batchSize,proto3" json:"batchSize,omitempty"` + IsScrollDown bool `protobuf:"varint,10,opt,name=isScrollDown,proto3" json:"isScrollDown,omitempty"` +} + +func (x *FilterRequest) Reset() { + *x = FilterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_flink_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilterRequest) ProtoMessage() {} + +func (x *FilterRequest) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_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 FilterRequest.ProtoReflect.Descriptor instead. +func (*FilterRequest) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{12} +} + +func (x *FilterRequest) GetTeamID() string { + if x != nil { + return x.TeamID + } + return "" +} + +func (x *FilterRequest) GetViewID() string { + if x != nil { + return x.ViewID + } + return "" +} + +func (x *FilterRequest) GetSeverityLevels() []SeverityLevel { + if x != nil { + return x.SeverityLevels + } + return nil +} + +func (x *FilterRequest) GetDateTimeFilter() *DateTimeFilter { + if x != nil { + return x.DateTimeFilter + } + return nil +} + +func (x *FilterRequest) GetSearchQueries() []string { + if x != nil { + return x.SearchQueries + } + return nil +} + +func (x *FilterRequest) GetSqlQuery() string { + if x != nil { + return x.SqlQuery + } + return "" +} + +func (x *FilterRequest) GetFieldBasedFilters() []*FieldBasedFilter { + if x != nil { + return x.FieldBasedFilters + } + return nil +} + +func (x *FilterRequest) GetSources() []*Source { + if x != nil { + return x.Sources + } + return nil +} + +func (x *FilterRequest) GetBatchSize() uint32 { + if x != nil { + return x.BatchSize + } + return 0 +} + +func (x *FilterRequest) GetIsScrollDown() bool { + if x != nil { + return x.IsScrollDown + } + return false +} + +type FilteredRecord struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + Dt string `protobuf:"bytes,3,opt,name=dt,proto3" json:"dt,omitempty"` + Level string `protobuf:"bytes,4,opt,name=level,proto3" json:"level,omitempty"` + SourceName string `protobuf:"bytes,5,opt,name=sourceName,proto3" json:"sourceName,omitempty"` +} + +func (x *FilteredRecord) Reset() { + *x = FilteredRecord{} + if protoimpl.UnsafeEnabled { + mi := &file_flink_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilteredRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilteredRecord) ProtoMessage() {} + +func (x *FilteredRecord) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_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 FilteredRecord.ProtoReflect.Descriptor instead. +func (*FilteredRecord) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{13} +} + +func (x *FilteredRecord) GetOffset() uint64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *FilteredRecord) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *FilteredRecord) GetDt() string { + if x != nil { + return x.Dt + } + return "" +} + +func (x *FilteredRecord) GetLevel() string { + if x != nil { + return x.Level + } + return "" +} + +func (x *FilteredRecord) GetSourceName() string { + if x != nil { + return x.SourceName + } + return "" +} + +type FilteredRecords struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Records []*FilteredRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` + IsScrollDown bool `protobuf:"varint,2,opt,name=isScrollDown,proto3" json:"isScrollDown,omitempty"` + Sources []*Source `protobuf:"bytes,3,rep,name=sources,proto3" json:"sources,omitempty"` +} + +func (x *FilteredRecords) Reset() { + *x = FilteredRecords{} + if protoimpl.UnsafeEnabled { + mi := &file_flink_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilteredRecords) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilteredRecords) ProtoMessage() {} + +func (x *FilteredRecords) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_proto_msgTypes[14] + 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 FilteredRecords.ProtoReflect.Descriptor instead. +func (*FilteredRecords) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{14} +} + +func (x *FilteredRecords) GetRecords() []*FilteredRecord { + if x != nil { + return x.Records + } + return nil +} + +func (x *FilteredRecords) GetIsScrollDown() bool { + if x != nil { + return x.IsScrollDown + } + return false +} + +func (x *FilteredRecords) GetSources() []*Source { + if x != nil { + return x.Sources + } + return nil +} + +type FilterResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Record string `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` + JobName string `protobuf:"bytes,2,opt,name=jobName,proto3" json:"jobName,omitempty"` +} + +func (x *FilterResponse) Reset() { + *x = FilterResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_flink_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilterResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilterResponse) ProtoMessage() {} + +func (x *FilterResponse) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_proto_msgTypes[15] + 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 FilterResponse.ProtoReflect.Descriptor instead. +func (*FilterResponse) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{15} +} + +func (x *FilterResponse) GetRecord() string { + if x != nil { + return x.Record + } + return "" +} + +func (x *FilterResponse) GetJobName() string { + if x != nil { + return x.JobName + } + return "" +} + +type AlertJob struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AlertRequests []*AlertRequest `protobuf:"bytes,1,rep,name=alertRequests,proto3" json:"alertRequests,omitempty"` +} + +func (x *AlertJob) Reset() { + *x = AlertJob{} + if protoimpl.UnsafeEnabled { + mi := &file_flink_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AlertJob) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlertJob) ProtoMessage() {} + +func (x *AlertJob) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AlertJob.ProtoReflect.Descriptor instead. +func (*AlertJob) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{16} +} + +func (x *AlertJob) GetAlertRequests() []*AlertRequest { + if x != nil { + return x.AlertRequests + } + return nil +} + +type AlertDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + AlertSeverity SeverityLevel `protobuf:"varint,3,opt,name=alertSeverity,proto3,enum=ai.logfire.SeverityLevel" json:"alertSeverity,omitempty"` + AlertLabels []string `protobuf:"bytes,4,rep,name=alertLabels,proto3" json:"alertLabels,omitempty"` + Runbook string `protobuf:"bytes,5,opt,name=runbook,proto3" json:"runbook,omitempty"` +} + +func (x *AlertDetails) Reset() { + *x = AlertDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_flink_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AlertDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlertDetails) ProtoMessage() {} + +func (x *AlertDetails) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AlertDetails.ProtoReflect.Descriptor instead. +func (*AlertDetails) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{17} +} + +func (x *AlertDetails) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AlertDetails) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *AlertDetails) GetAlertSeverity() SeverityLevel { + if x != nil { + return x.AlertSeverity + } + return SeverityLevel_INFO +} + +func (x *AlertDetails) GetAlertLabels() []string { + if x != nil { + return x.AlertLabels + } + return nil +} + +func (x *AlertDetails) GetRunbook() string { + if x != nil { + return x.Runbook + } + return "" +} + +type Window struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to WindowType: + // + // *Window_TumblingWindow_ + WindowType isWindow_WindowType `protobuf_oneof:"windowType"` +} + +func (x *Window) Reset() { + *x = Window{} + if protoimpl.UnsafeEnabled { + mi := &file_flink_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Window) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Window) ProtoMessage() {} + +func (x *Window) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_proto_msgTypes[18] + 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 Window.ProtoReflect.Descriptor instead. +func (*Window) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{18} +} + +func (m *Window) GetWindowType() isWindow_WindowType { + if m != nil { + return m.WindowType + } + return nil +} + +func (x *Window) GetTumblingWindow() *Window_TumblingWindow { + if x, ok := x.GetWindowType().(*Window_TumblingWindow_); ok { + return x.TumblingWindow + } + return nil +} + +type isWindow_WindowType interface { + isWindow_WindowType() +} + +type Window_TumblingWindow_ struct { + TumblingWindow *Window_TumblingWindow `protobuf:"bytes,1,opt,name=tumblingWindow,proto3,oneof"` +} + +func (*Window_TumblingWindow_) isWindow_WindowType() {} + +type ViewBasedAlertRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sources []*Source `protobuf:"bytes,1,rep,name=sources,proto3" json:"sources,omitempty"` + FieldBasedFilters []*FieldBasedFilter `protobuf:"bytes,2,rep,name=fieldBasedFilters,proto3" json:"fieldBasedFilters,omitempty"` + AlertWhenHasMoreRecords bool `protobuf:"varint,3,opt,name=alertWhenHasMoreRecords,proto3" json:"alertWhenHasMoreRecords,omitempty"` + NumberOfRecords uint32 `protobuf:"varint,4,opt,name=numberOfRecords,proto3" json:"numberOfRecords,omitempty"` + WithinSeconds uint32 `protobuf:"varint,5,opt,name=withinSeconds,proto3" json:"withinSeconds,omitempty"` + AlertId string `protobuf:"bytes,6,opt,name=alertId,proto3" json:"alertId,omitempty"` + AlertSeverity SeverityLevel `protobuf:"varint,7,opt,name=alertSeverity,proto3,enum=ai.logfire.SeverityLevel" json:"alertSeverity,omitempty"` +} + +func (x *ViewBasedAlertRequest) Reset() { + *x = ViewBasedAlertRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_flink_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ViewBasedAlertRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ViewBasedAlertRequest) ProtoMessage() {} + +func (x *ViewBasedAlertRequest) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_proto_msgTypes[19] + 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 ViewBasedAlertRequest.ProtoReflect.Descriptor instead. +func (*ViewBasedAlertRequest) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{19} +} + +func (x *ViewBasedAlertRequest) GetSources() []*Source { + if x != nil { + return x.Sources + } + return nil +} + +func (x *ViewBasedAlertRequest) GetFieldBasedFilters() []*FieldBasedFilter { + if x != nil { + return x.FieldBasedFilters + } + return nil +} + +func (x *ViewBasedAlertRequest) GetAlertWhenHasMoreRecords() bool { + if x != nil { + return x.AlertWhenHasMoreRecords + } + return false +} + +func (x *ViewBasedAlertRequest) GetNumberOfRecords() uint32 { + if x != nil { + return x.NumberOfRecords + } + return 0 +} + +func (x *ViewBasedAlertRequest) GetWithinSeconds() uint32 { + if x != nil { + return x.WithinSeconds + } + return 0 +} + +func (x *ViewBasedAlertRequest) GetAlertId() string { + if x != nil { + return x.AlertId + } + return "" +} + +func (x *ViewBasedAlertRequest) GetAlertSeverity() SeverityLevel { + if x != nil { + return x.AlertSeverity + } + return SeverityLevel_INFO +} + +type CEPRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PartitionBy string `protobuf:"bytes,1,opt,name=partitionBy,proto3" json:"partitionBy,omitempty"` + WithinIntervalSeconds uint64 `protobuf:"varint,2,opt,name=withinIntervalSeconds,proto3" json:"withinIntervalSeconds,omitempty"` + Measures string `protobuf:"bytes,3,opt,name=measures,proto3" json:"measures,omitempty"` + AfterMatchSkip string `protobuf:"bytes,4,opt,name=afterMatchSkip,proto3" json:"afterMatchSkip,omitempty"` + Pattern string `protobuf:"bytes,5,opt,name=pattern,proto3" json:"pattern,omitempty"` + Define string `protobuf:"bytes,6,opt,name=define,proto3" json:"define,omitempty"` + Source *Source `protobuf:"bytes,7,opt,name=source,proto3" json:"source,omitempty"` + FieldBasedFilters []*FieldBasedFilter `protobuf:"bytes,8,rep,name=fieldBasedFilters,proto3" json:"fieldBasedFilters,omitempty"` + FieldBasedFiltersAfterCep []*FieldBasedFilter `protobuf:"bytes,9,rep,name=fieldBasedFiltersAfterCep,proto3" json:"fieldBasedFiltersAfterCep,omitempty"` +} + +func (x *CEPRequest) Reset() { + *x = CEPRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_flink_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CEPRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CEPRequest) ProtoMessage() {} + +func (x *CEPRequest) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_proto_msgTypes[20] + 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 CEPRequest.ProtoReflect.Descriptor instead. +func (*CEPRequest) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{20} +} + +func (x *CEPRequest) GetPartitionBy() string { + if x != nil { + return x.PartitionBy + } + return "" +} + +func (x *CEPRequest) GetWithinIntervalSeconds() uint64 { + if x != nil { + return x.WithinIntervalSeconds + } + return 0 +} + +func (x *CEPRequest) GetMeasures() string { + if x != nil { + return x.Measures + } + return "" +} + +func (x *CEPRequest) GetAfterMatchSkip() string { + if x != nil { + return x.AfterMatchSkip + } + return "" +} + +func (x *CEPRequest) GetPattern() string { + if x != nil { + return x.Pattern } return "" } -func (x *Source) GetSourceName() string { +func (x *CEPRequest) GetDefine() string { if x != nil { - return x.SourceName + return x.Define } return "" } -func (x *Source) GetStartingOffset() uint64 { +func (x *CEPRequest) GetSource() *Source { if x != nil { - return x.StartingOffset + return x.Source } - return 0 + return nil } -func (x *Source) GetEndingOffset() uint64 { +func (x *CEPRequest) GetFieldBasedFilters() []*FieldBasedFilter { if x != nil { - return x.EndingOffset + return x.FieldBasedFilters } - return 0 + return nil } -func (x *Source) GetTeamID() string { +func (x *CEPRequest) GetFieldBasedFiltersAfterCep() []*FieldBasedFilter { if x != nil { - return x.TeamID + return x.FieldBasedFiltersAfterCep } - return "" + return nil } -type FilterCancellationRequest struct { +type StructuredAlertRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - JobName string `protobuf:"bytes,1,opt,name=jobName,proto3" json:"jobName,omitempty"` + FieldBasedFilters []*FieldBasedFilter `protobuf:"bytes,1,rep,name=fieldBasedFilters,proto3" json:"fieldBasedFilters,omitempty"` + AlertWhen StructuredAlertRequest_AlertWhen `protobuf:"varint,2,opt,name=alertWhen,proto3,enum=ai.logfire.StructuredAlertRequest_AlertWhen" json:"alertWhen,omitempty"` + AlertValue float64 `protobuf:"fixed64,3,opt,name=alertValue,proto3" json:"alertValue,omitempty"` + AggregationRequest *StructuredAlertRequest_Aggregation `protobuf:"bytes,4,opt,name=aggregationRequest,proto3" json:"aggregationRequest,omitempty"` + Window *Window `protobuf:"bytes,5,opt,name=window,proto3" json:"window,omitempty"` + Source *Source `protobuf:"bytes,6,opt,name=source,proto3" json:"source,omitempty"` } -func (x *FilterCancellationRequest) Reset() { - *x = FilterCancellationRequest{} +func (x *StructuredAlertRequest) Reset() { + *x = StructuredAlertRequest{} if protoimpl.UnsafeEnabled { - mi := &file_flink_service_proto_msgTypes[4] + mi := &file_flink_service_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FilterCancellationRequest) String() string { +func (x *StructuredAlertRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FilterCancellationRequest) ProtoMessage() {} +func (*StructuredAlertRequest) ProtoMessage() {} -func (x *FilterCancellationRequest) ProtoReflect() protoreflect.Message { - mi := &file_flink_service_proto_msgTypes[4] +func (x *StructuredAlertRequest) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -409,92 +1779,81 @@ func (x *FilterCancellationRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FilterCancellationRequest.ProtoReflect.Descriptor instead. -func (*FilterCancellationRequest) Descriptor() ([]byte, []int) { - return file_flink_service_proto_rawDescGZIP(), []int{4} +// Deprecated: Use StructuredAlertRequest.ProtoReflect.Descriptor instead. +func (*StructuredAlertRequest) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{21} } -func (x *FilterCancellationRequest) GetJobName() string { +func (x *StructuredAlertRequest) GetFieldBasedFilters() []*FieldBasedFilter { if x != nil { - return x.JobName + return x.FieldBasedFilters } - return "" -} - -type FilterCancellationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + return nil } -func (x *FilterCancellationResponse) Reset() { - *x = FilterCancellationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_flink_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *StructuredAlertRequest) GetAlertWhen() StructuredAlertRequest_AlertWhen { + if x != nil { + return x.AlertWhen } + return StructuredAlertRequest_EQUALS } -func (x *FilterCancellationResponse) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *StructuredAlertRequest) GetAlertValue() float64 { + if x != nil { + return x.AlertValue + } + return 0 } -func (*FilterCancellationResponse) ProtoMessage() {} - -func (x *FilterCancellationResponse) ProtoReflect() protoreflect.Message { - mi := &file_flink_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *StructuredAlertRequest) GetAggregationRequest() *StructuredAlertRequest_Aggregation { + if x != nil { + return x.AggregationRequest } - return mi.MessageOf(x) + return nil } -// Deprecated: Use FilterCancellationResponse.ProtoReflect.Descriptor instead. -func (*FilterCancellationResponse) Descriptor() ([]byte, []int) { - return file_flink_service_proto_rawDescGZIP(), []int{5} +func (x *StructuredAlertRequest) GetWindow() *Window { + if x != nil { + return x.Window + } + return nil } -func (x *FilterCancellationResponse) GetSuccess() bool { +func (x *StructuredAlertRequest) GetSource() *Source { if x != nil { - return x.Success + return x.Source } - return false + return nil } -type FieldBasedFilter struct { +type AlertActions struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - FieldName string `protobuf:"bytes,1,opt,name=fieldName,proto3" json:"fieldName,omitempty"` - FieldValue string `protobuf:"bytes,2,opt,name=fieldValue,proto3" json:"fieldValue,omitempty"` - Operator FieldBasedFilter_Operator `protobuf:"varint,3,opt,name=operator,proto3,enum=sh.logfire.FieldBasedFilter_Operator" json:"operator,omitempty"` + // Types that are assignable to ActionType: + // + // *AlertActions_WebhookAction_ + ActionType isAlertActions_ActionType `protobuf_oneof:"actionType"` } -func (x *FieldBasedFilter) Reset() { - *x = FieldBasedFilter{} +func (x *AlertActions) Reset() { + *x = AlertActions{} if protoimpl.UnsafeEnabled { - mi := &file_flink_service_proto_msgTypes[6] + mi := &file_flink_service_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FieldBasedFilter) String() string { +func (x *AlertActions) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FieldBasedFilter) ProtoMessage() {} +func (*AlertActions) ProtoMessage() {} -func (x *FieldBasedFilter) ProtoReflect() protoreflect.Message { - mi := &file_flink_service_proto_msgTypes[6] +func (x *AlertActions) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -505,64 +1864,67 @@ func (x *FieldBasedFilter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FieldBasedFilter.ProtoReflect.Descriptor instead. -func (*FieldBasedFilter) Descriptor() ([]byte, []int) { - return file_flink_service_proto_rawDescGZIP(), []int{6} +// Deprecated: Use AlertActions.ProtoReflect.Descriptor instead. +func (*AlertActions) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{22} } -func (x *FieldBasedFilter) GetFieldName() string { - if x != nil { - return x.FieldName +func (m *AlertActions) GetActionType() isAlertActions_ActionType { + if m != nil { + return m.ActionType } - return "" + return nil } -func (x *FieldBasedFilter) GetFieldValue() string { - if x != nil { - return x.FieldValue +func (x *AlertActions) GetWebhookAction() *AlertActions_WebhookAction { + if x, ok := x.GetActionType().(*AlertActions_WebhookAction_); ok { + return x.WebhookAction } - return "" + return nil } -func (x *FieldBasedFilter) GetOperator() FieldBasedFilter_Operator { - if x != nil { - return x.Operator - } - return FieldBasedFilter_CONTAINS +type isAlertActions_ActionType interface { + isAlertActions_ActionType() } -type FilterRequest struct { +type AlertActions_WebhookAction_ struct { + WebhookAction *AlertActions_WebhookAction `protobuf:"bytes,1,opt,name=webhookAction,proto3,oneof"` +} + +func (*AlertActions_WebhookAction_) isAlertActions_ActionType() {} + +type AlertRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SeverityLevels []SeverityLevel `protobuf:"varint,1,rep,packed,name=severityLevels,proto3,enum=sh.logfire.SeverityLevel" json:"severityLevels,omitempty"` - DateTimeFilter *DateTimeFilter `protobuf:"bytes,2,opt,name=dateTimeFilter,proto3" json:"dateTimeFilter,omitempty"` - SearchQueries []string `protobuf:"bytes,3,rep,name=searchQueries,proto3" json:"searchQueries,omitempty"` - SqlQuery string `protobuf:"bytes,4,opt,name=sqlQuery,proto3" json:"sqlQuery,omitempty"` - FieldBasedFilters []*FieldBasedFilter `protobuf:"bytes,5,rep,name=fieldBasedFilters,proto3" json:"fieldBasedFilters,omitempty"` - Sources []*Source `protobuf:"bytes,6,rep,name=sources,proto3" json:"sources,omitempty"` - BatchSize uint32 `protobuf:"varint,9,opt,name=batchSize,proto3" json:"batchSize,omitempty"` - IsScrollDown bool `protobuf:"varint,10,opt,name=isScrollDown,proto3" json:"isScrollDown,omitempty"` + Details *AlertDetails `protobuf:"bytes,1,opt,name=details,proto3" json:"details,omitempty"` + // Types that are assignable to AlertQueryType: + // + // *AlertRequest_StructuredAlertRequest + // *AlertRequest_CepRequest + // *AlertRequest_ViewBasedAlertRequest + AlertQueryType isAlertRequest_AlertQueryType `protobuf_oneof:"alertQueryType"` + AlertId string `protobuf:"bytes,5,opt,name=alertId,proto3" json:"alertId,omitempty"` } -func (x *FilterRequest) Reset() { - *x = FilterRequest{} +func (x *AlertRequest) Reset() { + *x = AlertRequest{} if protoimpl.UnsafeEnabled { - mi := &file_flink_service_proto_msgTypes[7] + mi := &file_flink_service_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FilterRequest) String() string { +func (x *AlertRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FilterRequest) ProtoMessage() {} +func (*AlertRequest) ProtoMessage() {} -func (x *FilterRequest) ProtoReflect() protoreflect.Message { - mi := &file_flink_service_proto_msgTypes[7] +func (x *AlertRequest) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -573,96 +1935,100 @@ func (x *FilterRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FilterRequest.ProtoReflect.Descriptor instead. -func (*FilterRequest) Descriptor() ([]byte, []int) { - return file_flink_service_proto_rawDescGZIP(), []int{7} +// Deprecated: Use AlertRequest.ProtoReflect.Descriptor instead. +func (*AlertRequest) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{23} } -func (x *FilterRequest) GetSeverityLevels() []SeverityLevel { +func (x *AlertRequest) GetDetails() *AlertDetails { if x != nil { - return x.SeverityLevels + return x.Details } return nil } -func (x *FilterRequest) GetDateTimeFilter() *DateTimeFilter { - if x != nil { - return x.DateTimeFilter +func (m *AlertRequest) GetAlertQueryType() isAlertRequest_AlertQueryType { + if m != nil { + return m.AlertQueryType } return nil } -func (x *FilterRequest) GetSearchQueries() []string { - if x != nil { - return x.SearchQueries +func (x *AlertRequest) GetStructuredAlertRequest() *StructuredAlertRequest { + if x, ok := x.GetAlertQueryType().(*AlertRequest_StructuredAlertRequest); ok { + return x.StructuredAlertRequest } return nil } -func (x *FilterRequest) GetSqlQuery() string { - if x != nil { - return x.SqlQuery +func (x *AlertRequest) GetCepRequest() *CEPRequest { + if x, ok := x.GetAlertQueryType().(*AlertRequest_CepRequest); ok { + return x.CepRequest } - return "" + return nil } -func (x *FilterRequest) GetFieldBasedFilters() []*FieldBasedFilter { - if x != nil { - return x.FieldBasedFilters +func (x *AlertRequest) GetViewBasedAlertRequest() *ViewBasedAlertRequest { + if x, ok := x.GetAlertQueryType().(*AlertRequest_ViewBasedAlertRequest); ok { + return x.ViewBasedAlertRequest } return nil } -func (x *FilterRequest) GetSources() []*Source { +func (x *AlertRequest) GetAlertId() string { if x != nil { - return x.Sources + return x.AlertId } - return nil + return "" } -func (x *FilterRequest) GetBatchSize() uint32 { - if x != nil { - return x.BatchSize - } - return 0 +type isAlertRequest_AlertQueryType interface { + isAlertRequest_AlertQueryType() } -func (x *FilterRequest) GetIsScrollDown() bool { - if x != nil { - return x.IsScrollDown - } - return false +type AlertRequest_StructuredAlertRequest struct { + StructuredAlertRequest *StructuredAlertRequest `protobuf:"bytes,2,opt,name=structuredAlertRequest,proto3,oneof"` } -type FilteredRecord struct { +type AlertRequest_CepRequest struct { + CepRequest *CEPRequest `protobuf:"bytes,3,opt,name=cepRequest,proto3,oneof"` +} + +type AlertRequest_ViewBasedAlertRequest struct { + ViewBasedAlertRequest *ViewBasedAlertRequest `protobuf:"bytes,4,opt,name=viewBasedAlertRequest,proto3,oneof"` +} + +func (*AlertRequest_StructuredAlertRequest) isAlertRequest_AlertQueryType() {} + +func (*AlertRequest_CepRequest) isAlertRequest_AlertQueryType() {} + +func (*AlertRequest_ViewBasedAlertRequest) isAlertRequest_AlertQueryType() {} + +type Window_TumblingWindow struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - Dt string `protobuf:"bytes,3,opt,name=dt,proto3" json:"dt,omitempty"` - Level string `protobuf:"bytes,4,opt,name=level,proto3" json:"level,omitempty"` - SourceName string `protobuf:"bytes,5,opt,name=sourceName,proto3" json:"sourceName,omitempty"` + TimeIntervalMs uint64 `protobuf:"varint,1,opt,name=timeIntervalMs,proto3" json:"timeIntervalMs,omitempty"` } -func (x *FilteredRecord) Reset() { - *x = FilteredRecord{} +func (x *Window_TumblingWindow) Reset() { + *x = Window_TumblingWindow{} if protoimpl.UnsafeEnabled { - mi := &file_flink_service_proto_msgTypes[8] + mi := &file_flink_service_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FilteredRecord) String() string { +func (x *Window_TumblingWindow) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FilteredRecord) ProtoMessage() {} +func (*Window_TumblingWindow) ProtoMessage() {} -func (x *FilteredRecord) ProtoReflect() protoreflect.Message { - mi := &file_flink_service_proto_msgTypes[8] +func (x *Window_TumblingWindow) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -673,73 +2039,44 @@ func (x *FilteredRecord) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FilteredRecord.ProtoReflect.Descriptor instead. -func (*FilteredRecord) Descriptor() ([]byte, []int) { - return file_flink_service_proto_rawDescGZIP(), []int{8} +// Deprecated: Use Window_TumblingWindow.ProtoReflect.Descriptor instead. +func (*Window_TumblingWindow) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{18, 0} } -func (x *FilteredRecord) GetOffset() uint64 { +func (x *Window_TumblingWindow) GetTimeIntervalMs() uint64 { if x != nil { - return x.Offset + return x.TimeIntervalMs } return 0 } -func (x *FilteredRecord) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *FilteredRecord) GetDt() string { - if x != nil { - return x.Dt - } - return "" -} - -func (x *FilteredRecord) GetLevel() string { - if x != nil { - return x.Level - } - return "" -} - -func (x *FilteredRecord) GetSourceName() string { - if x != nil { - return x.SourceName - } - return "" -} - -type FilteredRecords struct { +type StructuredAlertRequest_Aggregation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Records []*FilteredRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` - IsScrollDown bool `protobuf:"varint,2,opt,name=isScrollDown,proto3" json:"isScrollDown,omitempty"` - Sources []*Source `protobuf:"bytes,3,rep,name=sources,proto3" json:"sources,omitempty"` + FieldName string `protobuf:"bytes,1,opt,name=fieldName,proto3" json:"fieldName,omitempty"` + AggregationFunction StructuredAlertRequest_Aggregation_AggregationFunction `protobuf:"varint,2,opt,name=aggregationFunction,proto3,enum=ai.logfire.StructuredAlertRequest_Aggregation_AggregationFunction" json:"aggregationFunction,omitempty"` } -func (x *FilteredRecords) Reset() { - *x = FilteredRecords{} +func (x *StructuredAlertRequest_Aggregation) Reset() { + *x = StructuredAlertRequest_Aggregation{} if protoimpl.UnsafeEnabled { - mi := &file_flink_service_proto_msgTypes[9] + mi := &file_flink_service_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FilteredRecords) String() string { +func (x *StructuredAlertRequest_Aggregation) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FilteredRecords) ProtoMessage() {} +func (*StructuredAlertRequest_Aggregation) ProtoMessage() {} -func (x *FilteredRecords) ProtoReflect() protoreflect.Message { - mi := &file_flink_service_proto_msgTypes[9] +func (x *StructuredAlertRequest_Aggregation) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -750,58 +2087,54 @@ func (x *FilteredRecords) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FilteredRecords.ProtoReflect.Descriptor instead. -func (*FilteredRecords) Descriptor() ([]byte, []int) { - return file_flink_service_proto_rawDescGZIP(), []int{9} -} - -func (x *FilteredRecords) GetRecords() []*FilteredRecord { - if x != nil { - return x.Records - } - return nil +// Deprecated: Use StructuredAlertRequest_Aggregation.ProtoReflect.Descriptor instead. +func (*StructuredAlertRequest_Aggregation) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{21, 0} } -func (x *FilteredRecords) GetIsScrollDown() bool { +func (x *StructuredAlertRequest_Aggregation) GetFieldName() string { if x != nil { - return x.IsScrollDown + return x.FieldName } - return false + return "" } -func (x *FilteredRecords) GetSources() []*Source { +func (x *StructuredAlertRequest_Aggregation) GetAggregationFunction() StructuredAlertRequest_Aggregation_AggregationFunction { if x != nil { - return x.Sources + return x.AggregationFunction } - return nil + return StructuredAlertRequest_Aggregation_COUNT } -type FilterResponse struct { +type AlertActions_WebhookAction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Record string `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` - JobName string `protobuf:"bytes,2,opt,name=jobName,proto3" json:"jobName,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + HttpMethod AlertActions_WebhookAction_HttpMethod `protobuf:"varint,3,opt,name=httpMethod,proto3,enum=ai.logfire.AlertActions_WebhookAction_HttpMethod" json:"httpMethod,omitempty"` + HeaderDetails []*AlertActions_WebhookAction_HeaderDetails `protobuf:"bytes,4,rep,name=headerDetails,proto3" json:"headerDetails,omitempty"` + BasicAuthentication *AlertActions_WebhookAction_BasicAuthentication `protobuf:"bytes,5,opt,name=basicAuthentication,proto3" json:"basicAuthentication,omitempty"` } -func (x *FilterResponse) Reset() { - *x = FilterResponse{} +func (x *AlertActions_WebhookAction) Reset() { + *x = AlertActions_WebhookAction{} if protoimpl.UnsafeEnabled { - mi := &file_flink_service_proto_msgTypes[10] + mi := &file_flink_service_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *FilterResponse) String() string { +func (x *AlertActions_WebhookAction) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FilterResponse) ProtoMessage() {} +func (*AlertActions_WebhookAction) ProtoMessage() {} -func (x *FilterResponse) ProtoReflect() protoreflect.Message { - mi := &file_flink_service_proto_msgTypes[10] +func (x *AlertActions_WebhookAction) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -812,53 +2145,72 @@ func (x *FilterResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FilterResponse.ProtoReflect.Descriptor instead. -func (*FilterResponse) Descriptor() ([]byte, []int) { - return file_flink_service_proto_rawDescGZIP(), []int{10} +// Deprecated: Use AlertActions_WebhookAction.ProtoReflect.Descriptor instead. +func (*AlertActions_WebhookAction) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{22, 0} +} + +func (x *AlertActions_WebhookAction) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AlertActions_WebhookAction) GetUrl() string { + if x != nil { + return x.Url + } + return "" } -func (x *FilterResponse) GetRecord() string { +func (x *AlertActions_WebhookAction) GetHttpMethod() AlertActions_WebhookAction_HttpMethod { if x != nil { - return x.Record + return x.HttpMethod } - return "" + return AlertActions_WebhookAction_POST } -func (x *FilterResponse) GetJobName() string { +func (x *AlertActions_WebhookAction) GetHeaderDetails() []*AlertActions_WebhookAction_HeaderDetails { if x != nil { - return x.JobName + return x.HeaderDetails } - return "" + return nil } -type SQLRequest struct { +func (x *AlertActions_WebhookAction) GetBasicAuthentication() *AlertActions_WebhookAction_BasicAuthentication { + if x != nil { + return x.BasicAuthentication + } + return nil +} + +type AlertActions_WebhookAction_HeaderDetails struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` - Sources []*Source `protobuf:"bytes,2,rep,name=sources,proto3" json:"sources,omitempty"` - BatchSize uint32 `protobuf:"varint,3,opt,name=batchSize,proto3" json:"batchSize,omitempty"` - DateTimeFilter *DateTimeFilter `protobuf:"bytes,4,opt,name=dateTimeFilter,proto3" json:"dateTimeFilter,omitempty"` + HeaderName string `protobuf:"bytes,1,opt,name=headerName,proto3" json:"headerName,omitempty"` + HeaderValue string `protobuf:"bytes,2,opt,name=headerValue,proto3" json:"headerValue,omitempty"` } -func (x *SQLRequest) Reset() { - *x = SQLRequest{} +func (x *AlertActions_WebhookAction_HeaderDetails) Reset() { + *x = AlertActions_WebhookAction_HeaderDetails{} if protoimpl.UnsafeEnabled { - mi := &file_flink_service_proto_msgTypes[11] + mi := &file_flink_service_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SQLRequest) String() string { +func (x *AlertActions_WebhookAction_HeaderDetails) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SQLRequest) ProtoMessage() {} +func (*AlertActions_WebhookAction_HeaderDetails) ProtoMessage() {} -func (x *SQLRequest) ProtoReflect() protoreflect.Message { - mi := &file_flink_service_proto_msgTypes[11] +func (x *AlertActions_WebhookAction_HeaderDetails) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -869,65 +2221,51 @@ func (x *SQLRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SQLRequest.ProtoReflect.Descriptor instead. -func (*SQLRequest) Descriptor() ([]byte, []int) { - return file_flink_service_proto_rawDescGZIP(), []int{11} +// Deprecated: Use AlertActions_WebhookAction_HeaderDetails.ProtoReflect.Descriptor instead. +func (*AlertActions_WebhookAction_HeaderDetails) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{22, 0, 0} } -func (x *SQLRequest) GetSql() string { +func (x *AlertActions_WebhookAction_HeaderDetails) GetHeaderName() string { if x != nil { - return x.Sql + return x.HeaderName } return "" } -func (x *SQLRequest) GetSources() []*Source { - if x != nil { - return x.Sources - } - return nil -} - -func (x *SQLRequest) GetBatchSize() uint32 { - if x != nil { - return x.BatchSize - } - return 0 -} - -func (x *SQLRequest) GetDateTimeFilter() *DateTimeFilter { +func (x *AlertActions_WebhookAction_HeaderDetails) GetHeaderValue() string { if x != nil { - return x.DateTimeFilter + return x.HeaderValue } - return nil + return "" } -type SQLResponse struct { +type AlertActions_WebhookAction_BasicAuthentication struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - Source *Source `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` } -func (x *SQLResponse) Reset() { - *x = SQLResponse{} +func (x *AlertActions_WebhookAction_BasicAuthentication) Reset() { + *x = AlertActions_WebhookAction_BasicAuthentication{} if protoimpl.UnsafeEnabled { - mi := &file_flink_service_proto_msgTypes[12] + mi := &file_flink_service_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SQLResponse) String() string { +func (x *AlertActions_WebhookAction_BasicAuthentication) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SQLResponse) ProtoMessage() {} +func (*AlertActions_WebhookAction_BasicAuthentication) ProtoMessage() {} -func (x *SQLResponse) ProtoReflect() protoreflect.Message { - mi := &file_flink_service_proto_msgTypes[12] +func (x *AlertActions_WebhookAction_BasicAuthentication) ProtoReflect() protoreflect.Message { + mi := &file_flink_service_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -938,33 +2276,70 @@ func (x *SQLResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SQLResponse.ProtoReflect.Descriptor instead. -func (*SQLResponse) Descriptor() ([]byte, []int) { - return file_flink_service_proto_rawDescGZIP(), []int{12} +// Deprecated: Use AlertActions_WebhookAction_BasicAuthentication.ProtoReflect.Descriptor instead. +func (*AlertActions_WebhookAction_BasicAuthentication) Descriptor() ([]byte, []int) { + return file_flink_service_proto_rawDescGZIP(), []int{22, 0, 1} } -func (x *SQLResponse) GetData() string { +func (x *AlertActions_WebhookAction_BasicAuthentication) GetUsername() string { if x != nil { - return x.Data + return x.Username } return "" } -func (x *SQLResponse) GetSource() *Source { +func (x *AlertActions_WebhookAction_BasicAuthentication) GetPassword() string { if x != nil { - return x.Source + return x.Password } - return nil + return "" } var File_flink_service_proto protoreflect.FileDescriptor var file_flink_service_proto_rawDesc = []byte{ 0x0a, 0x13, 0x66, 0x6c, 0x69, 0x6e, 0x6b, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x73, 0x68, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 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, 0x94, 0x01, 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x46, + 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, + 0x41, 0x6c, 0x65, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x49, 0x44, 0x22, + 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x7b, 0x0a, 0x0a, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, + 0x69, 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x0f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, + 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xc6, 0x01, 0x0a, 0x0a, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x73, 0x71, 0x6c, 0x12, 0x2c, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, + 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x07, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x69, 0x7a, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x42, 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x69, 0x2e, + 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0e, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x44, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x44, 0x22, 0x4d, + 0x0a, 0x0b, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x82, 0x01, + 0x0a, 0x14, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, + 0x61, 0x6d, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, + 0x49, 0x44, 0x22, 0x94, 0x01, 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, @@ -976,132 +2351,327 @@ var file_flink_service_proto_rawDesc = []byte{ 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x27, 0x0a, 0x0d, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xa8, 0x01, 0x0a, 0x06, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x4f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x69, 0x6e, 0x67, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, - 0x0a, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x74, 0x65, 0x61, 0x6d, 0x49, 0x44, 0x22, 0x35, 0x0a, 0x19, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x36, 0x0a, - 0x1a, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0xb0, 0x02, 0x0a, 0x10, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, - 0x61, 0x73, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x73, 0x68, 0x2e, - 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x73, - 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x9a, 0x01, 0x0a, 0x08, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x4f, 0x4e, 0x54, - 0x41, 0x49, 0x4e, 0x53, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x4f, 0x45, 0x53, 0x5f, 0x4e, - 0x4f, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, - 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x54, 0x5f, - 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x47, 0x52, 0x45, 0x41, - 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x10, 0x04, 0x12, 0x17, 0x0a, 0x13, 0x47, 0x52, - 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, - 0x53, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x41, 0x4e, - 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x5f, - 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x07, 0x22, 0x94, 0x03, 0x0a, 0x0d, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x0e, 0x73, 0x65, - 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x73, 0x68, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, - 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0e, 0x73, - 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x12, 0x42, 0x0a, - 0x0e, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x68, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, - 0x72, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x52, 0x0e, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x71, 0x6c, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x71, 0x6c, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x12, 0x4a, 0x0a, 0x11, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x73, 0x65, - 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x73, 0x68, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x72, 0x64, 0x22, 0xa8, 0x01, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x69, 0x6e, 0x67, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x4f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x44, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x44, 0x22, 0x35, 0x0a, + 0x19, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6a, 0x6f, + 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, + 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x36, 0x0a, 0x1a, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0xb0, 0x02, 0x0a, + 0x10, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x73, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x41, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x25, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x73, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x22, 0x9a, 0x01, 0x0a, 0x08, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x0c, 0x0a, 0x08, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x53, 0x10, 0x00, 0x12, 0x14, 0x0a, + 0x10, 0x44, 0x4f, 0x45, 0x53, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, + 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x02, 0x12, + 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x03, 0x12, + 0x10, 0x0a, 0x0c, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x10, + 0x04, 0x12, 0x17, 0x0a, 0x13, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x41, + 0x4e, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x45, + 0x53, 0x53, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x45, 0x53, + 0x53, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x07, 0x22, + 0xc4, 0x03, 0x0a, 0x0d, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x74, 0x65, 0x61, 0x6d, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x69, 0x65, + 0x77, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x69, 0x65, 0x77, 0x49, + 0x44, 0x12, 0x41, 0x0a, 0x0e, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x61, 0x69, 0x2e, 0x6c, + 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0e, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x73, 0x12, 0x42, 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, + 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0e, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1a, + 0x0a, 0x08, 0x73, 0x71, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x73, 0x71, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x4a, 0x0a, 0x11, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x42, 0x61, 0x73, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, + 0x72, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x73, 0x65, 0x64, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x52, 0x11, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x73, 0x65, 0x64, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, + 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x07, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x69, 0x7a, + 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x53, 0x63, 0x72, 0x6f, 0x6c, 0x6c, 0x44, 0x6f, + 0x77, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x53, 0x63, 0x72, 0x6f, + 0x6c, 0x6c, 0x44, 0x6f, 0x77, 0x6e, 0x22, 0x88, 0x01, 0x0a, 0x0e, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x64, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x64, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, + 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, + 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x22, 0x99, 0x01, 0x0a, 0x0f, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, + 0x69, 0x72, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x69, + 0x73, 0x53, 0x63, 0x72, 0x6f, 0x6c, 0x6c, 0x44, 0x6f, 0x77, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0c, 0x69, 0x73, 0x53, 0x63, 0x72, 0x6f, 0x6c, 0x6c, 0x44, 0x6f, 0x77, 0x6e, 0x12, + 0x2c, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x42, 0x0a, + 0x0e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, + 0x65, 0x22, 0x4a, 0x0a, 0x08, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x3e, 0x0a, + 0x0d, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, + 0x65, 0x2e, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, + 0x61, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0xc1, 0x01, + 0x0a, 0x0c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0d, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x53, 0x65, 0x76, + 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x61, 0x69, + 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, + 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0d, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x53, 0x65, 0x76, + 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x6c, 0x65, 0x72, + 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x62, 0x6f, + 0x6f, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x75, 0x6e, 0x62, 0x6f, 0x6f, + 0x6b, 0x22, 0x9d, 0x01, 0x0a, 0x06, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x4b, 0x0a, 0x0e, + 0x74, 0x75, 0x6d, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, + 0x65, 0x2e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x54, 0x75, 0x6d, 0x62, 0x6c, 0x69, 0x6e, + 0x67, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x75, 0x6d, 0x62, 0x6c, + 0x69, 0x6e, 0x67, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x1a, 0x38, 0x0a, 0x0e, 0x54, 0x75, 0x6d, + 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x26, 0x0a, 0x0e, 0x74, + 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4d, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x4d, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x54, 0x79, 0x70, + 0x65, 0x22, 0xf6, 0x02, 0x0a, 0x15, 0x56, 0x69, 0x65, 0x77, 0x42, 0x61, 0x73, 0x65, 0x64, 0x41, + 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x07, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, + 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x11, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x42, 0x61, 0x73, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, + 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x73, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x52, 0x11, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x73, 0x65, 0x64, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x38, 0x0a, 0x17, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x57, 0x68, + 0x65, 0x6e, 0x48, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x57, 0x68, 0x65, + 0x6e, 0x48, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, + 0x28, 0x0a, 0x0f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x4f, 0x66, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x77, 0x69, 0x74, + 0x68, 0x69, 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0d, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x0d, 0x61, 0x6c, 0x65, + 0x72, 0x74, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x19, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, 0x65, + 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x0d, 0x61, 0x6c, 0x65, + 0x72, 0x74, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x22, 0xae, 0x03, 0x0a, 0x0a, 0x43, + 0x45, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x12, 0x34, 0x0a, 0x15, 0x77, + 0x69, 0x74, 0x68, 0x69, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x77, 0x69, 0x74, 0x68, + 0x69, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x73, 0x12, 0x26, 0x0a, + 0x0e, 0x61, 0x66, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x6b, 0x69, 0x70, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x66, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x53, 0x6b, 0x69, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, + 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x11, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x73, 0x65, + 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x73, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x11, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x73, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x2c, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x73, 0x68, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x1c, 0x0a, - 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x69, - 0x73, 0x53, 0x63, 0x72, 0x6f, 0x6c, 0x6c, 0x44, 0x6f, 0x77, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0c, 0x69, 0x73, 0x53, 0x63, 0x72, 0x6f, 0x6c, 0x6c, 0x44, 0x6f, 0x77, 0x6e, 0x22, - 0x88, 0x01, 0x0a, 0x0e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x64, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x99, 0x01, 0x0a, 0x0f, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x34, - 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x73, 0x68, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x53, 0x63, 0x72, 0x6f, 0x6c, 0x6c, - 0x44, 0x6f, 0x77, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x53, 0x63, - 0x72, 0x6f, 0x6c, 0x6c, 0x44, 0x6f, 0x77, 0x6e, 0x12, 0x2c, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x68, 0x2e, 0x6c, - 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x07, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x42, 0x0a, 0x0e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x12, 0x18, 0x0a, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x0a, 0x53, - 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x71, 0x6c, 0x12, 0x2c, 0x0a, 0x07, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, - 0x68, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x61, 0x74, - 0x63, 0x68, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x61, - 0x74, 0x63, 0x68, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x42, 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x73, 0x68, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x44, 0x61, 0x74, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0e, 0x64, 0x61, 0x74, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x4d, 0x0a, 0x0b, 0x53, - 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2a, - 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x73, 0x68, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2a, 0x8a, 0x01, 0x0a, 0x0d, 0x53, - 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x08, 0x0a, 0x04, - 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x52, 0x41, 0x43, 0x45, 0x10, - 0x01, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, - 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, - 0x4f, 0x52, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x41, 0x54, 0x41, 0x4c, 0x10, 0x05, 0x12, - 0x11, 0x0a, 0x0d, 0x49, 0x4e, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, - 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x54, 0x49, 0x43, 0x45, 0x10, 0x07, 0x12, 0x0c, - 0x0a, 0x08, 0x43, 0x52, 0x49, 0x54, 0x49, 0x43, 0x41, 0x4c, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, - 0x41, 0x4c, 0x45, 0x52, 0x54, 0x10, 0x09, 0x32, 0xd4, 0x01, 0x0a, 0x0c, 0x46, 0x6c, 0x69, 0x6e, - 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x19, 0x2e, 0x73, 0x68, + 0x5a, 0x0a, 0x19, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x73, 0x65, 0x64, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x41, 0x66, 0x74, 0x65, 0x72, 0x43, 0x65, 0x70, 0x18, 0x09, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x73, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x52, 0x19, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x73, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x41, 0x66, 0x74, 0x65, 0x72, 0x43, 0x65, 0x70, 0x22, 0x82, 0x07, 0x0a, 0x16, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x11, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x42, + 0x61, 0x73, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x73, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, + 0x11, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x61, 0x73, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x57, 0x68, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, + 0x72, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x41, 0x6c, 0x65, + 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x57, + 0x68, 0x65, 0x6e, 0x52, 0x09, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x57, 0x68, 0x65, 0x6e, 0x12, 0x1e, + 0x0a, 0x0a, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x0a, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x5e, + 0x0a, 0x12, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x61, 0x69, 0x2e, + 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, + 0x65, 0x64, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, + 0x0a, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x57, 0x69, 0x6e, 0x64, + 0x6f, 0x77, 0x52, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x69, 0x2e, + 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0xfe, 0x02, 0x0a, 0x0b, 0x41, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x74, 0x0a, 0x13, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x42, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x75, 0x6e, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xda, 0x01, 0x0a, 0x13, 0x41, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x00, 0x12, 0x0c, 0x0a, + 0x08, 0x44, 0x49, 0x53, 0x54, 0x49, 0x4e, 0x43, 0x54, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x53, + 0x55, 0x4d, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x49, 0x4e, 0x10, 0x03, 0x12, 0x07, 0x0a, + 0x03, 0x41, 0x56, 0x47, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x49, 0x52, 0x53, 0x54, 0x5f, + 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x41, 0x53, 0x54, 0x5f, + 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x06, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x41, 0x52, 0x49, 0x41, + 0x4e, 0x43, 0x45, 0x5f, 0x50, 0x4f, 0x50, 0x55, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x07, + 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x41, 0x52, 0x49, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x53, 0x41, 0x4d, + 0x50, 0x4c, 0x45, 0x10, 0x08, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, + 0x44, 0x5f, 0x44, 0x45, 0x56, 0x49, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x41, 0x4d, 0x50, + 0x4c, 0x45, 0x10, 0x09, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, + 0x5f, 0x44, 0x45, 0x56, 0x49, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x4f, 0x50, 0x55, 0x4c, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0a, 0x22, 0x77, 0x0a, 0x09, 0x41, 0x6c, 0x65, 0x72, 0x74, + 0x57, 0x68, 0x65, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x00, + 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x01, + 0x12, 0x10, 0x0a, 0x0c, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x41, 0x4e, + 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, + 0x41, 0x4e, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x4c, + 0x45, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x45, + 0x53, 0x53, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x05, + 0x22, 0xa2, 0x05, 0x0a, 0x0c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x4e, 0x0a, 0x0d, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, + 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x0d, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x1a, 0xb3, 0x04, 0x0a, 0x0d, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x51, 0x0a, 0x0a, 0x68, 0x74, 0x74, + 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, + 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x41, 0x6c, 0x65, 0x72, 0x74, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x5a, 0x0a, 0x0d, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, + 0x2e, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x57, 0x65, + 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0d, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x6c, 0x0a, 0x13, 0x62, 0x61, 0x73, 0x69, + 0x63, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, + 0x72, 0x65, 0x2e, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x61, + 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x13, 0x62, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x51, 0x0a, 0x0d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4d, 0x0a, 0x13, 0x42, 0x61, 0x73, + 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x3d, 0x0a, 0x0a, 0x48, 0x74, 0x74, 0x70, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x4f, 0x53, 0x54, 0x10, 0x00, + 0x12, 0x08, 0x0a, 0x04, 0x48, 0x45, 0x41, 0x44, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, + 0x54, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, + 0x50, 0x41, 0x54, 0x43, 0x48, 0x10, 0x04, 0x42, 0x0c, 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0xe1, 0x02, 0x0a, 0x0c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, + 0x66, 0x69, 0x72, 0x65, 0x2e, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x5c, 0x0a, 0x16, 0x73, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x69, 0x2e, + 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, + 0x65, 0x64, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, + 0x52, 0x16, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x41, 0x6c, 0x65, 0x72, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x65, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, + 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x43, 0x45, 0x50, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x65, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x59, 0x0a, 0x15, 0x76, 0x69, 0x65, 0x77, 0x42, 0x61, 0x73, 0x65, 0x64, 0x41, + 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x56, + 0x69, 0x65, 0x77, 0x42, 0x61, 0x73, 0x65, 0x64, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x15, 0x76, 0x69, 0x65, 0x77, 0x42, 0x61, 0x73, 0x65, + 0x64, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x61, 0x6c, 0x65, 0x72, 0x74, 0x49, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x61, 0x6c, 0x65, 0x72, 0x74, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x2a, 0x8a, 0x01, 0x0a, 0x0d, 0x53, 0x65, + 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x08, 0x0a, 0x04, 0x49, + 0x4e, 0x46, 0x4f, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x52, 0x41, 0x43, 0x45, 0x10, 0x01, + 0x12, 0x09, 0x0a, 0x05, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x57, + 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x41, 0x54, 0x41, 0x4c, 0x10, 0x05, 0x12, 0x11, + 0x0a, 0x0d, 0x49, 0x4e, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, + 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x54, 0x49, 0x43, 0x45, 0x10, 0x07, 0x12, 0x0c, 0x0a, + 0x08, 0x43, 0x52, 0x49, 0x54, 0x49, 0x43, 0x41, 0x4c, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x41, + 0x4c, 0x45, 0x52, 0x54, 0x10, 0x09, 0x32, 0xec, 0x02, 0x0a, 0x0d, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x19, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x68, 0x2e, 0x6c, 0x6f, 0x67, 0x66, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x53, - 0x51, 0x4c, 0x12, 0x16, 0x2e, 0x73, 0x68, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, - 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x68, 0x2e, + 0x51, 0x4c, 0x12, 0x16, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, + 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x2e, 0x73, 0x68, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, - 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0x11, 0x2e, 0x73, 0x68, 0x2e, 0x6c, - 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x17, - 0x5a, 0x15, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2f, 0x66, 0x6c, 0x69, 0x6e, 0x6b, 0x2d, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x41, + 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x2e, 0x61, 0x69, + 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, + 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x41, 0x6c, 0x65, + 0x72, 0x74, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6c, + 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x69, 0x2e, + 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x65, 0x64, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x1a, 0x11, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, + 0x66, 0x69, 0x72, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0c, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x2e, 0x61, + 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x1a, 0x11, 0x2e, 0x61, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x14, 0x5a, 0x12, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x6f, 0x67, 0x66, 0x69, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1116,50 +2686,97 @@ func file_flink_service_proto_rawDescGZIP() []byte { return file_flink_service_proto_rawDescData } -var file_flink_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_flink_service_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_flink_service_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_flink_service_proto_msgTypes = make([]protoimpl.MessageInfo, 29) var file_flink_service_proto_goTypes = []interface{}{ - (SeverityLevel)(0), // 0: sh.logfire.SeverityLevel - (FieldBasedFilter_Operator)(0), // 1: sh.logfire.FieldBasedFilter.Operator - (*DateTimeFilter)(nil), // 2: sh.logfire.DateTimeFilter - (*RecordDetails)(nil), // 3: sh.logfire.RecordDetails - (*Empty)(nil), // 4: sh.logfire.Empty - (*Source)(nil), // 5: sh.logfire.Source - (*FilterCancellationRequest)(nil), // 6: sh.logfire.FilterCancellationRequest - (*FilterCancellationResponse)(nil), // 7: sh.logfire.FilterCancellationResponse - (*FieldBasedFilter)(nil), // 8: sh.logfire.FieldBasedFilter - (*FilterRequest)(nil), // 9: sh.logfire.FilterRequest - (*FilteredRecord)(nil), // 10: sh.logfire.FilteredRecord - (*FilteredRecords)(nil), // 11: sh.logfire.FilteredRecords - (*FilterResponse)(nil), // 12: sh.logfire.FilterResponse - (*SQLRequest)(nil), // 13: sh.logfire.SQLRequest - (*SQLResponse)(nil), // 14: sh.logfire.SQLResponse - (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp + (SeverityLevel)(0), // 0: ai.logfire.SeverityLevel + (FieldBasedFilter_Operator)(0), // 1: ai.logfire.FieldBasedFilter.Operator + (StructuredAlertRequest_AlertWhen)(0), // 2: ai.logfire.StructuredAlertRequest.AlertWhen + (StructuredAlertRequest_Aggregation_AggregationFunction)(0), // 3: ai.logfire.StructuredAlertRequest.Aggregation.AggregationFunction + (AlertActions_WebhookAction_HttpMethod)(0), // 4: ai.logfire.AlertActions.WebhookAction.HttpMethod + (*RegisteredAlert)(nil), // 5: ai.logfire.RegisteredAlert + (*Empty)(nil), // 6: ai.logfire.Empty + (*SourceInfo)(nil), // 7: ai.logfire.SourceInfo + (*SQLRequest)(nil), // 8: ai.logfire.SQLRequest + (*SQLResponse)(nil), // 9: ai.logfire.SQLResponse + (*RecordDetailsRequest)(nil), // 10: ai.logfire.RecordDetailsRequest + (*DateTimeFilter)(nil), // 11: ai.logfire.DateTimeFilter + (*RecordDetails)(nil), // 12: ai.logfire.RecordDetails + (*Source)(nil), // 13: ai.logfire.Source + (*FilterCancellationRequest)(nil), // 14: ai.logfire.FilterCancellationRequest + (*FilterCancellationResponse)(nil), // 15: ai.logfire.FilterCancellationResponse + (*FieldBasedFilter)(nil), // 16: ai.logfire.FieldBasedFilter + (*FilterRequest)(nil), // 17: ai.logfire.FilterRequest + (*FilteredRecord)(nil), // 18: ai.logfire.FilteredRecord + (*FilteredRecords)(nil), // 19: ai.logfire.FilteredRecords + (*FilterResponse)(nil), // 20: ai.logfire.FilterResponse + (*AlertJob)(nil), // 21: ai.logfire.AlertJob + (*AlertDetails)(nil), // 22: ai.logfire.AlertDetails + (*Window)(nil), // 23: ai.logfire.Window + (*ViewBasedAlertRequest)(nil), // 24: ai.logfire.ViewBasedAlertRequest + (*CEPRequest)(nil), // 25: ai.logfire.CEPRequest + (*StructuredAlertRequest)(nil), // 26: ai.logfire.StructuredAlertRequest + (*AlertActions)(nil), // 27: ai.logfire.AlertActions + (*AlertRequest)(nil), // 28: ai.logfire.AlertRequest + (*Window_TumblingWindow)(nil), // 29: ai.logfire.Window.TumblingWindow + (*StructuredAlertRequest_Aggregation)(nil), // 30: ai.logfire.StructuredAlertRequest.Aggregation + (*AlertActions_WebhookAction)(nil), // 31: ai.logfire.AlertActions.WebhookAction + (*AlertActions_WebhookAction_HeaderDetails)(nil), // 32: ai.logfire.AlertActions.WebhookAction.HeaderDetails + (*AlertActions_WebhookAction_BasicAuthentication)(nil), // 33: ai.logfire.AlertActions.WebhookAction.BasicAuthentication + (*timestamppb.Timestamp)(nil), // 34: google.protobuf.Timestamp } var file_flink_service_proto_depIdxs = []int32{ - 15, // 0: sh.logfire.DateTimeFilter.startTimeStamp:type_name -> google.protobuf.Timestamp - 15, // 1: sh.logfire.DateTimeFilter.endTimeStamp:type_name -> google.protobuf.Timestamp - 1, // 2: sh.logfire.FieldBasedFilter.operator:type_name -> sh.logfire.FieldBasedFilter.Operator - 0, // 3: sh.logfire.FilterRequest.severityLevels:type_name -> sh.logfire.SeverityLevel - 2, // 4: sh.logfire.FilterRequest.dateTimeFilter:type_name -> sh.logfire.DateTimeFilter - 8, // 5: sh.logfire.FilterRequest.fieldBasedFilters:type_name -> sh.logfire.FieldBasedFilter - 5, // 6: sh.logfire.FilterRequest.sources:type_name -> sh.logfire.Source - 10, // 7: sh.logfire.FilteredRecords.records:type_name -> sh.logfire.FilteredRecord - 5, // 8: sh.logfire.FilteredRecords.sources:type_name -> sh.logfire.Source - 5, // 9: sh.logfire.SQLRequest.sources:type_name -> sh.logfire.Source - 2, // 10: sh.logfire.SQLRequest.dateTimeFilter:type_name -> sh.logfire.DateTimeFilter - 5, // 11: sh.logfire.SQLResponse.source:type_name -> sh.logfire.Source - 9, // 12: sh.logfire.FlinkService.GetFilteredData:input_type -> sh.logfire.FilterRequest - 13, // 13: sh.logfire.FlinkService.SubmitSQL:input_type -> sh.logfire.SQLRequest - 5, // 14: sh.logfire.FlinkService.CreateSource:input_type -> sh.logfire.Source - 11, // 15: sh.logfire.FlinkService.GetFilteredData:output_type -> sh.logfire.FilteredRecords - 14, // 16: sh.logfire.FlinkService.SubmitSQL:output_type -> sh.logfire.SQLResponse - 4, // 17: sh.logfire.FlinkService.CreateSource:output_type -> sh.logfire.Empty - 15, // [15:18] is the sub-list for method output_type - 12, // [12:15] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 13, // 0: ai.logfire.SourceInfo.source:type_name -> ai.logfire.Source + 13, // 1: ai.logfire.SQLRequest.sources:type_name -> ai.logfire.Source + 11, // 2: ai.logfire.SQLRequest.dateTimeFilter:type_name -> ai.logfire.DateTimeFilter + 13, // 3: ai.logfire.SQLResponse.source:type_name -> ai.logfire.Source + 34, // 4: ai.logfire.DateTimeFilter.startTimeStamp:type_name -> google.protobuf.Timestamp + 34, // 5: ai.logfire.DateTimeFilter.endTimeStamp:type_name -> google.protobuf.Timestamp + 1, // 6: ai.logfire.FieldBasedFilter.operator:type_name -> ai.logfire.FieldBasedFilter.Operator + 0, // 7: ai.logfire.FilterRequest.severityLevels:type_name -> ai.logfire.SeverityLevel + 11, // 8: ai.logfire.FilterRequest.dateTimeFilter:type_name -> ai.logfire.DateTimeFilter + 16, // 9: ai.logfire.FilterRequest.fieldBasedFilters:type_name -> ai.logfire.FieldBasedFilter + 13, // 10: ai.logfire.FilterRequest.sources:type_name -> ai.logfire.Source + 18, // 11: ai.logfire.FilteredRecords.records:type_name -> ai.logfire.FilteredRecord + 13, // 12: ai.logfire.FilteredRecords.sources:type_name -> ai.logfire.Source + 28, // 13: ai.logfire.AlertJob.alertRequests:type_name -> ai.logfire.AlertRequest + 0, // 14: ai.logfire.AlertDetails.alertSeverity:type_name -> ai.logfire.SeverityLevel + 29, // 15: ai.logfire.Window.tumblingWindow:type_name -> ai.logfire.Window.TumblingWindow + 13, // 16: ai.logfire.ViewBasedAlertRequest.sources:type_name -> ai.logfire.Source + 16, // 17: ai.logfire.ViewBasedAlertRequest.fieldBasedFilters:type_name -> ai.logfire.FieldBasedFilter + 0, // 18: ai.logfire.ViewBasedAlertRequest.alertSeverity:type_name -> ai.logfire.SeverityLevel + 13, // 19: ai.logfire.CEPRequest.source:type_name -> ai.logfire.Source + 16, // 20: ai.logfire.CEPRequest.fieldBasedFilters:type_name -> ai.logfire.FieldBasedFilter + 16, // 21: ai.logfire.CEPRequest.fieldBasedFiltersAfterCep:type_name -> ai.logfire.FieldBasedFilter + 16, // 22: ai.logfire.StructuredAlertRequest.fieldBasedFilters:type_name -> ai.logfire.FieldBasedFilter + 2, // 23: ai.logfire.StructuredAlertRequest.alertWhen:type_name -> ai.logfire.StructuredAlertRequest.AlertWhen + 30, // 24: ai.logfire.StructuredAlertRequest.aggregationRequest:type_name -> ai.logfire.StructuredAlertRequest.Aggregation + 23, // 25: ai.logfire.StructuredAlertRequest.window:type_name -> ai.logfire.Window + 13, // 26: ai.logfire.StructuredAlertRequest.source:type_name -> ai.logfire.Source + 31, // 27: ai.logfire.AlertActions.webhookAction:type_name -> ai.logfire.AlertActions.WebhookAction + 22, // 28: ai.logfire.AlertRequest.details:type_name -> ai.logfire.AlertDetails + 26, // 29: ai.logfire.AlertRequest.structuredAlertRequest:type_name -> ai.logfire.StructuredAlertRequest + 25, // 30: ai.logfire.AlertRequest.cepRequest:type_name -> ai.logfire.CEPRequest + 24, // 31: ai.logfire.AlertRequest.viewBasedAlertRequest:type_name -> ai.logfire.ViewBasedAlertRequest + 3, // 32: ai.logfire.StructuredAlertRequest.Aggregation.aggregationFunction:type_name -> ai.logfire.StructuredAlertRequest.Aggregation.AggregationFunction + 4, // 33: ai.logfire.AlertActions.WebhookAction.httpMethod:type_name -> ai.logfire.AlertActions.WebhookAction.HttpMethod + 32, // 34: ai.logfire.AlertActions.WebhookAction.headerDetails:type_name -> ai.logfire.AlertActions.WebhookAction.HeaderDetails + 33, // 35: ai.logfire.AlertActions.WebhookAction.basicAuthentication:type_name -> ai.logfire.AlertActions.WebhookAction.BasicAuthentication + 17, // 36: ai.logfire.FilterService.GetFilteredData:input_type -> ai.logfire.FilterRequest + 8, // 37: ai.logfire.FilterService.SubmitSQL:input_type -> ai.logfire.SQLRequest + 28, // 38: ai.logfire.FilterService.SubmitAlertRequest:input_type -> ai.logfire.AlertRequest + 5, // 39: ai.logfire.FilterService.DeleteAlertRequest:input_type -> ai.logfire.RegisteredAlert + 13, // 40: ai.logfire.FilterService.CreateSource:input_type -> ai.logfire.Source + 19, // 41: ai.logfire.FilterService.GetFilteredData:output_type -> ai.logfire.FilteredRecords + 9, // 42: ai.logfire.FilterService.SubmitSQL:output_type -> ai.logfire.SQLResponse + 5, // 43: ai.logfire.FilterService.SubmitAlertRequest:output_type -> ai.logfire.RegisteredAlert + 6, // 44: ai.logfire.FilterService.DeleteAlertRequest:output_type -> ai.logfire.Empty + 6, // 45: ai.logfire.FilterService.CreateSource:output_type -> ai.logfire.Empty + 41, // [41:46] is the sub-list for method output_type + 36, // [36:41] is the sub-list for method input_type + 36, // [36:36] is the sub-list for extension type_name + 36, // [36:36] is the sub-list for extension extendee + 0, // [0:36] is the sub-list for field type_name } func init() { file_flink_service_proto_init() } @@ -1169,7 +2786,7 @@ func file_flink_service_proto_init() { } if !protoimpl.UnsafeEnabled { file_flink_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DateTimeFilter); i { + switch v := v.(*RegisteredAlert); i { case 0: return &v.state case 1: @@ -1181,7 +2798,7 @@ func file_flink_service_proto_init() { } } file_flink_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RecordDetails); i { + switch v := v.(*Empty); i { case 0: return &v.state case 1: @@ -1193,7 +2810,7 @@ func file_flink_service_proto_init() { } } file_flink_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Empty); i { + switch v := v.(*SourceInfo); i { case 0: return &v.state case 1: @@ -1205,7 +2822,7 @@ func file_flink_service_proto_init() { } } file_flink_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Source); i { + switch v := v.(*SQLRequest); i { case 0: return &v.state case 1: @@ -1217,7 +2834,7 @@ func file_flink_service_proto_init() { } } file_flink_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterCancellationRequest); i { + switch v := v.(*SQLResponse); i { case 0: return &v.state case 1: @@ -1229,7 +2846,7 @@ func file_flink_service_proto_init() { } } file_flink_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterCancellationResponse); i { + switch v := v.(*RecordDetailsRequest); i { case 0: return &v.state case 1: @@ -1241,7 +2858,7 @@ func file_flink_service_proto_init() { } } file_flink_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FieldBasedFilter); i { + switch v := v.(*DateTimeFilter); i { case 0: return &v.state case 1: @@ -1253,7 +2870,7 @@ func file_flink_service_proto_init() { } } file_flink_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterRequest); i { + switch v := v.(*RecordDetails); i { case 0: return &v.state case 1: @@ -1265,7 +2882,7 @@ func file_flink_service_proto_init() { } } file_flink_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilteredRecord); i { + switch v := v.(*Source); i { case 0: return &v.state case 1: @@ -1277,7 +2894,7 @@ func file_flink_service_proto_init() { } } file_flink_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilteredRecords); i { + switch v := v.(*FilterCancellationRequest); i { case 0: return &v.state case 1: @@ -1289,7 +2906,7 @@ func file_flink_service_proto_init() { } } file_flink_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterResponse); i { + switch v := v.(*FilterCancellationResponse); i { case 0: return &v.state case 1: @@ -1301,7 +2918,7 @@ func file_flink_service_proto_init() { } } file_flink_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SQLRequest); i { + switch v := v.(*FieldBasedFilter); i { case 0: return &v.state case 1: @@ -1313,7 +2930,199 @@ func file_flink_service_proto_init() { } } file_flink_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SQLResponse); i { + switch v := v.(*FilterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flink_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FilteredRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flink_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FilteredRecords); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flink_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FilterResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flink_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AlertJob); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flink_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AlertDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flink_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Window); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flink_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ViewBasedAlertRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flink_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CEPRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flink_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StructuredAlertRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flink_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AlertActions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flink_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AlertRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flink_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Window_TumblingWindow); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flink_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StructuredAlertRequest_Aggregation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flink_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AlertActions_WebhookAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flink_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AlertActions_WebhookAction_HeaderDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flink_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AlertActions_WebhookAction_BasicAuthentication); i { case 0: return &v.state case 1: @@ -1325,13 +3134,25 @@ func file_flink_service_proto_init() { } } } + file_flink_service_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_flink_service_proto_msgTypes[18].OneofWrappers = []interface{}{ + (*Window_TumblingWindow_)(nil), + } + file_flink_service_proto_msgTypes[22].OneofWrappers = []interface{}{ + (*AlertActions_WebhookAction_)(nil), + } + file_flink_service_proto_msgTypes[23].OneofWrappers = []interface{}{ + (*AlertRequest_StructuredAlertRequest)(nil), + (*AlertRequest_CepRequest)(nil), + (*AlertRequest_ViewBasedAlertRequest)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_flink_service_proto_rawDesc, - NumEnums: 2, - NumMessages: 13, + NumEnums: 5, + NumMessages: 29, NumExtensions: 0, NumServices: 1, }, diff --git a/services/flink-service/flink-service.proto b/services/flink-service/flink-service.proto index 6975aeb..16ce23e 100644 --- a/services/flink-service/flink-service.proto +++ b/services/flink-service/flink-service.proto @@ -1,11 +1,19 @@ syntax = "proto3"; -package sh.logfire; +package ai.logfire; -option go_package = "logfire/flink-service"; +option go_package = "github.com/logfire"; import "google/protobuf/timestamp.proto"; +service FilterService { + rpc GetFilteredData (FilterRequest) returns (FilteredRecords) {} + rpc SubmitSQL (SQLRequest) returns (SQLResponse) {} + rpc SubmitAlertRequest(AlertRequest) returns (RegisteredAlert) {} + rpc DeleteAlertRequest(RegisteredAlert) returns (Empty) {} + rpc CreateSource(Source) returns (Empty) {} +} + enum SeverityLevel { INFO = 0; TRACE = 1; @@ -19,6 +27,39 @@ enum SeverityLevel { ALERT = 9; } +message RegisteredAlert { + string alertID = 1; +} + +message Empty { + +} + +message SourceInfo { + Source source = 1; + optional string latestTimestamp = 2; +} + +message SQLRequest { + string sql = 1; + repeated Source sources = 2; + uint32 batchSize = 3; + DateTimeFilter dateTimeFilter = 4; + string teamID = 5; +} + +message SQLResponse { + string data = 1; + Source source = 2; +} + +message RecordDetailsRequest { + string sourceName = 1; + uint64 offset = 3; + string sourceID = 4; + string teamID = 5; +} + message DateTimeFilter { google.protobuf.Timestamp startTimeStamp = 1; google.protobuf.Timestamp endTimeStamp = 2; @@ -28,10 +69,6 @@ message RecordDetails { string record = 1; } -message Empty { - -} - message Source { string sourceID = 1; string sourceName = 2; @@ -65,13 +102,15 @@ message FieldBasedFilter { Operator operator = 3; } -message FilterRequest { - repeated SeverityLevel severityLevels = 1; - DateTimeFilter dateTimeFilter = 2; - repeated string searchQueries = 3; - string sqlQuery = 4; - repeated FieldBasedFilter fieldBasedFilters = 5; - repeated Source sources = 6; +message FilterRequest { + string teamID = 1; + string viewID = 2; + repeated SeverityLevel severityLevels = 3; + DateTimeFilter dateTimeFilter = 4; + repeated string searchQueries = 5; + string sqlQuery = 6; + repeated FieldBasedFilter fieldBasedFilters = 7; + repeated Source sources = 8; uint32 batchSize = 9; bool isScrollDown = 10; } @@ -95,20 +134,132 @@ message FilterResponse { string jobName = 2; } -message SQLRequest { - string sql = 1; - repeated Source sources = 2; - uint32 batchSize = 3; - DateTimeFilter dateTimeFilter = 4; +message AlertJob { + repeated AlertRequest alertRequests = 1; } -message SQLResponse { - string data = 1; - Source source = 2; +message AlertDetails { + string name = 1; + string description = 2; + SeverityLevel alertSeverity = 3; + repeated string alertLabels = 4; + string runbook = 5; } -service FlinkService { - rpc GetFilteredData (FilterRequest) returns (FilteredRecords) {} - rpc SubmitSQL (SQLRequest) returns (SQLResponse) {} - rpc CreateSource(Source) returns (Empty) {} +message Window { + message TumblingWindow { + uint64 timeIntervalMs = 1; + } + + oneof windowType { + TumblingWindow tumblingWindow = 1; + } +} + +message ViewBasedAlertRequest { + repeated Source sources = 1; + repeated FieldBasedFilter fieldBasedFilters = 2; + bool alertWhenHasMoreRecords = 3; + uint32 numberOfRecords = 4; + uint32 withinSeconds = 5; + string alertId = 6; + SeverityLevel alertSeverity = 7; +} + + +message CEPRequest { + string partitionBy = 1; + uint64 withinIntervalSeconds = 2; + string measures = 3; + string afterMatchSkip = 4; + string pattern = 5; + string define = 6; + Source source = 7; + repeated FieldBasedFilter fieldBasedFilters = 8; + repeated FieldBasedFilter fieldBasedFiltersAfterCep = 9; +} + + +message StructuredAlertRequest { + message Aggregation { + string fieldName = 1; + + enum AggregationFunction { + COUNT = 0; + DISTINCT = 1; + SUM = 2; + MIN = 3; + AVG = 4; + FIRST_VALUE = 5; + LAST_VALUE = 6; + VARIANCE_POPULATION = 7; + VARIANCE_SAMPLE = 8; + STANDARD_DEVIATION_SAMPLE = 9; + STANDARD_DEVIATION_POPULATION = 10; + } + + AggregationFunction aggregationFunction = 2; + } + + repeated FieldBasedFilter fieldBasedFilters = 1; + enum AlertWhen { + EQUALS = 0; + NOT_EQUALS = 1; + GREATER_THAN = 2; + GREATER_THAN_EQUALS = 3; + LESS_THAN = 4; + LESS_THAN_EQUALS = 5; + } + AlertWhen alertWhen = 2; + double alertValue = 3; + Aggregation aggregationRequest = 4; + Window window = 5; + Source source = 6; +} + +message AlertActions { + message WebhookAction { + string name = 1; + string url = 2; + enum HttpMethod { + POST = 0; + HEAD = 1; + GET = 2; + PUT = 3; + PATCH = 4; + } + HttpMethod httpMethod = 3; + + message HeaderDetails { + string headerName = 1; + string headerValue = 2; + } + repeated HeaderDetails headerDetails = 4; + + message BasicAuthentication { + string username = 1; + string password = 2; + } + + BasicAuthentication basicAuthentication = 5; + } + + + oneof actionType { + WebhookAction webhookAction = 1; + } +} + + +message AlertRequest { + + AlertDetails details = 1; + + oneof alertQueryType { + StructuredAlertRequest structuredAlertRequest = 2; + CEPRequest cepRequest = 3; + ViewBasedAlertRequest viewBasedAlertRequest = 4; + } + + string alertId = 5; } diff --git a/services/flink-service/flink-service_grpc.pb.go b/services/flink-service/flink-service_grpc.pb.go index e4fd70d..c41d384 100644 --- a/services/flink-service/flink-service_grpc.pb.go +++ b/services/flink-service/flink-service_grpc.pb.go @@ -1,10 +1,10 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.24.0--rc2 +// - protoc v4.25.1 // source: flink-service.proto -package flink_service +package logfire import ( context "context" @@ -19,163 +19,237 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - FlinkService_GetFilteredData_FullMethodName = "/sh.logfire.FlinkService/GetFilteredData" - FlinkService_SubmitSQL_FullMethodName = "/sh.logfire.FlinkService/SubmitSQL" - FlinkService_CreateSource_FullMethodName = "/sh.logfire.FlinkService/CreateSource" + FilterService_GetFilteredData_FullMethodName = "/ai.logfire.FilterService/GetFilteredData" + FilterService_SubmitSQL_FullMethodName = "/ai.logfire.FilterService/SubmitSQL" + FilterService_SubmitAlertRequest_FullMethodName = "/ai.logfire.FilterService/SubmitAlertRequest" + FilterService_DeleteAlertRequest_FullMethodName = "/ai.logfire.FilterService/DeleteAlertRequest" + FilterService_CreateSource_FullMethodName = "/ai.logfire.FilterService/CreateSource" ) -// FlinkServiceClient is the client API for FlinkService service. +// FilterServiceClient is the client API for FilterService 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 FlinkServiceClient interface { +type FilterServiceClient interface { GetFilteredData(ctx context.Context, in *FilterRequest, opts ...grpc.CallOption) (*FilteredRecords, error) SubmitSQL(ctx context.Context, in *SQLRequest, opts ...grpc.CallOption) (*SQLResponse, error) + SubmitAlertRequest(ctx context.Context, in *AlertRequest, opts ...grpc.CallOption) (*RegisteredAlert, error) + DeleteAlertRequest(ctx context.Context, in *RegisteredAlert, opts ...grpc.CallOption) (*Empty, error) CreateSource(ctx context.Context, in *Source, opts ...grpc.CallOption) (*Empty, error) } -type flinkServiceClient struct { +type filterServiceClient struct { cc grpc.ClientConnInterface } -func NewFlinkServiceClient(cc grpc.ClientConnInterface) FlinkServiceClient { - return &flinkServiceClient{cc} +func NewFilterServiceClient(cc grpc.ClientConnInterface) FilterServiceClient { + return &filterServiceClient{cc} } -func (c *flinkServiceClient) GetFilteredData(ctx context.Context, in *FilterRequest, opts ...grpc.CallOption) (*FilteredRecords, error) { +func (c *filterServiceClient) GetFilteredData(ctx context.Context, in *FilterRequest, opts ...grpc.CallOption) (*FilteredRecords, error) { out := new(FilteredRecords) - err := c.cc.Invoke(ctx, FlinkService_GetFilteredData_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, FilterService_GetFilteredData_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *flinkServiceClient) SubmitSQL(ctx context.Context, in *SQLRequest, opts ...grpc.CallOption) (*SQLResponse, error) { +func (c *filterServiceClient) SubmitSQL(ctx context.Context, in *SQLRequest, opts ...grpc.CallOption) (*SQLResponse, error) { out := new(SQLResponse) - err := c.cc.Invoke(ctx, FlinkService_SubmitSQL_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, FilterService_SubmitSQL_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *flinkServiceClient) CreateSource(ctx context.Context, in *Source, opts ...grpc.CallOption) (*Empty, error) { +func (c *filterServiceClient) SubmitAlertRequest(ctx context.Context, in *AlertRequest, opts ...grpc.CallOption) (*RegisteredAlert, error) { + out := new(RegisteredAlert) + err := c.cc.Invoke(ctx, FilterService_SubmitAlertRequest_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filterServiceClient) DeleteAlertRequest(ctx context.Context, in *RegisteredAlert, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) - err := c.cc.Invoke(ctx, FlinkService_CreateSource_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, FilterService_DeleteAlertRequest_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -// FlinkServiceServer is the server API for FlinkService service. -// All implementations must embed UnimplementedFlinkServiceServer +func (c *filterServiceClient) CreateSource(ctx context.Context, in *Source, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, FilterService_CreateSource_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FilterServiceServer is the server API for FilterService service. +// All implementations must embed UnimplementedFilterServiceServer // for forward compatibility -type FlinkServiceServer interface { +type FilterServiceServer interface { GetFilteredData(context.Context, *FilterRequest) (*FilteredRecords, error) SubmitSQL(context.Context, *SQLRequest) (*SQLResponse, error) + SubmitAlertRequest(context.Context, *AlertRequest) (*RegisteredAlert, error) + DeleteAlertRequest(context.Context, *RegisteredAlert) (*Empty, error) CreateSource(context.Context, *Source) (*Empty, error) - mustEmbedUnimplementedFlinkServiceServer() + mustEmbedUnimplementedFilterServiceServer() } -// UnimplementedFlinkServiceServer must be embedded to have forward compatible implementations. -type UnimplementedFlinkServiceServer struct { +// UnimplementedFilterServiceServer must be embedded to have forward compatible implementations. +type UnimplementedFilterServiceServer struct { } -func (UnimplementedFlinkServiceServer) GetFilteredData(context.Context, *FilterRequest) (*FilteredRecords, error) { +func (UnimplementedFilterServiceServer) GetFilteredData(context.Context, *FilterRequest) (*FilteredRecords, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFilteredData not implemented") } -func (UnimplementedFlinkServiceServer) SubmitSQL(context.Context, *SQLRequest) (*SQLResponse, error) { +func (UnimplementedFilterServiceServer) SubmitSQL(context.Context, *SQLRequest) (*SQLResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitSQL not implemented") } -func (UnimplementedFlinkServiceServer) CreateSource(context.Context, *Source) (*Empty, error) { +func (UnimplementedFilterServiceServer) SubmitAlertRequest(context.Context, *AlertRequest) (*RegisteredAlert, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitAlertRequest not implemented") +} +func (UnimplementedFilterServiceServer) DeleteAlertRequest(context.Context, *RegisteredAlert) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAlertRequest not implemented") +} +func (UnimplementedFilterServiceServer) CreateSource(context.Context, *Source) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateSource not implemented") } -func (UnimplementedFlinkServiceServer) mustEmbedUnimplementedFlinkServiceServer() {} +func (UnimplementedFilterServiceServer) mustEmbedUnimplementedFilterServiceServer() {} -// UnsafeFlinkServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to FlinkServiceServer will +// UnsafeFilterServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to FilterServiceServer will // result in compilation errors. -type UnsafeFlinkServiceServer interface { - mustEmbedUnimplementedFlinkServiceServer() +type UnsafeFilterServiceServer interface { + mustEmbedUnimplementedFilterServiceServer() } -func RegisterFlinkServiceServer(s grpc.ServiceRegistrar, srv FlinkServiceServer) { - s.RegisterService(&FlinkService_ServiceDesc, srv) +func RegisterFilterServiceServer(s grpc.ServiceRegistrar, srv FilterServiceServer) { + s.RegisterService(&FilterService_ServiceDesc, srv) } -func _FlinkService_GetFilteredData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _FilterService_GetFilteredData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(FilterRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(FlinkServiceServer).GetFilteredData(ctx, in) + return srv.(FilterServiceServer).GetFilteredData(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: FlinkService_GetFilteredData_FullMethodName, + FullMethod: FilterService_GetFilteredData_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FlinkServiceServer).GetFilteredData(ctx, req.(*FilterRequest)) + return srv.(FilterServiceServer).GetFilteredData(ctx, req.(*FilterRequest)) } return interceptor(ctx, in, info, handler) } -func _FlinkService_SubmitSQL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _FilterService_SubmitSQL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SQLRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(FlinkServiceServer).SubmitSQL(ctx, in) + return srv.(FilterServiceServer).SubmitSQL(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: FlinkService_SubmitSQL_FullMethodName, + FullMethod: FilterService_SubmitSQL_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FlinkServiceServer).SubmitSQL(ctx, req.(*SQLRequest)) + return srv.(FilterServiceServer).SubmitSQL(ctx, req.(*SQLRequest)) } return interceptor(ctx, in, info, handler) } -func _FlinkService_CreateSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _FilterService_SubmitAlertRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AlertRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilterServiceServer).SubmitAlertRequest(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FilterService_SubmitAlertRequest_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilterServiceServer).SubmitAlertRequest(ctx, req.(*AlertRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FilterService_DeleteAlertRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisteredAlert) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilterServiceServer).DeleteAlertRequest(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FilterService_DeleteAlertRequest_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilterServiceServer).DeleteAlertRequest(ctx, req.(*RegisteredAlert)) + } + return interceptor(ctx, in, info, handler) +} + +func _FilterService_CreateSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Source) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(FlinkServiceServer).CreateSource(ctx, in) + return srv.(FilterServiceServer).CreateSource(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: FlinkService_CreateSource_FullMethodName, + FullMethod: FilterService_CreateSource_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FlinkServiceServer).CreateSource(ctx, req.(*Source)) + return srv.(FilterServiceServer).CreateSource(ctx, req.(*Source)) } return interceptor(ctx, in, info, handler) } -// FlinkService_ServiceDesc is the grpc.ServiceDesc for FlinkService service. +// FilterService_ServiceDesc is the grpc.ServiceDesc for FilterService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) -var FlinkService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "sh.logfire.FlinkService", - HandlerType: (*FlinkServiceServer)(nil), +var FilterService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "ai.logfire.FilterService", + HandlerType: (*FilterServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetFilteredData", - Handler: _FlinkService_GetFilteredData_Handler, + Handler: _FilterService_GetFilteredData_Handler, }, { MethodName: "SubmitSQL", - Handler: _FlinkService_SubmitSQL_Handler, + Handler: _FilterService_SubmitSQL_Handler, + }, + { + MethodName: "SubmitAlertRequest", + Handler: _FilterService_SubmitAlertRequest_Handler, + }, + { + MethodName: "DeleteAlertRequest", + Handler: _FilterService_DeleteAlertRequest_Handler, }, { MethodName: "CreateSource", - Handler: _FlinkService_CreateSource_Handler, + Handler: _FilterService_CreateSource_Handler, }, }, Streams: []grpc.StreamDesc{}, From 7f362bb89b1d1d030f0c8ae5bdc233a14fe47cfd Mon Sep 17 00:00:00 2001 From: constient-altrova Date: Thu, 30 Nov 2023 06:54:20 +0000 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'gui/'=20wi?= =?UTF-8?q?th=20remote=20'gui/'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/gui.go | 79 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/gui/gui.go b/gui/gui.go index d1d814d..0fe1506 100644 --- a/gui/gui.go +++ b/gui/gui.go @@ -1,6 +1,7 @@ package gui import ( + "context" "errors" "fmt" "regexp" @@ -41,6 +42,8 @@ type UI struct { StartDateUnParsed string EndDateUnParsed string + + Ctx context.Context } type LivetailStatus struct { @@ -51,8 +54,6 @@ var livetailStatus = &LivetailStatus{ LivetailEnabled: false, } -var stop = make(chan error) - func NewUI(cfg config.Config) *UI { displayInstance := NewDisplay(cfg) @@ -76,20 +77,22 @@ func NewUI(cfg config.Config) *UI { // go checkWaitingForLogs(ui, ui.Livetail) + ui.Ctx = context.Background() + ui.Livetail.CreateConnection() time.Sleep(200 * time.Millisecond) - RunLivetail(ui, livetailStatus, stop) + RunLivetail(ui, livetailStatus) return ui } -func display(u *UI, l *livetail.Livetail, stop chan error) { +func display(u *UI, l *livetail.Livetail) { var numDots int for { select { - case <-stop: + case <-u.Ctx.Done(): return default: u.app.QueueUpdateDraw(func() { @@ -160,8 +163,8 @@ func splitFieldFilterValue(input string) (field, operator, value string) { var sourceNamesList []string var sourceIds []string -func (u *UI) runRootCmd() { - StopLivetail(u, livetailStatus, stop) +func (u *UI) runQuitCmd() { + StopLivetail(u, livetailStatus) u.app.Stop() } @@ -186,36 +189,36 @@ func (u *UI) SetDisplayCapture() { } } - StopLivetail(u, livetailStatus, stop) + StopLivetail(u, livetailStatus) u.SourceFilter = sourceIds time.Sleep(500 * time.Millisecond) - RunLivetail(u, livetailStatus, stop) + RunLivetail(u, livetailStatus) } else if strings.Split(input, "=")[0] == "start-date" { - StopLivetail(u, livetailStatus, stop) + StopLivetail(u, livetailStatus) u.StartDateTimeFilter = filters.ShortDateTimeToGoDate(strings.Split(input, "=")[1]) u.StartDateUnParsed = strings.Split(input, "=")[1] time.Sleep(500 * time.Millisecond) - RunLivetail(u, livetailStatus, stop) + RunLivetail(u, livetailStatus) } else if strings.Split(input, "=")[0] == "end-date" { - StopLivetail(u, livetailStatus, stop) + StopLivetail(u, livetailStatus) u.EndDateTimeFilter = filters.ShortDateTimeToGoDate(strings.Split(input, "=")[1]) u.EndDateUnParsed = strings.Split(input, "=")[1] time.Sleep(500 * time.Millisecond) - RunLivetail(u, livetailStatus, stop) + RunLivetail(u, livetailStatus) } else if strings.Split(input, "=")[0] == "field-filter" { - StopLivetail(u, livetailStatus, stop) + StopLivetail(u, livetailStatus) field, operator, value := splitFieldFilterValue(input) @@ -225,7 +228,7 @@ func (u *UI) SetDisplayCapture() { time.Sleep(500 * time.Millisecond) - RunLivetail(u, livetailStatus, stop) + RunLivetail(u, livetailStatus) } else if strings.Split(input, "=")[0] == "save-view" { name := strings.Split(input, "=")[1] @@ -276,12 +279,12 @@ func (u *UI) SetDisplayCapture() { } if livetailStatus.LivetailEnabled { - StopLivetail(u, livetailStatus, stop) + StopLivetail(u, livetailStatus) time.Sleep(200 * time.Millisecond) } - RunLivetail(u, livetailStatus, stop) + RunLivetail(u, livetailStatus) } } return nil @@ -291,18 +294,18 @@ func (u *UI) SetDisplayCapture() { case true: switch input { case "start": - RunLivetail(u, livetailStatus, stop) + RunLivetail(u, livetailStatus) case "stop": - StopLivetail(u, livetailStatus, stop) + StopLivetail(u, livetailStatus) case "q": - u.runRootCmd() + u.runQuitCmd() case "quit": - u.runRootCmd() + u.runQuitCmd() case "exit": - u.runRootCmd() + u.runQuitCmd() case "1": case "2": - StopLivetail(u, livetailStatus, stop) + StopLivetail(u, livetailStatus) ResetFilters(u) @@ -328,7 +331,7 @@ func (u *UI) SetDisplayCapture() { case "7": u.Display.input.SetText("save-view=") case "9": - u.runRootCmd() + u.runQuitCmd() default: u.Display.BottomHelp.SetPlaceholder(" Invalid command").SetPlaceholderTextColor(tcell.ColorRed) @@ -342,23 +345,23 @@ func (u *UI) SetDisplayCapture() { case false: switch input { case "start": - RunLivetail(u, livetailStatus, stop) + RunLivetail(u, livetailStatus) case "stop": - StopLivetail(u, livetailStatus, stop) + StopLivetail(u, livetailStatus) case "q": - u.runRootCmd() + u.runQuitCmd() case "quit": - u.runRootCmd() + u.runQuitCmd() case "exit": - u.runRootCmd() + u.runQuitCmd() case "1": - StopLivetail(u, livetailStatus, stop) + StopLivetail(u, livetailStatus) ResetFilters(u) time.Sleep(200 * time.Millisecond) - RunLivetail(u, livetailStatus, stop) + RunLivetail(u, livetailStatus) u.Display.Livetail = true u.Display.TopHelp.SetPlaceholder(" Stream > Livetail | 1. livetail 2. view 9.QUIT [q | quit | exit]"). @@ -370,7 +373,7 @@ func (u *UI) SetDisplayCapture() { u.Display.input.SetText("view=") u.Display.input.Autocomplete() case "9": - u.runRootCmd() + u.runQuitCmd() default: u.Display.BottomHelp.SetPlaceholder(" Invalid command").SetPlaceholderTextColor(tcell.ColorRed) @@ -391,7 +394,7 @@ func (u *UI) SetDisplayCapture() { var mu sync.Mutex -func RunLivetail(u *UI, livetailStatus *LivetailStatus, stop chan error) { +func RunLivetail(u *UI, livetailStatus *LivetailStatus) { mu.Lock() defer mu.Unlock() @@ -405,20 +408,20 @@ func RunLivetail(u *UI, livetailStatus *LivetailStatus, stop chan error) { u.Display.View.SetTextAlign(tview.AlignLeft) u.Livetail.ApplyFilter(u.Config, u.SourceFilter, u.StartDateTimeFilter, u.EndDateTimeFilter, u.FieldBasedFilterName, u.FieldBasedFilterValue, u.FieldBasedFilterCondition) - go u.Livetail.GenerateLogs(stop, u.Config) - go display(u, u.Livetail, stop) + go u.Livetail.GenerateLogs(u.Ctx, u.Config) + go display(u, u.Livetail) u.Display.View.ScrollToEnd() } } -func StopLivetail(u *UI, livetailStatus *LivetailStatus, stop chan error) { +func StopLivetail(u *UI, livetailStatus *LivetailStatus) { mu.Lock() defer mu.Unlock() if livetailStatus.LivetailEnabled { livetailStatus.LivetailEnabled = false - stop <- errors.New("stop") - stop <- errors.New("stop") + _, cancel := context.WithCancel(u.Ctx) + defer cancel() } } From 702104ec11f91a7327014b417c026bfe8fa39bc6 Mon Sep 17 00:00:00 2001 From: constient-altrova Date: Thu, 30 Nov 2023 06:54:20 +0000 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'pkg/'=20wi?= =?UTF-8?q?th=20remote=20'pkg/'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/cmd/login/login.go | 24 +++++++++++ pkg/cmd/roundtrip/roundtrip.go | 33 +++++++++++++-- pkg/cmd/sql/sql.go | 10 +++-- pkg/cmd/stream/livetail/livetail.go | 3 +- pkg/cmd/stream/view/view.go | 34 ++------------- pkg/cmdutil/APICalls/source_api_calls.go | 2 +- pkg/cmdutil/grpcutil/grpc.go | 53 +++++------------------- pkg/cmdutil/grpcutil/roundtrip_grpc.go | 5 ++- 8 files changed, 82 insertions(+), 82 deletions(-) diff --git a/pkg/cmd/login/login.go b/pkg/cmd/login/login.go index 84600bb..1c44e16 100644 --- a/pkg/cmd/login/login.go +++ b/pkg/cmd/login/login.go @@ -36,6 +36,7 @@ type LoginOptions struct { Password string Token string Staging bool + Local bool } func NewLoginCmd(f *cmdutil.Factory) *cobra.Command { @@ -83,6 +84,7 @@ func NewLoginCmd(f *cmdutil.Factory) *cobra.Command { cmd.Flags().StringVarP(&opts.Password, "password", "p", "", "Password of the user.") cmd.Flags().StringVarP(&opts.Token, "token", "t", "", "Single Sign in token of the user.") cmd.Flags().BoolVarP(&opts.Staging, "staging", "s", false, "Use staging server?") + cmd.Flags().BoolVarP(&opts.Local, "local", "l", false, "Use local server?") return cmd } @@ -106,6 +108,18 @@ func loginRun(opts *LoginOptions) { } } + if opts.Local { + endpoint := "http://localhost:8888/" + grpc_endpoint := "localhost:8888" + grpc_ingestion := "http://localhost:8888/logfire.sh" + + err = cfg.UpdateConfig(nil, nil, nil, nil, + nil, nil, &endpoint, &grpc_endpoint, &grpc_ingestion, nil) + if err != nil { + return + } + } + var choiceList = []string{"Magic link", "Password"} if opts.Interactive && opts.Token == "" && opts.Email == "" && opts.Password == "" { @@ -284,6 +298,12 @@ func PasswordSignin(io *iostreams.IOStreams, cfg config.Config, cs *iostreams.Co return err } fmt.Fprintf(io.Out, "\n%s Logged in as %s\n", cs.SuccessIcon(), cs.Bold(response.UserBody.Email)) + + + if !response.UserBody.Onboarded { + fmt.Fprintf(io.Out, "\n%s Looks like your onboarding isn't done yet. Complete it now with `logfire bootstrap` for the full experience! \n \n", cs.WarningIcon()) + } + return nil } @@ -353,5 +373,9 @@ func TokenSignin(IO *iostreams.IOStreams, cfg config.Config, cs *iostreams.Color fmt.Fprintf(IO.Out, "%s Logged in as %s\n", cs.SuccessIcon(), cs.Bold(response.Email)) + if !response.UserBody.Onboarded { + fmt.Fprintf(IO.Out, "\n%s Looks like your onboarding isn't done yet. Complete it now with `logfire bootstrap` for the full experience! \n", cs.WarningIcon()) + } + return nil } diff --git a/pkg/cmd/roundtrip/roundtrip.go b/pkg/cmd/roundtrip/roundtrip.go index 1c9e677..e890ffe 100644 --- a/pkg/cmd/roundtrip/roundtrip.go +++ b/pkg/cmd/roundtrip/roundtrip.go @@ -113,6 +113,18 @@ func PromptRoundTripRun(opts *PromptRoundTripOptions) { id := uuid.New() + istLocation, err := time.LoadLocation("Asia/Kolkata") + if err != nil { + fmt.Println("Error loading IST location:", err) + return + } + + // Get the current time in the IST time zone + currentTime := time.Now().In(istLocation) + + // Format and print the time + formattedTime := currentTime.Format("2006-01-02 15:04:05") + cmd := exec.Command("curl", "--location", cfg.Get().GrpcIngestion, @@ -125,7 +137,7 @@ func PromptRoundTripRun(opts *PromptRoundTripOptions) { "--header", fmt.Sprintf("Github-Run: %v", opts.Run), "--data", - fmt.Sprintf("[{\"dt\":\"2023-06-15T6:00:39.351Z\",\"message\":\"%s\"}]", id), + fmt.Sprintf("[{\"dt\":\"%s\",\"message\":\"%s\"}]",formattedTime, id), ) go grpcutil.WaitForLog(cfg, id, opts.TeamId, opts.SourceId, stop) @@ -223,18 +235,31 @@ func PromptRoundTripRun(opts *PromptRoundTripOptions) { id := uuid.New() + istLocation, err := time.LoadLocation("Asia/Kolkata") + if err != nil { + fmt.Println("Error loading IST location:", err) + return + } + + // Get the current time in the IST time zone + currentTime := time.Now().In(istLocation) + + // Format and print the time + formattedTime := currentTime.Format("2006-01-02 15:04:05") + cmd := exec.Command("curl", "--location", cfg.Get().GrpcIngestion, "--header", "Content-Type: application/json", "--header", - fmt.Sprintf("Authorization: Bearer %s", sourceToken), - "--header", "Diagnostic: True", + "--header", + fmt.Sprintf("Authorization: Bearer %s", sourceToken), "--data", - fmt.Sprintf("[{\"dt\":\"2023-06-15T6:00:39.351Z\",\"message\":\"%s\"}]", id), + fmt.Sprintf("[{\"dt\":\"%s\",\"message\":\"%s\"}]", formattedTime, id), ) + if err != nil { log.Fatal(err) } diff --git a/pkg/cmd/sql/sql.go b/pkg/cmd/sql/sql.go index 8abb92c..06affd4 100644 --- a/pkg/cmd/sql/sql.go +++ b/pkg/cmd/sql/sql.go @@ -4,12 +4,13 @@ import ( "context" "encoding/json" "fmt" - "github.com/logfire-sh/cli/pkg/cmdutil/grpcutil" "log" "net/http" "os" "regexp" + "github.com/logfire-sh/cli/pkg/cmdutil/grpcutil" + "github.com/MakeNowJust/heredoc" "github.com/logfire-sh/cli/internal/config" "github.com/logfire-sh/cli/internal/prompter" @@ -75,7 +76,10 @@ func NewCmdSql(f *cmdutil.Factory) *cobra.Command { func GetRecommendations(opts *SQLQueryOptions, cfg config.Config) { opts.IO.StartProgressIndicatorWithLabel("Getting recommendations, please wait...") - recommendations, _ := APICalls.GetRecommendations(cfg.Get().Token, cfg.Get().EndPoint, opts.TeamId, cfg.Get().Role) + recommendations, err := APICalls.GetRecommendations(cfg.Get().Token, cfg.Get().EndPoint, opts.TeamId, cfg.Get().Role) + if err != nil { + fmt.Fprintf(opts.IO.ErrOut, "%s",err) + } var options []string @@ -230,7 +234,7 @@ func createGrpcSource(sources []sourceModels.Source) []*pb.Source { } // getSQL makes the actual grpc call to connect with flink-service. -func getSQL(client pb.FlinkServiceClient, sources []*pb.Source, opts *SQLQueryOptions) (*pb.SQLResponse, error) { +func getSQL(client pb.FilterServiceClient, sources []*pb.Source, opts *SQLQueryOptions) (*pb.SQLResponse, error) { // Prepare the request payload request := &pb.SQLRequest{ Sql: opts.SQLQuery, diff --git a/pkg/cmd/stream/livetail/livetail.go b/pkg/cmd/stream/livetail/livetail.go index ef11d1e..5b9f488 100644 --- a/pkg/cmd/stream/livetail/livetail.go +++ b/pkg/cmd/stream/livetail/livetail.go @@ -97,7 +97,7 @@ func livetailRun(opts *LivetailOptions) { FieldBasedFilters: []*pb.FieldBasedFilter{}, SearchQueries: []string{}, Sources: []*pb.Source{}, - BatchSize: 100, + BatchSize: 15, IsScrollDown: true, } @@ -235,6 +235,7 @@ func livetailRun(opts *LivetailOptions) { for { response, err := filterService.Client.GetFilteredData(context.Background(), request) if err != nil { + //log.Fatal(err) continue } diff --git a/pkg/cmd/stream/view/view.go b/pkg/cmd/stream/view/view.go index 38887de..f500016 100644 --- a/pkg/cmd/stream/view/view.go +++ b/pkg/cmd/stream/view/view.go @@ -10,7 +10,6 @@ import ( "time" "github.com/logfire-sh/cli/pkg/cmdutil/grpcutil" - "google.golang.org/protobuf/types/known/timestamppb" "github.com/MakeNowJust/heredoc" "github.com/logfire-sh/cli/internal/config" @@ -82,7 +81,7 @@ func ViewStreamRun(opts *ViewStreamOptions) { FieldBasedFilters: []*pb.FieldBasedFilter{}, SearchQueries: []string{}, Sources: []*pb.Source{}, - BatchSize: 100, + BatchSize: 15, IsScrollDown: true, } @@ -109,37 +108,12 @@ func ViewStreamRun(opts *ViewStreamOptions) { return } - if !view.DateFilter.StartDate.IsZero() { - request.DateTimeFilter.StartTimeStamp = timestamppb.New(view.DateFilter.StartDate) - - if !view.DateFilter.EndDate.IsZero() { - request.DateTimeFilter.EndTimeStamp = timestamppb.New(view.DateFilter.EndDate) - } - } - - if len(view.SearchFilter) != 0 { - for _, v := range view.SearchFilter { - if v.Key != "" { - if v.Condition != "" { - if v.Value != "" { - request.FieldBasedFilters = append(request.FieldBasedFilters, &pb.FieldBasedFilter{ - FieldName: v.Key, - FieldValue: v.Value, - Operator: pb.FieldBasedFilter_Operator(pb.FieldBasedFilter_Operator_value[v.Condition]), - }) - } - } - } - } - } - - if len(view.TextFilter) != 0 { - request.SearchQueries = append(request.SearchQueries, view.TextFilter...) - } - pbSources := grpcutil.CreateGrpcSource(view.SourcesFilter) var sourcesOffset = make(map[string]uint64) + request.Sources = pbSources + request.ViewID = view.Id + filterService := grpcutil.NewFilterService() defer filterService.CloseConnection() diff --git a/pkg/cmdutil/APICalls/source_api_calls.go b/pkg/cmdutil/APICalls/source_api_calls.go index 05c481a..e5de3f0 100644 --- a/pkg/cmdutil/APICalls/source_api_calls.go +++ b/pkg/cmdutil/APICalls/source_api_calls.go @@ -223,7 +223,7 @@ func CreateSource(token, endpoint string, teamId, sourceName, platform string) ( defer conn.Close() // Create a gRPC client - grpcClient := pb.NewFlinkServiceClient(conn) + grpcClient := pb.NewFilterServiceClient(conn) grpcClient.CreateSource(context.Background(), pbSource) diff --git a/pkg/cmdutil/grpcutil/grpc.go b/pkg/cmdutil/grpcutil/grpc.go index e8c4d6f..7275a09 100644 --- a/pkg/cmdutil/grpcutil/grpc.go +++ b/pkg/cmdutil/grpcutil/grpc.go @@ -2,18 +2,22 @@ package grpcutil import ( "context" + "github.com/logfire-sh/cli/internal/config" "github.com/logfire-sh/cli/pkg/cmd/sources/models" pb "github.com/logfire-sh/cli/services/flink-service" "google.golang.org/grpc" + + //"google.golang.org/grpc/credentials" + "log" + "google.golang.org/grpc/credentials" "google.golang.org/grpc/metadata" - "log" ) type FilterService struct { conn *grpc.ClientConn - Client pb.FlinkServiceClient + Client pb.FilterServiceClient } func authUnaryInterceptor(kv ...string) func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { @@ -34,20 +38,19 @@ func (fs *FilterService) CloseConnection() { func NewFilterService(kv ...string) *FilterService { cfg, _ := config.NewConfig() grpc_url := cfg.Get().GrpcEndpoint - //grpc_url := "localhost:50051" allParams := make([]string, 0, len(kv)+2) allParams = append(allParams, "Authorization", "Bearer "+cfg.Get().Token) - for _, arg := range kv { - allParams = append(allParams, arg) - } + allParams = append(allParams, kv...) + conn, err := grpc.Dial(grpc_url, grpc.WithTransportCredentials(credentials.NewClientTLSFromCert(nil, "")), grpc.WithUnaryInterceptor(authUnaryInterceptor(allParams...)), grpc.WithUserAgent("Logfire-cli")) - //conn, err := grpc.Dial(grpc_url, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithUnaryInterceptor(authUnaryInterceptor(allParams...)), grpc.WithUserAgent("Logfire-cli")) + // conn, err := grpc.Dial(grpc_url, grpc.WithInsecure(), grpc.WithUnaryInterceptor(authUnaryInterceptor(allParams...)), grpc.WithUserAgent("Logfire-cli")) + if err != nil { log.Fatalf("Failed to dial server: %v", err) } // Create a gRPC client - client := pb.NewFlinkServiceClient(conn) + client := pb.NewFilterServiceClient(conn) return &FilterService{ conn: conn, @@ -85,40 +88,6 @@ func AddOffset(sources []*pb.Source, offset map[string]uint64) []*pb.Source { return sources } -func CreateSource(request *pb.Source) { - cfg, _ := config.NewConfig() - grpc_url := cfg.Get().GrpcEndpoint - conn, err := grpc.Dial(grpc_url, grpc.WithTransportCredentials(credentials.NewClientTLSFromCert(nil, ""))) - if err != nil { - log.Fatalf("Failed to dial server: %v", err) - } - defer conn.Close() - - // Create a gRPC client - client := pb.NewFlinkServiceClient(conn) - - _, err = client.CreateSource(context.Background(), request) - if err != nil { - return - } - if err != nil { - return - } -} - -// GetFilteredData makes the actual grpc call to connect with flink-service. -func GetFilteredData(client pb.FlinkServiceClient, request *pb.FilterRequest) (*pb.FilteredRecords, error) { - // Prepare the request payload - - // Invoke the gRPC method - response, err := client.GetFilteredData(context.Background(), request) - if err != nil { - return nil, err - } - - return response, nil -} - func GetOffsets(offsets map[string]uint64, records []*pb.FilteredRecord) map[string]uint64 { for _, record := range records { if offsets[record.SourceName] == 0 || record.Offset >= offsets[record.SourceName] { diff --git a/pkg/cmdutil/grpcutil/roundtrip_grpc.go b/pkg/cmdutil/grpcutil/roundtrip_grpc.go index ae432d5..62ea044 100644 --- a/pkg/cmdutil/grpcutil/roundtrip_grpc.go +++ b/pkg/cmdutil/grpcutil/roundtrip_grpc.go @@ -2,6 +2,7 @@ package grpcutil import ( "context" + "log" "time" "github.com/google/uuid" @@ -47,7 +48,9 @@ func WaitForLog(cfg config.Config, id uuid.UUID, teamId string, sourceId string, response, err := filterService.Client.GetFilteredData(context.Background(), request) if err != nil { - continue + log.Printf("Request: %v", request) + log.Printf("Error %v", err) + return } if len(response.Records) > 0 { From 407c44b872c94fef3f32fd41d99da76121e893a3 Mon Sep 17 00:00:00 2001 From: constient-altrova Date: Thu, 30 Nov 2023 06:54:20 +0000 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'go.mod'=20?= =?UTF-8?q?with=20remote=20'go.mod'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go.mod b/go.mod index f823db3..1b01a6e 100644 --- a/go.mod +++ b/go.mod @@ -40,6 +40,7 @@ require ( github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/aymerick/douceur v0.2.0 // indirect github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dlclark/regexp2 v1.4.0 // indirect github.com/fatih/color v1.13.0 // indirect @@ -61,6 +62,7 @@ require ( github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rivo/uniseg v0.4.3 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sahilm/fuzzy v0.1.0 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cast v1.5.1 // indirect From 83d1d512244e5ff171c0b053acbae701a2ef6626 Mon Sep 17 00:00:00 2001 From: constient-altrova Date: Thu, 30 Nov 2023 06:54:20 +0000 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'go.sum'=20?= =?UTF-8?q?with=20remote=20'go.sum'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.sum | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go.sum b/go.sum index 6120e77..5389c14 100644 --- a/go.sum +++ b/go.sum @@ -75,6 +75,7 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= +github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.17 h1:QeVUsEDNrLBW4tMgZHvxy18sKtr6VI492kBhUfhDJNI= github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= @@ -249,6 +250,7 @@ github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sahilm/fuzzy v0.1.0 h1:FzWGaw2Opqyu+794ZQ9SYifWv2EIXpwP4q8dY1kDAwI= github.com/sahilm/fuzzy v0.1.0/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y=