From 8c3e00626916d0886afac78a6338a93bee0691c9 Mon Sep 17 00:00:00 2001 From: Assaf Admi Date: Thu, 10 Oct 2024 12:57:52 +0300 Subject: [PATCH] Rule group set to use SDK (#170) --- .../v1alpha1/recordingrulegroupset_types.go | 22 +- .../recordingrulegroupset_controller.go | 21 +- .../recordingrulegroupset_controller_test.go | 20 +- controllers/clientset/clientset.go | 4 +- .../recording-rules-groups/v2/groups.pb.go | 1326 ----------------- .../v2/groups_grpc.pb.go | 452 ------ .../recording-rules-groups-client.go | 90 +- .../mock_recordingrulesgroups-client.go | 58 +- go.mod | 2 +- go.sum | 4 + 10 files changed, 77 insertions(+), 1922 deletions(-) delete mode 100644 controllers/clientset/grpc/recording-rules-groups/v2/groups.pb.go delete mode 100644 controllers/clientset/grpc/recording-rules-groups/v2/groups_grpc.pb.go diff --git a/apis/coralogix/v1alpha1/recordingrulegroupset_types.go b/apis/coralogix/v1alpha1/recordingrulegroupset_types.go index dce7a6a..e6f7713 100644 --- a/apis/coralogix/v1alpha1/recordingrulegroupset_types.go +++ b/apis/coralogix/v1alpha1/recordingrulegroupset_types.go @@ -20,9 +20,11 @@ import ( "fmt" "reflect" - utils "github.com/coralogix/coralogix-operator/apis" - rrg "github.com/coralogix/coralogix-operator/controllers/clientset/grpc/recording-rules-groups/v2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + cxsdk "github.com/coralogix/coralogix-management-sdk/go" + + utils "github.com/coralogix/coralogix-operator/apis" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! @@ -56,8 +58,8 @@ func (in *RecordingRuleGroupSetSpec) DeepEqual(status RecordingRuleGroupSetStatu return true, utils.Diff{} } -func (in *RecordingRuleGroupSetSpec) ExtractRecordingRuleGroups() []*rrg.InRuleGroup { - result := make([]*rrg.InRuleGroup, 0, len(in.Groups)) +func (in *RecordingRuleGroupSetSpec) ExtractRecordingRuleGroups() []*cxsdk.InRuleGroup { + result := make([]*cxsdk.InRuleGroup, 0, len(in.Groups)) for _, ruleGroup := range in.Groups { rg := expandRecordingRuleGroup(ruleGroup) result = append(result, rg) @@ -65,7 +67,7 @@ func (in *RecordingRuleGroupSetSpec) ExtractRecordingRuleGroups() []*rrg.InRuleG return result } -func expandRecordingRuleGroup(group RecordingRuleGroup) *rrg.InRuleGroup { +func expandRecordingRuleGroup(group RecordingRuleGroup) *cxsdk.InRuleGroup { interval := new(uint32) *interval = uint32(group.IntervalSeconds) @@ -74,7 +76,7 @@ func expandRecordingRuleGroup(group RecordingRuleGroup) *rrg.InRuleGroup { rules := expandRecordingRules(group.Rules) - return &rrg.InRuleGroup{ + return &cxsdk.InRuleGroup{ Name: group.Name, Interval: interval, Limit: limit, @@ -82,8 +84,8 @@ func expandRecordingRuleGroup(group RecordingRuleGroup) *rrg.InRuleGroup { } } -func expandRecordingRules(rules []RecordingRule) []*rrg.InRule { - result := make([]*rrg.InRule, 0, len(rules)) +func expandRecordingRules(rules []RecordingRule) []*cxsdk.InRule { + result := make([]*cxsdk.InRule, 0, len(rules)) for _, r := range rules { rule := extractRecordingRule(r) result = append(result, rule) @@ -91,8 +93,8 @@ func expandRecordingRules(rules []RecordingRule) []*rrg.InRule { return result } -func extractRecordingRule(rule RecordingRule) *rrg.InRule { - return &rrg.InRule{ +func extractRecordingRule(rule RecordingRule) *cxsdk.InRule { + return &cxsdk.InRule{ Record: rule.Record, Expr: rule.Expr, Labels: rule.Labels, diff --git a/controllers/alphacontrollers/recordingrulegroupset_controller.go b/controllers/alphacontrollers/recordingrulegroupset_controller.go index dffe78b..80cf802 100644 --- a/controllers/alphacontrollers/recordingrulegroupset_controller.go +++ b/controllers/alphacontrollers/recordingrulegroupset_controller.go @@ -20,20 +20,20 @@ import ( "context" "fmt" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/log" + cxsdk "github.com/coralogix/coralogix-management-sdk/go" + coralogixv1alpha1 "github.com/coralogix/coralogix-operator/apis/coralogix/v1alpha1" "github.com/coralogix/coralogix-operator/controllers/clientset" - rrg "github.com/coralogix/coralogix-operator/controllers/clientset/grpc/recording-rules-groups/v2" - - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "k8s.io/apimachinery/pkg/api/errors" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" ) var recordingRuleGroupSetFinalizerName = "recordingrulegroupset.coralogix.com/finalizer" @@ -97,7 +97,7 @@ func (r *RecordingRuleGroupSetReconciler) Reconcile(ctx context.Context, req ctr func (r *RecordingRuleGroupSetReconciler) create(ctx context.Context, recordingRuleGroupSet *coralogixv1alpha1.RecordingRuleGroupSet) error { response, err := r.CoralogixClientSet. RecordingRuleGroups(). - CreateRecordingRuleGroupSet(ctx, &rrg.CreateRuleGroupSet{ + Create(ctx, &cxsdk.CreateRuleGroupSetRequest{ Name: ptr.To(fmt.Sprintf("%s%s", recordingRuleGroupSet.Name, r.RecordingRuleGroupSetSuffix)), Groups: recordingRuleGroupSet.Spec.ExtractRecordingRuleGroups(), }) @@ -124,7 +124,7 @@ func (r *RecordingRuleGroupSetReconciler) create(ctx context.Context, recordingR } func (r *RecordingRuleGroupSetReconciler) update(ctx context.Context, recordingRuleGroupSet *coralogixv1alpha1.RecordingRuleGroupSet) error { - remoteRecordingRule, err := r.CoralogixClientSet.RecordingRuleGroups().GetRecordingRuleGroupSet(ctx, &rrg.FetchRuleGroupSet{ + remoteRecordingRule, err := r.CoralogixClientSet.RecordingRuleGroups().Get(ctx, &cxsdk.GetRuleGroupSetRequest{ Id: *recordingRuleGroupSet.Status.ID, }) @@ -141,10 +141,9 @@ func (r *RecordingRuleGroupSetReconciler) update(ctx context.Context, recordingR if _, err := r.CoralogixClientSet. RecordingRuleGroups(). - UpdateRecordingRuleGroupSet(ctx, &rrg.UpdateRuleGroupSet{ + Update(ctx, &cxsdk.UpdateRuleGroupSetRequest{ Id: remoteRecordingRule.Id, Groups: recordingRuleGroupSet.Spec.ExtractRecordingRuleGroups(), - Name: ptr.To(fmt.Sprintf("%s%s", recordingRuleGroupSet.Name, r.RecordingRuleGroupSetSuffix)), }); err != nil { return fmt.Errorf("failed to update recording rule groupSet: %w", err) } @@ -153,7 +152,7 @@ func (r *RecordingRuleGroupSetReconciler) update(ctx context.Context, recordingR } func (r *RecordingRuleGroupSetReconciler) delete(ctx context.Context, recordingRuleGroupSet *coralogixv1alpha1.RecordingRuleGroupSet) error { - _, err := r.CoralogixClientSet.RecordingRuleGroups().DeleteRecordingRuleGroupSet(ctx, &rrg.DeleteRuleGroupSet{ + _, err := r.CoralogixClientSet.RecordingRuleGroups().Delete(ctx, &cxsdk.DeleteRuleGroupSetRequest{ Id: *recordingRuleGroupSet.Status.ID, }) diff --git a/controllers/alphacontrollers/recordingrulegroupset_controller_test.go b/controllers/alphacontrollers/recordingrulegroupset_controller_test.go index 77fcd61..736ad20 100644 --- a/controllers/alphacontrollers/recordingrulegroupset_controller_test.go +++ b/controllers/alphacontrollers/recordingrulegroupset_controller_test.go @@ -4,9 +4,6 @@ import ( "context" "testing" - coralogixv1alpha1 "github.com/coralogix/coralogix-operator/apis/coralogix/v1alpha1" - rrg "github.com/coralogix/coralogix-operator/controllers/clientset/grpc/recording-rules-groups/v2" - "github.com/coralogix/coralogix-operator/controllers/mock_clientset" "github.com/stretchr/testify/assert" "go.uber.org/mock/gomock" "google.golang.org/protobuf/types/known/emptypb" @@ -19,6 +16,11 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/log/zap" + + cxsdk "github.com/coralogix/coralogix-management-sdk/go" + + coralogixv1alpha1 "github.com/coralogix/coralogix-operator/apis/coralogix/v1alpha1" + "github.com/coralogix/coralogix-operator/controllers/mock_clientset" ) func setupRecordingRuleReconciler(t *testing.T, ctx context.Context, clientSet *mock_clientset.MockClientSetInterface) (RecordingRuleGroupSetReconciler, watch.Interface) { @@ -68,7 +70,7 @@ func TestRecordingRuleCreation(t *testing.T) { name: "Recording rule creation success", shouldFail: false, params: func(params PrepareRecordingRulesParams) { - params.recordingRuleClient.EXPECT().CreateRecordingRuleGroupSet(params.ctx, gomock.Any()).Return(&rrg.CreateRuleGroupSetResult{Id: "id1"}, nil) + params.recordingRuleClient.EXPECT().Create(params.ctx, gomock.Any()).Return(&cxsdk.CreateRuleGroupSetResponse{Id: "id1"}, nil) }, recordingRule: coralogixv1alpha1.RecordingRuleGroupSet{ ObjectMeta: metav1.ObjectMeta{ @@ -150,15 +152,15 @@ func TestRecordingRuleUpdate(t *testing.T) { name: "Recording rule update success", shouldFail: false, params: func(params PrepareRecordingRulesParams) { - params.recordingRuleClient.EXPECT().CreateRecordingRuleGroupSet(params.ctx, gomock.Any()).Return(&rrg.CreateRuleGroupSetResult{Id: "id1"}, nil) - params.recordingRuleClient.EXPECT().GetRecordingRuleGroupSet(params.ctx, gomock.Any()).Return(&rrg.OutRuleGroupSet{ + params.recordingRuleClient.EXPECT().Create(params.ctx, gomock.Any()).Return(&cxsdk.CreateRuleGroupSetResponse{Id: "id1"}, nil) + params.recordingRuleClient.EXPECT().Get(params.ctx, gomock.Any()).Return(&cxsdk.GetRuleGroupSetResponse{ Id: "id1", - Groups: []*rrg.OutRuleGroup{ + Groups: []*cxsdk.OutRuleGroup{ { Name: "name", Interval: pointer.Uint32(60), Limit: pointer.Uint64(100), - Rules: []*rrg.OutRule{ + Rules: []*cxsdk.OutRule{ { Record: "record", Expr: "vector(1)", @@ -168,7 +170,7 @@ func TestRecordingRuleUpdate(t *testing.T) { }, }, }, nil) - params.recordingRuleClient.EXPECT().UpdateRecordingRuleGroupSet(params.ctx, gomock.Any()).Return(&emptypb.Empty{}, nil) + params.recordingRuleClient.EXPECT().Update(params.ctx, gomock.Any()).Return(&emptypb.Empty{}, nil) }, recordingRule: coralogixv1alpha1.RecordingRuleGroupSet{ ObjectMeta: metav1.ObjectMeta{ diff --git a/controllers/clientset/clientset.go b/controllers/clientset/clientset.go index bb85534..bcf9661 100644 --- a/controllers/clientset/clientset.go +++ b/controllers/clientset/clientset.go @@ -13,7 +13,7 @@ type ClientSetInterface interface { type ClientSet struct { ruleGroups *cxsdk.RuleGroupsClient alerts *AlertsClient - recordingRuleGroups *RecordingRulesGroupsClient + recordingRuleGroups *cxsdk.RecordingRuleGroupSetsClient outboundWebhooks *cxsdk.WebhooksClient } @@ -40,7 +40,7 @@ func NewClientSet(targetUrl, apiKey string) ClientSetInterface { return &ClientSet{ ruleGroups: cxsdk.NewRuleGroupsClient(SDKAPIKeyCPC), alerts: NewAlertsClient(apikeyCPC), - recordingRuleGroups: NewRecordingRuleGroupsClient(apikeyCPC), + recordingRuleGroups: cxsdk.NewRecordingRuleGroupSetsClient(SDKAPIKeyCPC), outboundWebhooks: cxsdk.NewWebhooksClient(SDKAPIKeyCPC), } } diff --git a/controllers/clientset/grpc/recording-rules-groups/v2/groups.pb.go b/controllers/clientset/grpc/recording-rules-groups/v2/groups.pb.go deleted file mode 100644 index dd59e75..0000000 --- a/controllers/clientset/grpc/recording-rules-groups/v2/groups.pb.go +++ /dev/null @@ -1,1326 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v5.27.1 -// source: proto/groups.proto - -package __ - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// * -// A group of recording rules. Rules within a group are run sequentially at a regular interval, -// with the same evaluation time. -type InRuleGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the group. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // How often rules in the group are evaluated. - Interval *uint32 `protobuf:"varint,2,opt,name=interval,proto3,oneof" json:"interval,omitempty"` // optional, default = 60 secs - // Limits the number of series a rule can produce. - Limit *uint64 `protobuf:"varint,3,opt,name=limit,proto3,oneof" json:"limit,omitempty"` // optional, 0 is no limit, default = 0 - // Rules of the group. - Rules []*InRule `protobuf:"bytes,4,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *InRuleGroup) Reset() { - *x = InRuleGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_groups_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InRuleGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InRuleGroup) ProtoMessage() {} - -func (x *InRuleGroup) ProtoReflect() protoreflect.Message { - mi := &file_proto_groups_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InRuleGroup.ProtoReflect.Descriptor instead. -func (*InRuleGroup) Descriptor() ([]byte, []int) { - return file_proto_groups_proto_rawDescGZIP(), []int{0} -} - -func (x *InRuleGroup) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *InRuleGroup) GetInterval() uint32 { - if x != nil && x.Interval != nil { - return *x.Interval - } - return 0 -} - -func (x *InRuleGroup) GetLimit() uint64 { - if x != nil && x.Limit != nil { - return *x.Limit - } - return 0 -} - -func (x *InRuleGroup) GetRules() []*InRule { - if x != nil { - return x.Rules - } - return nil -} - -type InRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the time series to output to. Must be a valid metric name. - Record string `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` - //* - // The PromQL expression to evaluate. Every evaluation cycle this is - // evaluated at the current time, and the result recorded as a new set of - // time series with the metric name as given by 'record'. - Expr string `protobuf:"bytes,2,opt,name=expr,proto3" json:"expr,omitempty"` - // Labels to add or overwrite before storing the result. - Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *InRule) Reset() { - *x = InRule{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_groups_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InRule) ProtoMessage() {} - -func (x *InRule) ProtoReflect() protoreflect.Message { - mi := &file_proto_groups_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InRule.ProtoReflect.Descriptor instead. -func (*InRule) Descriptor() ([]byte, []int) { - return file_proto_groups_proto_rawDescGZIP(), []int{1} -} - -func (x *InRule) GetRecord() string { - if x != nil { - return x.Record - } - return "" -} - -func (x *InRule) GetExpr() string { - if x != nil { - return x.Expr - } - return "" -} - -func (x *InRule) GetLabels() map[string]string { - if x != nil { - return x.Labels - } - return nil -} - -type OutRuleGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Interval *uint32 `protobuf:"varint,2,opt,name=interval,proto3,oneof" json:"interval,omitempty"` - Limit *uint64 `protobuf:"varint,3,opt,name=limit,proto3,oneof" json:"limit,omitempty"` - Rules []*OutRule `protobuf:"bytes,4,rep,name=rules,proto3" json:"rules,omitempty"` - LastEvalAt *uint64 `protobuf:"varint,5,opt,name=last_eval_at,json=lastEvalAt,proto3,oneof" json:"last_eval_at,omitempty"` -} - -func (x *OutRuleGroup) Reset() { - *x = OutRuleGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_groups_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OutRuleGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OutRuleGroup) ProtoMessage() {} - -func (x *OutRuleGroup) ProtoReflect() protoreflect.Message { - mi := &file_proto_groups_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OutRuleGroup.ProtoReflect.Descriptor instead. -func (*OutRuleGroup) Descriptor() ([]byte, []int) { - return file_proto_groups_proto_rawDescGZIP(), []int{2} -} - -func (x *OutRuleGroup) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *OutRuleGroup) GetInterval() uint32 { - if x != nil && x.Interval != nil { - return *x.Interval - } - return 0 -} - -func (x *OutRuleGroup) GetLimit() uint64 { - if x != nil && x.Limit != nil { - return *x.Limit - } - return 0 -} - -func (x *OutRuleGroup) GetRules() []*OutRule { - if x != nil { - return x.Rules - } - return nil -} - -func (x *OutRuleGroup) GetLastEvalAt() uint64 { - if x != nil && x.LastEvalAt != nil { - return *x.LastEvalAt - } - return 0 -} - -type OutRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Record string `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` - Expr string `protobuf:"bytes,2,opt,name=expr,proto3" json:"expr,omitempty"` - Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - LastEvalDurationMs *uint64 `protobuf:"varint,4,opt,name=last_eval_duration_ms,json=lastEvalDurationMs,proto3,oneof" json:"last_eval_duration_ms,omitempty"` -} - -func (x *OutRule) Reset() { - *x = OutRule{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_groups_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OutRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OutRule) ProtoMessage() {} - -func (x *OutRule) ProtoReflect() protoreflect.Message { - mi := &file_proto_groups_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OutRule.ProtoReflect.Descriptor instead. -func (*OutRule) Descriptor() ([]byte, []int) { - return file_proto_groups_proto_rawDescGZIP(), []int{3} -} - -func (x *OutRule) GetRecord() string { - if x != nil { - return x.Record - } - return "" -} - -func (x *OutRule) GetExpr() string { - if x != nil { - return x.Expr - } - return "" -} - -func (x *OutRule) GetLabels() map[string]string { - if x != nil { - return x.Labels - } - return nil -} - -func (x *OutRule) GetLastEvalDurationMs() uint64 { - if x != nil && x.LastEvalDurationMs != nil { - return *x.LastEvalDurationMs - } - return 0 -} - -// * A matcher specifying a group to delete. -type DeleteRuleGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the group. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *DeleteRuleGroup) Reset() { - *x = DeleteRuleGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_groups_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteRuleGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteRuleGroup) ProtoMessage() {} - -func (x *DeleteRuleGroup) ProtoReflect() protoreflect.Message { - mi := &file_proto_groups_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 DeleteRuleGroup.ProtoReflect.Descriptor instead. -func (*DeleteRuleGroup) Descriptor() ([]byte, []int) { - return file_proto_groups_proto_rawDescGZIP(), []int{4} -} - -func (x *DeleteRuleGroup) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// * A listing of rule groups. -type RuleGroupListing struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of groups. - RuleGroups []*OutRuleGroup `protobuf:"bytes,1,rep,name=rule_groups,json=ruleGroups,proto3" json:"rule_groups,omitempty"` -} - -func (x *RuleGroupListing) Reset() { - *x = RuleGroupListing{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_groups_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuleGroupListing) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuleGroupListing) ProtoMessage() {} - -func (x *RuleGroupListing) ProtoReflect() protoreflect.Message { - mi := &file_proto_groups_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 RuleGroupListing.ProtoReflect.Descriptor instead. -func (*RuleGroupListing) Descriptor() ([]byte, []int) { - return file_proto_groups_proto_rawDescGZIP(), []int{5} -} - -func (x *RuleGroupListing) GetRuleGroups() []*OutRuleGroup { - if x != nil { - return x.RuleGroups - } - return nil -} - -// * A matcher specifying a group to fetch. -type FetchRuleGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the group. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *FetchRuleGroup) Reset() { - *x = FetchRuleGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_groups_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FetchRuleGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchRuleGroup) ProtoMessage() {} - -func (x *FetchRuleGroup) ProtoReflect() protoreflect.Message { - mi := &file_proto_groups_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 FetchRuleGroup.ProtoReflect.Descriptor instead. -func (*FetchRuleGroup) Descriptor() ([]byte, []int) { - return file_proto_groups_proto_rawDescGZIP(), []int{6} -} - -func (x *FetchRuleGroup) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// * Result of a rule group fetch operation. -type FetchRuleGroupResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A fetched rule group. - RuleGroup *OutRuleGroup `protobuf:"bytes,1,opt,name=rule_group,json=ruleGroup,proto3" json:"rule_group,omitempty"` // optional, empty if not found -} - -func (x *FetchRuleGroupResult) Reset() { - *x = FetchRuleGroupResult{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_groups_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FetchRuleGroupResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchRuleGroupResult) ProtoMessage() {} - -func (x *FetchRuleGroupResult) ProtoReflect() protoreflect.Message { - mi := &file_proto_groups_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 FetchRuleGroupResult.ProtoReflect.Descriptor instead. -func (*FetchRuleGroupResult) Descriptor() ([]byte, []int) { - return file_proto_groups_proto_rawDescGZIP(), []int{7} -} - -func (x *FetchRuleGroupResult) GetRuleGroup() *OutRuleGroup { - if x != nil { - return x.RuleGroup - } - return nil -} - -type CreateRuleGroupSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Groups []*InRuleGroup `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` - Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"` -} - -func (x *CreateRuleGroupSet) Reset() { - *x = CreateRuleGroupSet{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_groups_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateRuleGroupSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateRuleGroupSet) ProtoMessage() {} - -func (x *CreateRuleGroupSet) ProtoReflect() protoreflect.Message { - mi := &file_proto_groups_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 CreateRuleGroupSet.ProtoReflect.Descriptor instead. -func (*CreateRuleGroupSet) Descriptor() ([]byte, []int) { - return file_proto_groups_proto_rawDescGZIP(), []int{8} -} - -func (x *CreateRuleGroupSet) GetGroups() []*InRuleGroup { - if x != nil { - return x.Groups - } - return nil -} - -func (x *CreateRuleGroupSet) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -type CreateRuleGroupSetResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *CreateRuleGroupSetResult) Reset() { - *x = CreateRuleGroupSetResult{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_groups_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateRuleGroupSetResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateRuleGroupSetResult) ProtoMessage() {} - -func (x *CreateRuleGroupSetResult) ProtoReflect() protoreflect.Message { - mi := &file_proto_groups_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 CreateRuleGroupSetResult.ProtoReflect.Descriptor instead. -func (*CreateRuleGroupSetResult) Descriptor() ([]byte, []int) { - return file_proto_groups_proto_rawDescGZIP(), []int{9} -} - -func (x *CreateRuleGroupSetResult) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type UpdateRuleGroupSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Groups []*InRuleGroup `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups,omitempty"` - Name *string `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty"` -} - -func (x *UpdateRuleGroupSet) Reset() { - *x = UpdateRuleGroupSet{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_groups_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateRuleGroupSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateRuleGroupSet) ProtoMessage() {} - -func (x *UpdateRuleGroupSet) ProtoReflect() protoreflect.Message { - mi := &file_proto_groups_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 UpdateRuleGroupSet.ProtoReflect.Descriptor instead. -func (*UpdateRuleGroupSet) Descriptor() ([]byte, []int) { - return file_proto_groups_proto_rawDescGZIP(), []int{10} -} - -func (x *UpdateRuleGroupSet) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *UpdateRuleGroupSet) GetGroups() []*InRuleGroup { - if x != nil { - return x.Groups - } - return nil -} - -func (x *UpdateRuleGroupSet) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -type RuleGroupSetListing struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Sets []*OutRuleGroupSet `protobuf:"bytes,1,rep,name=sets,proto3" json:"sets,omitempty"` -} - -func (x *RuleGroupSetListing) Reset() { - *x = RuleGroupSetListing{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_groups_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuleGroupSetListing) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuleGroupSetListing) ProtoMessage() {} - -func (x *RuleGroupSetListing) ProtoReflect() protoreflect.Message { - mi := &file_proto_groups_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 RuleGroupSetListing.ProtoReflect.Descriptor instead. -func (*RuleGroupSetListing) Descriptor() ([]byte, []int) { - return file_proto_groups_proto_rawDescGZIP(), []int{11} -} - -func (x *RuleGroupSetListing) GetSets() []*OutRuleGroupSet { - if x != nil { - return x.Sets - } - return nil -} - -type FetchRuleGroupSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *FetchRuleGroupSet) Reset() { - *x = FetchRuleGroupSet{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_groups_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FetchRuleGroupSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchRuleGroupSet) ProtoMessage() {} - -func (x *FetchRuleGroupSet) ProtoReflect() protoreflect.Message { - mi := &file_proto_groups_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 FetchRuleGroupSet.ProtoReflect.Descriptor instead. -func (*FetchRuleGroupSet) Descriptor() ([]byte, []int) { - return file_proto_groups_proto_rawDescGZIP(), []int{12} -} - -func (x *FetchRuleGroupSet) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type DeleteRuleGroupSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteRuleGroupSet) Reset() { - *x = DeleteRuleGroupSet{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_groups_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteRuleGroupSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteRuleGroupSet) ProtoMessage() {} - -func (x *DeleteRuleGroupSet) ProtoReflect() protoreflect.Message { - mi := &file_proto_groups_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 DeleteRuleGroupSet.ProtoReflect.Descriptor instead. -func (*DeleteRuleGroupSet) Descriptor() ([]byte, []int) { - return file_proto_groups_proto_rawDescGZIP(), []int{13} -} - -func (x *DeleteRuleGroupSet) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type OutRuleGroupSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Groups []*OutRuleGroup `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *OutRuleGroupSet) Reset() { - *x = OutRuleGroupSet{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_groups_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OutRuleGroupSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OutRuleGroupSet) ProtoMessage() {} - -func (x *OutRuleGroupSet) ProtoReflect() protoreflect.Message { - mi := &file_proto_groups_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 OutRuleGroupSet.ProtoReflect.Descriptor instead. -func (*OutRuleGroupSet) Descriptor() ([]byte, []int) { - return file_proto_groups_proto_rawDescGZIP(), []int{14} -} - -func (x *OutRuleGroupSet) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *OutRuleGroupSet) GetGroups() []*OutRuleGroup { - if x != nil { - return x.Groups - } - return nil -} - -func (x *OutRuleGroupSet) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -var File_proto_groups_proto protoreflect.FileDescriptor - -var file_proto_groups_proto_rawDesc = []byte{ - 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, 0x01, 0x0a, 0x0b, 0x49, 0x6e, 0x52, 0x75, 0x6c, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x08, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x05, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x49, 0x6e, 0x52, 0x75, - 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x22, 0xb0, 0x01, 0x0a, 0x06, 0x49, 0x6e, 0x52, 0x75, 0x6c, 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, 0x12, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x12, 0x3f, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x49, 0x6e, - 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0xe1, 0x01, 0x0a, 0x0c, 0x4f, 0x75, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x88, 0x01, 0x01, 0x12, 0x32, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x4f, 0x75, 0x74, 0x52, 0x75, 0x6c, - 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x65, 0x76, 0x61, 0x6c, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, - 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x41, 0x74, 0x88, 0x01, 0x01, 0x42, - 0x0b, 0x0a, 0x09, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x08, 0x0a, 0x06, - 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, - 0x65, 0x76, 0x61, 0x6c, 0x5f, 0x61, 0x74, 0x22, 0x84, 0x02, 0x0a, 0x07, 0x4f, 0x75, 0x74, 0x52, - 0x75, 0x6c, 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, 0x12, 0x0a, 0x04, 0x65, - 0x78, 0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x12, - 0x40, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x4f, 0x75, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x12, 0x36, 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x65, 0x76, 0x61, 0x6c, 0x5f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x48, 0x00, 0x52, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x76, 0x61, 0x6c, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x65, 0x76, - 0x61, 0x6c, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x73, 0x22, 0x25, - 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x56, 0x0a, 0x10, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x42, 0x0a, 0x0b, 0x72, 0x75, 0x6c, - 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x4f, 0x75, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x0a, 0x72, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x24, 0x0a, - 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x22, 0x58, 0x0a, 0x14, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x72, - 0x75, 0x6c, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x4f, 0x75, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x09, 0x72, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x70, 0x0a, - 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x53, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x49, 0x6e, 0x52, 0x75, 0x6c, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x17, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, - 0x2a, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x80, 0x01, 0x0a, 0x12, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, - 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x38, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x49, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x17, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4f, - 0x0a, 0x13, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x74, 0x4c, 0x69, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x04, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x4f, 0x75, 0x74, 0x52, 0x75, 0x6c, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x74, 0x52, 0x04, 0x73, 0x65, 0x74, 0x73, 0x22, - 0x23, 0x0a, 0x11, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x22, 0x24, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, - 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x70, 0x0a, 0x0f, 0x4f, 0x75, - 0x74, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, - 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x73, 0x2e, 0x4f, 0x75, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xbe, 0x02, 0x0a, - 0x0a, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x42, 0x0a, 0x04, 0x53, - 0x61, 0x76, 0x65, 0x12, 0x20, 0x2e, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x49, 0x6e, 0x52, 0x75, 0x6c, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, - 0x48, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x72, 0x75, 0x6c, 0x65, - 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x04, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x25, 0x2e, 0x72, 0x75, 0x6c, 0x65, - 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, - 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, - 0x22, 0x00, 0x12, 0x59, 0x0a, 0x05, 0x46, 0x65, 0x74, 0x63, 0x68, 0x12, 0x23, 0x2e, 0x72, 0x75, - 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x73, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x1a, 0x29, 0x2e, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6c, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x32, 0xb2, 0x03, - 0x0a, 0x0d, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x74, 0x73, 0x12, - 0x62, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x72, 0x75, 0x6c, 0x65, - 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, - 0x65, 0x74, 0x1a, 0x2d, 0x2e, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, - 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x53, 0x65, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, - 0x12, 0x4a, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x1a, 0x28, 0x2e, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x53, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x05, - 0x46, 0x65, 0x74, 0x63, 0x68, 0x12, 0x26, 0x2e, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x46, 0x65, 0x74, 0x63, - 0x68, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x74, 0x1a, 0x24, 0x2e, - 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x73, 0x2e, 0x4f, 0x75, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x53, 0x65, 0x74, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, - 0x27, 0x2e, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x65, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x00, 0x42, 0x04, 0x5a, 0x02, 0x2e, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_groups_proto_rawDescOnce sync.Once - file_proto_groups_proto_rawDescData = file_proto_groups_proto_rawDesc -) - -func file_proto_groups_proto_rawDescGZIP() []byte { - file_proto_groups_proto_rawDescOnce.Do(func() { - file_proto_groups_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_groups_proto_rawDescData) - }) - return file_proto_groups_proto_rawDescData -} - -var file_proto_groups_proto_msgTypes = make([]protoimpl.MessageInfo, 17) -var file_proto_groups_proto_goTypes = []interface{}{ - (*InRuleGroup)(nil), // 0: rule_manager.groups.InRuleGroup - (*InRule)(nil), // 1: rule_manager.groups.InRule - (*OutRuleGroup)(nil), // 2: rule_manager.groups.OutRuleGroup - (*OutRule)(nil), // 3: rule_manager.groups.OutRule - (*DeleteRuleGroup)(nil), // 4: rule_manager.groups.DeleteRuleGroup - (*RuleGroupListing)(nil), // 5: rule_manager.groups.RuleGroupListing - (*FetchRuleGroup)(nil), // 6: rule_manager.groups.FetchRuleGroup - (*FetchRuleGroupResult)(nil), // 7: rule_manager.groups.FetchRuleGroupResult - (*CreateRuleGroupSet)(nil), // 8: rule_manager.groups.CreateRuleGroupSet - (*CreateRuleGroupSetResult)(nil), // 9: rule_manager.groups.CreateRuleGroupSetResult - (*UpdateRuleGroupSet)(nil), // 10: rule_manager.groups.UpdateRuleGroupSet - (*RuleGroupSetListing)(nil), // 11: rule_manager.groups.RuleGroupSetListing - (*FetchRuleGroupSet)(nil), // 12: rule_manager.groups.FetchRuleGroupSet - (*DeleteRuleGroupSet)(nil), // 13: rule_manager.groups.DeleteRuleGroupSet - (*OutRuleGroupSet)(nil), // 14: rule_manager.groups.OutRuleGroupSet - nil, // 15: rule_manager.groups.InRule.LabelsEntry - nil, // 16: rule_manager.groups.OutRule.LabelsEntry - (*emptypb.Empty)(nil), // 17: google.protobuf.Empty -} -var file_proto_groups_proto_depIdxs = []int32{ - 1, // 0: rule_manager.groups.InRuleGroup.rules:type_name -> rule_manager.groups.InRule - 15, // 1: rule_manager.groups.InRule.labels:type_name -> rule_manager.groups.InRule.LabelsEntry - 3, // 2: rule_manager.groups.OutRuleGroup.rules:type_name -> rule_manager.groups.OutRule - 16, // 3: rule_manager.groups.OutRule.labels:type_name -> rule_manager.groups.OutRule.LabelsEntry - 2, // 4: rule_manager.groups.RuleGroupListing.rule_groups:type_name -> rule_manager.groups.OutRuleGroup - 2, // 5: rule_manager.groups.FetchRuleGroupResult.rule_group:type_name -> rule_manager.groups.OutRuleGroup - 0, // 6: rule_manager.groups.CreateRuleGroupSet.groups:type_name -> rule_manager.groups.InRuleGroup - 0, // 7: rule_manager.groups.UpdateRuleGroupSet.groups:type_name -> rule_manager.groups.InRuleGroup - 14, // 8: rule_manager.groups.RuleGroupSetListing.sets:type_name -> rule_manager.groups.OutRuleGroupSet - 2, // 9: rule_manager.groups.OutRuleGroupSet.groups:type_name -> rule_manager.groups.OutRuleGroup - 0, // 10: rule_manager.groups.RuleGroups.Save:input_type -> rule_manager.groups.InRuleGroup - 4, // 11: rule_manager.groups.RuleGroups.Delete:input_type -> rule_manager.groups.DeleteRuleGroup - 17, // 12: rule_manager.groups.RuleGroups.List:input_type -> google.protobuf.Empty - 6, // 13: rule_manager.groups.RuleGroups.Fetch:input_type -> rule_manager.groups.FetchRuleGroup - 8, // 14: rule_manager.groups.RuleGroupSets.Create:input_type -> rule_manager.groups.CreateRuleGroupSet - 10, // 15: rule_manager.groups.RuleGroupSets.Update:input_type -> rule_manager.groups.UpdateRuleGroupSet - 17, // 16: rule_manager.groups.RuleGroupSets.List:input_type -> google.protobuf.Empty - 12, // 17: rule_manager.groups.RuleGroupSets.Fetch:input_type -> rule_manager.groups.FetchRuleGroupSet - 13, // 18: rule_manager.groups.RuleGroupSets.Delete:input_type -> rule_manager.groups.DeleteRuleGroupSet - 17, // 19: rule_manager.groups.RuleGroups.Save:output_type -> google.protobuf.Empty - 17, // 20: rule_manager.groups.RuleGroups.Delete:output_type -> google.protobuf.Empty - 5, // 21: rule_manager.groups.RuleGroups.List:output_type -> rule_manager.groups.RuleGroupListing - 7, // 22: rule_manager.groups.RuleGroups.Fetch:output_type -> rule_manager.groups.FetchRuleGroupResult - 9, // 23: rule_manager.groups.RuleGroupSets.Create:output_type -> rule_manager.groups.CreateRuleGroupSetResult - 17, // 24: rule_manager.groups.RuleGroupSets.Update:output_type -> google.protobuf.Empty - 11, // 25: rule_manager.groups.RuleGroupSets.List:output_type -> rule_manager.groups.RuleGroupSetListing - 14, // 26: rule_manager.groups.RuleGroupSets.Fetch:output_type -> rule_manager.groups.OutRuleGroupSet - 17, // 27: rule_manager.groups.RuleGroupSets.Delete:output_type -> google.protobuf.Empty - 19, // [19:28] is the sub-list for method output_type - 10, // [10:19] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_proto_groups_proto_init() } -func file_proto_groups_proto_init() { - if File_proto_groups_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_groups_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InRuleGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_groups_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_groups_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OutRuleGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_groups_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OutRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_groups_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRuleGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_groups_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuleGroupListing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_groups_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FetchRuleGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_groups_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FetchRuleGroupResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_groups_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateRuleGroupSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_groups_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateRuleGroupSetResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_groups_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateRuleGroupSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_groups_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuleGroupSetListing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_groups_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FetchRuleGroupSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_groups_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRuleGroupSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_groups_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OutRuleGroupSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_proto_groups_proto_msgTypes[0].OneofWrappers = []interface{}{} - file_proto_groups_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_proto_groups_proto_msgTypes[3].OneofWrappers = []interface{}{} - file_proto_groups_proto_msgTypes[8].OneofWrappers = []interface{}{} - file_proto_groups_proto_msgTypes[10].OneofWrappers = []interface{}{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_groups_proto_rawDesc, - NumEnums: 0, - NumMessages: 17, - NumExtensions: 0, - NumServices: 2, - }, - GoTypes: file_proto_groups_proto_goTypes, - DependencyIndexes: file_proto_groups_proto_depIdxs, - MessageInfos: file_proto_groups_proto_msgTypes, - }.Build() - File_proto_groups_proto = out.File - file_proto_groups_proto_rawDesc = nil - file_proto_groups_proto_goTypes = nil - file_proto_groups_proto_depIdxs = nil -} diff --git a/controllers/clientset/grpc/recording-rules-groups/v2/groups_grpc.pb.go b/controllers/clientset/grpc/recording-rules-groups/v2/groups_grpc.pb.go deleted file mode 100644 index 42fc8d5..0000000 --- a/controllers/clientset/grpc/recording-rules-groups/v2/groups_grpc.pb.go +++ /dev/null @@ -1,452 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v5.27.1 -// source: proto/groups.proto - -package __ - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - emptypb "google.golang.org/protobuf/types/known/emptypb" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// RuleGroupsClient is the client API for RuleGroups 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 RuleGroupsClient interface { - // Creates or updates a rule group. - Save(ctx context.Context, in *InRuleGroup, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Deletes a rule group matching the given input. - Delete(ctx context.Context, in *DeleteRuleGroup, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Lists all the rule groups. - List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*RuleGroupListing, error) - // Fetches a rule group matching a given input. - Fetch(ctx context.Context, in *FetchRuleGroup, opts ...grpc.CallOption) (*FetchRuleGroupResult, error) -} - -type ruleGroupsClient struct { - cc grpc.ClientConnInterface -} - -func NewRuleGroupsClient(cc grpc.ClientConnInterface) RuleGroupsClient { - return &ruleGroupsClient{cc} -} - -func (c *ruleGroupsClient) Save(ctx context.Context, in *InRuleGroup, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/rule_manager.groups.RuleGroups/Save", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ruleGroupsClient) Delete(ctx context.Context, in *DeleteRuleGroup, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/rule_manager.groups.RuleGroups/Delete", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ruleGroupsClient) List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*RuleGroupListing, error) { - out := new(RuleGroupListing) - err := c.cc.Invoke(ctx, "/rule_manager.groups.RuleGroups/List", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ruleGroupsClient) Fetch(ctx context.Context, in *FetchRuleGroup, opts ...grpc.CallOption) (*FetchRuleGroupResult, error) { - out := new(FetchRuleGroupResult) - err := c.cc.Invoke(ctx, "/rule_manager.groups.RuleGroups/Fetch", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RuleGroupsServer is the server API for RuleGroups service. -// All implementations must embed UnimplementedRuleGroupsServer -// for forward compatibility -type RuleGroupsServer interface { - // Creates or updates a rule group. - Save(context.Context, *InRuleGroup) (*emptypb.Empty, error) - // Deletes a rule group matching the given input. - Delete(context.Context, *DeleteRuleGroup) (*emptypb.Empty, error) - // Lists all the rule groups. - List(context.Context, *emptypb.Empty) (*RuleGroupListing, error) - // Fetches a rule group matching a given input. - Fetch(context.Context, *FetchRuleGroup) (*FetchRuleGroupResult, error) - mustEmbedUnimplementedRuleGroupsServer() -} - -// UnimplementedRuleGroupsServer must be embedded to have forward compatible implementations. -type UnimplementedRuleGroupsServer struct { -} - -func (UnimplementedRuleGroupsServer) Save(context.Context, *InRuleGroup) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Save not implemented") -} -func (UnimplementedRuleGroupsServer) Delete(context.Context, *DeleteRuleGroup) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") -} -func (UnimplementedRuleGroupsServer) List(context.Context, *emptypb.Empty) (*RuleGroupListing, error) { - return nil, status.Errorf(codes.Unimplemented, "method List not implemented") -} -func (UnimplementedRuleGroupsServer) Fetch(context.Context, *FetchRuleGroup) (*FetchRuleGroupResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") -} -func (UnimplementedRuleGroupsServer) mustEmbedUnimplementedRuleGroupsServer() {} - -// UnsafeRuleGroupsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to RuleGroupsServer will -// result in compilation errors. -type UnsafeRuleGroupsServer interface { - mustEmbedUnimplementedRuleGroupsServer() -} - -func RegisterRuleGroupsServer(s grpc.ServiceRegistrar, srv RuleGroupsServer) { - s.RegisterService(&RuleGroups_ServiceDesc, srv) -} - -func _RuleGroups_Save_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InRuleGroup) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuleGroupsServer).Save(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rule_manager.groups.RuleGroups/Save", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuleGroupsServer).Save(ctx, req.(*InRuleGroup)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuleGroups_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteRuleGroup) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuleGroupsServer).Delete(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rule_manager.groups.RuleGroups/Delete", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuleGroupsServer).Delete(ctx, req.(*DeleteRuleGroup)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuleGroups_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuleGroupsServer).List(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rule_manager.groups.RuleGroups/List", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuleGroupsServer).List(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuleGroups_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRuleGroup) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuleGroupsServer).Fetch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rule_manager.groups.RuleGroups/Fetch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuleGroupsServer).Fetch(ctx, req.(*FetchRuleGroup)) - } - return interceptor(ctx, in, info, handler) -} - -// RuleGroups_ServiceDesc is the grpc.ServiceDesc for RuleGroups service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var RuleGroups_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "rule_manager.groups.RuleGroups", - HandlerType: (*RuleGroupsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Save", - Handler: _RuleGroups_Save_Handler, - }, - { - MethodName: "Delete", - Handler: _RuleGroups_Delete_Handler, - }, - { - MethodName: "List", - Handler: _RuleGroups_List_Handler, - }, - { - MethodName: "Fetch", - Handler: _RuleGroups_Fetch_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/groups.proto", -} - -// RuleGroupSetsClient is the client API for RuleGroupSets 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 RuleGroupSetsClient interface { - Create(ctx context.Context, in *CreateRuleGroupSet, opts ...grpc.CallOption) (*CreateRuleGroupSetResult, error) - Update(ctx context.Context, in *UpdateRuleGroupSet, opts ...grpc.CallOption) (*emptypb.Empty, error) - List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*RuleGroupSetListing, error) - Fetch(ctx context.Context, in *FetchRuleGroupSet, opts ...grpc.CallOption) (*OutRuleGroupSet, error) - Delete(ctx context.Context, in *DeleteRuleGroupSet, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type ruleGroupSetsClient struct { - cc grpc.ClientConnInterface -} - -func NewRuleGroupSetsClient(cc grpc.ClientConnInterface) RuleGroupSetsClient { - return &ruleGroupSetsClient{cc} -} - -func (c *ruleGroupSetsClient) Create(ctx context.Context, in *CreateRuleGroupSet, opts ...grpc.CallOption) (*CreateRuleGroupSetResult, error) { - out := new(CreateRuleGroupSetResult) - err := c.cc.Invoke(ctx, "/rule_manager.groups.RuleGroupSets/Create", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ruleGroupSetsClient) Update(ctx context.Context, in *UpdateRuleGroupSet, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/rule_manager.groups.RuleGroupSets/Update", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ruleGroupSetsClient) List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*RuleGroupSetListing, error) { - out := new(RuleGroupSetListing) - err := c.cc.Invoke(ctx, "/rule_manager.groups.RuleGroupSets/List", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ruleGroupSetsClient) Fetch(ctx context.Context, in *FetchRuleGroupSet, opts ...grpc.CallOption) (*OutRuleGroupSet, error) { - out := new(OutRuleGroupSet) - err := c.cc.Invoke(ctx, "/rule_manager.groups.RuleGroupSets/Fetch", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *ruleGroupSetsClient) Delete(ctx context.Context, in *DeleteRuleGroupSet, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/rule_manager.groups.RuleGroupSets/Delete", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RuleGroupSetsServer is the server API for RuleGroupSets service. -// All implementations must embed UnimplementedRuleGroupSetsServer -// for forward compatibility -type RuleGroupSetsServer interface { - Create(context.Context, *CreateRuleGroupSet) (*CreateRuleGroupSetResult, error) - Update(context.Context, *UpdateRuleGroupSet) (*emptypb.Empty, error) - List(context.Context, *emptypb.Empty) (*RuleGroupSetListing, error) - Fetch(context.Context, *FetchRuleGroupSet) (*OutRuleGroupSet, error) - Delete(context.Context, *DeleteRuleGroupSet) (*emptypb.Empty, error) - mustEmbedUnimplementedRuleGroupSetsServer() -} - -// UnimplementedRuleGroupSetsServer must be embedded to have forward compatible implementations. -type UnimplementedRuleGroupSetsServer struct { -} - -func (UnimplementedRuleGroupSetsServer) Create(context.Context, *CreateRuleGroupSet) (*CreateRuleGroupSetResult, error) { - return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") -} -func (UnimplementedRuleGroupSetsServer) Update(context.Context, *UpdateRuleGroupSet) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") -} -func (UnimplementedRuleGroupSetsServer) List(context.Context, *emptypb.Empty) (*RuleGroupSetListing, error) { - return nil, status.Errorf(codes.Unimplemented, "method List not implemented") -} -func (UnimplementedRuleGroupSetsServer) Fetch(context.Context, *FetchRuleGroupSet) (*OutRuleGroupSet, error) { - return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented") -} -func (UnimplementedRuleGroupSetsServer) Delete(context.Context, *DeleteRuleGroupSet) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") -} -func (UnimplementedRuleGroupSetsServer) mustEmbedUnimplementedRuleGroupSetsServer() {} - -// UnsafeRuleGroupSetsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to RuleGroupSetsServer will -// result in compilation errors. -type UnsafeRuleGroupSetsServer interface { - mustEmbedUnimplementedRuleGroupSetsServer() -} - -func RegisterRuleGroupSetsServer(s grpc.ServiceRegistrar, srv RuleGroupSetsServer) { - s.RegisterService(&RuleGroupSets_ServiceDesc, srv) -} - -func _RuleGroupSets_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateRuleGroupSet) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuleGroupSetsServer).Create(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rule_manager.groups.RuleGroupSets/Create", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuleGroupSetsServer).Create(ctx, req.(*CreateRuleGroupSet)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuleGroupSets_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateRuleGroupSet) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuleGroupSetsServer).Update(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rule_manager.groups.RuleGroupSets/Update", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuleGroupSetsServer).Update(ctx, req.(*UpdateRuleGroupSet)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuleGroupSets_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuleGroupSetsServer).List(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rule_manager.groups.RuleGroupSets/List", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuleGroupSetsServer).List(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuleGroupSets_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchRuleGroupSet) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuleGroupSetsServer).Fetch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rule_manager.groups.RuleGroupSets/Fetch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuleGroupSetsServer).Fetch(ctx, req.(*FetchRuleGroupSet)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuleGroupSets_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteRuleGroupSet) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuleGroupSetsServer).Delete(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/rule_manager.groups.RuleGroupSets/Delete", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuleGroupSetsServer).Delete(ctx, req.(*DeleteRuleGroupSet)) - } - return interceptor(ctx, in, info, handler) -} - -// RuleGroupSets_ServiceDesc is the grpc.ServiceDesc for RuleGroupSets service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var RuleGroupSets_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "rule_manager.groups.RuleGroupSets", - HandlerType: (*RuleGroupSetsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Create", - Handler: _RuleGroupSets_Create_Handler, - }, - { - MethodName: "Update", - Handler: _RuleGroupSets_Update_Handler, - }, - { - MethodName: "List", - Handler: _RuleGroupSets_List_Handler, - }, - { - MethodName: "Fetch", - Handler: _RuleGroupSets_Fetch_Handler, - }, - { - MethodName: "Delete", - Handler: _RuleGroupSets_Delete_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto/groups.proto", -} diff --git a/controllers/clientset/recording-rules-groups-client.go b/controllers/clientset/recording-rules-groups-client.go index fec13c5..14fd104 100644 --- a/controllers/clientset/recording-rules-groups-client.go +++ b/controllers/clientset/recording-rules-groups-client.go @@ -3,89 +3,15 @@ package clientset import ( "context" - rrg "github.com/coralogix/coralogix-operator/controllers/clientset/grpc/recording-rules-groups/v2" "google.golang.org/protobuf/types/known/emptypb" + + cxsdk "github.com/coralogix/coralogix-management-sdk/go" ) -//go:generate mockgen -destination=../mock_clientset/mock_recordingrulesgroups-client.go -package=mock_clientset github.com/coralogix/coralogix-operator/controllers/clientset RecordingRulesGroupsClientInterface +//go:generate mockgen -destination=../mock_clientset/mock_recordingrulesgroups-client.go -package=mock_clientset -source=recording-rules-groups-client.go RecordingRulesGroupsClientInterface type RecordingRulesGroupsClientInterface interface { - CreateRecordingRuleGroupSet(ctx context.Context, req *rrg.CreateRuleGroupSet) (*rrg.CreateRuleGroupSetResult, error) - GetRecordingRuleGroupSet(ctx context.Context, req *rrg.FetchRuleGroupSet) (*rrg.OutRuleGroupSet, error) - UpdateRecordingRuleGroupSet(ctx context.Context, req *rrg.UpdateRuleGroupSet) (*emptypb.Empty, error) - DeleteRecordingRuleGroupSet(ctx context.Context, req *rrg.DeleteRuleGroupSet) (*emptypb.Empty, error) -} - -type RecordingRulesGroupsClient struct { - callPropertiesCreator *CallPropertiesCreator -} - -func (r RecordingRulesGroupsClient) CreateRecordingRuleGroupSet(ctx context.Context, req *rrg.CreateRuleGroupSet) (*rrg.CreateRuleGroupSetResult, error) { - callProperties, err := r.callPropertiesCreator.GetCallProperties(ctx) - if err != nil { - return nil, err - } - - conn := callProperties.Connection - defer conn.Close() - client := rrg.NewRuleGroupSetsClient(conn) - - ctx = createAuthContext(ctx, r.callPropertiesCreator.apiKey) - return client.Create(callProperties.Ctx, req, callProperties.CallOptions...) -} - -func (r RecordingRulesGroupsClient) GetRecordingRuleGroupSet(ctx context.Context, req *rrg.FetchRuleGroupSet) (*rrg.OutRuleGroupSet, error) { - callProperties, err := r.callPropertiesCreator.GetCallProperties(ctx) - if err != nil { - return nil, err - } - - conn := callProperties.Connection - defer conn.Close() - client := rrg.NewRuleGroupSetsClient(conn) - - return client.Fetch(callProperties.Ctx, req, callProperties.CallOptions...) -} - -func (r RecordingRulesGroupsClient) UpdateRecordingRuleGroupSet(ctx context.Context, req *rrg.UpdateRuleGroupSet) (*emptypb.Empty, error) { - callProperties, err := r.callPropertiesCreator.GetCallProperties(ctx) - if err != nil { - return nil, err - } - - conn := callProperties.Connection - defer conn.Close() - client := rrg.NewRuleGroupSetsClient(conn) - - return client.Update(callProperties.Ctx, req, callProperties.CallOptions...) -} - -func (r RecordingRulesGroupsClient) DeleteRecordingRuleGroupSet(ctx context.Context, req *rrg.DeleteRuleGroupSet) (*emptypb.Empty, error) { - callProperties, err := r.callPropertiesCreator.GetCallProperties(ctx) - if err != nil { - return nil, err - } - - conn := callProperties.Connection - defer conn.Close() - client := rrg.NewRuleGroupSetsClient(conn) - - return client.Delete(callProperties.Ctx, req, callProperties.CallOptions...) -} - -func (r RecordingRulesGroupsClient) ListRecordingRuleGroup(ctx context.Context) (*rrg.RuleGroupSetListing, error) { - callProperties, err := r.callPropertiesCreator.GetCallProperties(ctx) - if err != nil { - return nil, err - } - - conn := callProperties.Connection - defer conn.Close() - client := rrg.NewRuleGroupSetsClient(conn) - - ctx = createAuthContext(ctx, r.callPropertiesCreator.apiKey) - return client.List(callProperties.Ctx, &emptypb.Empty{}, callProperties.CallOptions...) -} - -func NewRecordingRuleGroupsClient(c *CallPropertiesCreator) *RecordingRulesGroupsClient { - return &RecordingRulesGroupsClient{callPropertiesCreator: c} -} + Create(ctx context.Context, req *cxsdk.CreateRuleGroupSetRequest) (*cxsdk.CreateRuleGroupSetResponse, error) + Get(ctx context.Context, req *cxsdk.GetRuleGroupSetRequest) (*cxsdk.GetRuleGroupSetResponse, error) + Update(ctx context.Context, req *cxsdk.UpdateRuleGroupSetRequest) (*emptypb.Empty, error) + Delete(ctx context.Context, req *cxsdk.DeleteRuleGroupSetRequest) (*emptypb.Empty, error) +} \ No newline at end of file diff --git a/controllers/mock_clientset/mock_recordingrulesgroups-client.go b/controllers/mock_clientset/mock_recordingrulesgroups-client.go index 7ab771b..3b94654 100644 --- a/controllers/mock_clientset/mock_recordingrulesgroups-client.go +++ b/controllers/mock_clientset/mock_recordingrulesgroups-client.go @@ -1,9 +1,9 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/coralogix/coralogix-operator/controllers/clientset (interfaces: RecordingRulesGroupsClientInterface) +// Source: recording-rules-groups-client.go // // Generated by this command: // -// mockgen -destination=../mock_clientset/mock_recordingrulesgroups-client.go -package=mock_clientset github.com/coralogix/coralogix-operator/controllers/clientset RecordingRulesGroupsClientInterface +// mockgen -destination=../mock_clientset/mock_recordingrulesgroups-client.go -package=mock_clientset -source=recording-rules-groups-client.go RecordingRulesGroupsClientInterface // // Package mock_clientset is a generated GoMock package. package mock_clientset @@ -12,7 +12,7 @@ import ( context "context" reflect "reflect" - __ "github.com/coralogix/coralogix-operator/controllers/clientset/grpc/recording-rules-groups/v2" + cxsdk "github.com/coralogix/coralogix-management-sdk/go" gomock "go.uber.org/mock/gomock" emptypb "google.golang.org/protobuf/types/known/emptypb" ) @@ -40,62 +40,62 @@ func (m *MockRecordingRulesGroupsClientInterface) EXPECT() *MockRecordingRulesGr return m.recorder } -// CreateRecordingRuleGroupSet mocks base method. -func (m *MockRecordingRulesGroupsClientInterface) CreateRecordingRuleGroupSet(arg0 context.Context, arg1 *__.CreateRuleGroupSet) (*__.CreateRuleGroupSetResult, error) { +// Create mocks base method. +func (m *MockRecordingRulesGroupsClientInterface) Create(ctx context.Context, req *cxsdk.CreateRuleGroupSetRequest) (*cxsdk.CreateRuleGroupSetResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateRecordingRuleGroupSet", arg0, arg1) - ret0, _ := ret[0].(*__.CreateRuleGroupSetResult) + ret := m.ctrl.Call(m, "Create", ctx, req) + ret0, _ := ret[0].(*cxsdk.CreateRuleGroupSetResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// CreateRecordingRuleGroupSet indicates an expected call of CreateRecordingRuleGroupSet. -func (mr *MockRecordingRulesGroupsClientInterfaceMockRecorder) CreateRecordingRuleGroupSet(arg0, arg1 any) *gomock.Call { +// Create indicates an expected call of Create. +func (mr *MockRecordingRulesGroupsClientInterfaceMockRecorder) Create(ctx, req any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRecordingRuleGroupSet", reflect.TypeOf((*MockRecordingRulesGroupsClientInterface)(nil).CreateRecordingRuleGroupSet), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockRecordingRulesGroupsClientInterface)(nil).Create), ctx, req) } -// DeleteRecordingRuleGroupSet mocks base method. -func (m *MockRecordingRulesGroupsClientInterface) DeleteRecordingRuleGroupSet(arg0 context.Context, arg1 *__.DeleteRuleGroupSet) (*emptypb.Empty, error) { +// Delete mocks base method. +func (m *MockRecordingRulesGroupsClientInterface) Delete(ctx context.Context, req *cxsdk.DeleteRuleGroupSetRequest) (*emptypb.Empty, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteRecordingRuleGroupSet", arg0, arg1) + ret := m.ctrl.Call(m, "Delete", ctx, req) ret0, _ := ret[0].(*emptypb.Empty) ret1, _ := ret[1].(error) return ret0, ret1 } -// DeleteRecordingRuleGroupSet indicates an expected call of DeleteRecordingRuleGroupSet. -func (mr *MockRecordingRulesGroupsClientInterfaceMockRecorder) DeleteRecordingRuleGroupSet(arg0, arg1 any) *gomock.Call { +// Delete indicates an expected call of Delete. +func (mr *MockRecordingRulesGroupsClientInterfaceMockRecorder) Delete(ctx, req any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRecordingRuleGroupSet", reflect.TypeOf((*MockRecordingRulesGroupsClientInterface)(nil).DeleteRecordingRuleGroupSet), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockRecordingRulesGroupsClientInterface)(nil).Delete), ctx, req) } -// GetRecordingRuleGroupSet mocks base method. -func (m *MockRecordingRulesGroupsClientInterface) GetRecordingRuleGroupSet(arg0 context.Context, arg1 *__.FetchRuleGroupSet) (*__.OutRuleGroupSet, error) { +// Get mocks base method. +func (m *MockRecordingRulesGroupsClientInterface) Get(ctx context.Context, req *cxsdk.GetRuleGroupSetRequest) (*cxsdk.GetRuleGroupSetResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetRecordingRuleGroupSet", arg0, arg1) - ret0, _ := ret[0].(*__.OutRuleGroupSet) + ret := m.ctrl.Call(m, "Get", ctx, req) + ret0, _ := ret[0].(*cxsdk.GetRuleGroupSetResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetRecordingRuleGroupSet indicates an expected call of GetRecordingRuleGroupSet. -func (mr *MockRecordingRulesGroupsClientInterfaceMockRecorder) GetRecordingRuleGroupSet(arg0, arg1 any) *gomock.Call { +// Get indicates an expected call of Get. +func (mr *MockRecordingRulesGroupsClientInterfaceMockRecorder) Get(ctx, req any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRecordingRuleGroupSet", reflect.TypeOf((*MockRecordingRulesGroupsClientInterface)(nil).GetRecordingRuleGroupSet), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockRecordingRulesGroupsClientInterface)(nil).Get), ctx, req) } -// UpdateRecordingRuleGroupSet mocks base method. -func (m *MockRecordingRulesGroupsClientInterface) UpdateRecordingRuleGroupSet(arg0 context.Context, arg1 *__.UpdateRuleGroupSet) (*emptypb.Empty, error) { +// Update mocks base method. +func (m *MockRecordingRulesGroupsClientInterface) Update(ctx context.Context, req *cxsdk.UpdateRuleGroupSetRequest) (*emptypb.Empty, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateRecordingRuleGroupSet", arg0, arg1) + ret := m.ctrl.Call(m, "Update", ctx, req) ret0, _ := ret[0].(*emptypb.Empty) ret1, _ := ret[1].(error) return ret0, ret1 } -// UpdateRecordingRuleGroupSet indicates an expected call of UpdateRecordingRuleGroupSet. -func (mr *MockRecordingRulesGroupsClientInterfaceMockRecorder) UpdateRecordingRuleGroupSet(arg0, arg1 any) *gomock.Call { +// Update indicates an expected call of Update. +func (mr *MockRecordingRulesGroupsClientInterfaceMockRecorder) Update(ctx, req any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRecordingRuleGroupSet", reflect.TypeOf((*MockRecordingRulesGroupsClientInterface)(nil).UpdateRecordingRuleGroupSet), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockRecordingRulesGroupsClientInterface)(nil).Update), ctx, req) } diff --git a/go.mod b/go.mod index 91b62e7..1e6681a 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/coralogix/coralogix-operator go 1.22.5 require ( - github.com/coralogix/coralogix-management-sdk v0.2.2-0.20241008113746-f3f707f6e406 + github.com/coralogix/coralogix-management-sdk v0.2.2-0.20241010083215-2b986bff8a4e github.com/go-logr/logr v1.3.0 github.com/golang/protobuf v1.5.4 github.com/google/uuid v1.6.0 diff --git a/go.sum b/go.sum index a7aad1a..04f0eca 100644 --- a/go.sum +++ b/go.sum @@ -35,6 +35,10 @@ github.com/coralogix/coralogix-management-sdk v0.2.2-0.20241008112818-bba7c7320c github.com/coralogix/coralogix-management-sdk v0.2.2-0.20241008112818-bba7c7320cdf/go.mod h1:1aa/coMEMe5M1NvnRymOrBF2iCdefaWR0CMaMjPu0oI= github.com/coralogix/coralogix-management-sdk v0.2.2-0.20241008113746-f3f707f6e406 h1:OHRc3ApkMc0oKieebWDtcc2yEUvASPJ3jRcZ4ho0j3c= github.com/coralogix/coralogix-management-sdk v0.2.2-0.20241008113746-f3f707f6e406/go.mod h1:1aa/coMEMe5M1NvnRymOrBF2iCdefaWR0CMaMjPu0oI= +github.com/coralogix/coralogix-management-sdk v0.2.2-0.20241010082835-a716a0125e89 h1:wTO2+KdtGL50vpRfxLmcqPg/XNeLv4W9BQyEpB4Sf+8= +github.com/coralogix/coralogix-management-sdk v0.2.2-0.20241010082835-a716a0125e89/go.mod h1:1aa/coMEMe5M1NvnRymOrBF2iCdefaWR0CMaMjPu0oI= +github.com/coralogix/coralogix-management-sdk v0.2.2-0.20241010083215-2b986bff8a4e h1:YZhAgtvQdlavo+RlLe1dF7ogmlPlltqX7eCM78GrGqI= +github.com/coralogix/coralogix-management-sdk v0.2.2-0.20241010083215-2b986bff8a4e/go.mod h1:1aa/coMEMe5M1NvnRymOrBF2iCdefaWR0CMaMjPu0oI= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=