-
Notifications
You must be signed in to change notification settings - Fork 4
/
federation.pb.go
4472 lines (4025 loc) · 172 KB
/
federation.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: grpc/federation/federation.proto
package federation
import (
_ "github.com/mercari/grpc-federation/grpc/federation/cel"
code "google.golang.org/genproto/googleapis/rpc/code"
errdetails "google.golang.org/genproto/googleapis/rpc/errdetails"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
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)
)
type EnumRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// alias mapping between enums defined in other packages and enums defined on the federation service side.
// The alias is the FQDN ( <package-name>.<enum-name> ) to the enum.
// If this definition exists, type conversion is automatically performed before the enum value assignment operation.
// If a enum with this option has a value that is not present in the enum specified by alias, and the alias option is not specified for that value, an error is occurred.
Alias *string `protobuf:"bytes,1,opt,name=alias,proto3,oneof" json:"alias,omitempty"`
}
func (x *EnumRule) Reset() {
*x = EnumRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumRule) ProtoMessage() {}
func (x *EnumRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_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 EnumRule.ProtoReflect.Descriptor instead.
func (*EnumRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{0}
}
func (x *EnumRule) GetAlias() string {
if x != nil && x.Alias != nil {
return *x.Alias
}
return ""
}
type EnumValueRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// specifies the default value of the enum.
// All values other than those specified in alias will be default values.
Default *bool `protobuf:"varint,1,opt,name=default,proto3,oneof" json:"default,omitempty"`
// alias can be used when alias is specified in grpc.federation.enum option,
// and specifies the value name to be referenced among the enums specified in alias of enum option.
// multiple value names can be specified for alias.
Alias []string `protobuf:"bytes,2,rep,name=alias,proto3" json:"alias,omitempty"`
}
func (x *EnumValueRule) Reset() {
*x = EnumValueRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EnumValueRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EnumValueRule) ProtoMessage() {}
func (x *EnumValueRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_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 EnumValueRule.ProtoReflect.Descriptor instead.
func (*EnumValueRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{1}
}
func (x *EnumValueRule) GetDefault() bool {
if x != nil && x.Default != nil {
return *x.Default
}
return false
}
func (x *EnumValueRule) GetAlias() []string {
if x != nil {
return x.Alias
}
return nil
}
type OneofRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *OneofRule) Reset() {
*x = OneofRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OneofRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OneofRule) ProtoMessage() {}
func (x *OneofRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_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 OneofRule.ProtoReflect.Descriptor instead.
func (*OneofRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{2}
}
// ServiceRule define gRPC Federation rules for the service.
type ServiceRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// dependencies defines a unique name for all services on which federation service depends.
// The name will be used when creating the gRPC client.
//
// Deprecated: Marked as deprecated in grpc/federation/federation.proto.
Dependencies []*ServiceDependency `protobuf:"bytes,1,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
}
func (x *ServiceRule) Reset() {
*x = ServiceRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceRule) ProtoMessage() {}
func (x *ServiceRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_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 ServiceRule.ProtoReflect.Descriptor instead.
func (*ServiceRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{3}
}
// Deprecated: Marked as deprecated in grpc/federation/federation.proto.
func (x *ServiceRule) GetDependencies() []*ServiceDependency {
if x != nil {
return x.Dependencies
}
return nil
}
// ServiceDependency assigns a uniquely determined name to the service.
type ServiceDependency struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name to be used when initializing the gRPC client.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// service is the name of the dependent service.
Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"`
}
func (x *ServiceDependency) Reset() {
*x = ServiceDependency{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceDependency) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceDependency) ProtoMessage() {}
func (x *ServiceDependency) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_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 ServiceDependency.ProtoReflect.Descriptor instead.
func (*ServiceDependency) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{4}
}
func (x *ServiceDependency) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *ServiceDependency) GetService() string {
if x != nil {
return x.Service
}
return ""
}
type MethodRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,1,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
}
func (x *MethodRule) Reset() {
*x = MethodRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MethodRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MethodRule) ProtoMessage() {}
func (x *MethodRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_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 MethodRule.ProtoReflect.Descriptor instead.
func (*MethodRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{5}
}
func (x *MethodRule) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
// MessageRule define gRPC Federation rules for the message.
type MessageRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def specify variables to be used in field binding by `grpc.federation.field` option.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if custom_resolver is true, the resolver for this message is implemented by Go.
// If there are any values retrieved by resolver or messages, they are passed as arguments for custom resolver.
// Each field of the message returned by the custom resolver is automatically bound.
// If you want to change the binding process for a particular field, set `custom_resolver=true` option for that field.
CustomResolver *bool `protobuf:"varint,2,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"`
// alias mapping between messages defined in other packages and messages defined on the federation service side.
// The alias is the FQDN ( <package-name>.<message-name> ) to the message.
// If this definition exists, type conversion is automatically performed before the field assignment operation.
// If a message with this option has a field that is not present in the message specified by alias, and the alias option is not specified for that field, an error is occurred.
Alias *string `protobuf:"bytes,3,opt,name=alias,proto3,oneof" json:"alias,omitempty"`
}
func (x *MessageRule) Reset() {
*x = MessageRule{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageRule) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageRule) ProtoMessage() {}
func (x *MessageRule) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_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 MessageRule.ProtoReflect.Descriptor instead.
func (*MessageRule) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{6}
}
func (x *MessageRule) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *MessageRule) GetCustomResolver() bool {
if x != nil && x.CustomResolver != nil {
return *x.CustomResolver
}
return false
}
func (x *MessageRule) GetAlias() string {
if x != nil && x.Alias != nil {
return *x.Alias
}
return ""
}
// VariableDefinition represents variable definition.
type VariableDefinition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name is a variable name.
// This name can be referenced in all CELs defined after itself in the same message.
// It can also be referenced in `grpc.federation.field` option.
Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
// if specify the condition for evaluating expr.
// this value evaluated by CEL and it must return a boolean value.
// If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// autobind if the result value of `expr` is a message type,
// the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message.
// If multiple autobinds are used at the same message,
// you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one.
Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"`
// expr specify the value to be assigned to name.
//
// Types that are assignable to Expr:
//
// *VariableDefinition_By
// *VariableDefinition_Map
// *VariableDefinition_Message
// *VariableDefinition_Call
// *VariableDefinition_Validation
Expr isVariableDefinition_Expr `protobuf_oneof:"expr"`
}
func (x *VariableDefinition) Reset() {
*x = VariableDefinition{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VariableDefinition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VariableDefinition) ProtoMessage() {}
func (x *VariableDefinition) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_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 VariableDefinition.ProtoReflect.Descriptor instead.
func (*VariableDefinition) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{7}
}
func (x *VariableDefinition) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *VariableDefinition) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *VariableDefinition) GetAutobind() bool {
if x != nil && x.Autobind != nil {
return *x.Autobind
}
return false
}
func (m *VariableDefinition) GetExpr() isVariableDefinition_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *VariableDefinition) GetBy() string {
if x, ok := x.GetExpr().(*VariableDefinition_By); ok {
return x.By
}
return ""
}
func (x *VariableDefinition) GetMap() *MapExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Map); ok {
return x.Map
}
return nil
}
func (x *VariableDefinition) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Message); ok {
return x.Message
}
return nil
}
func (x *VariableDefinition) GetCall() *CallExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Call); ok {
return x.Call
}
return nil
}
func (x *VariableDefinition) GetValidation() *ValidationExpr {
if x, ok := x.GetExpr().(*VariableDefinition_Validation); ok {
return x.Validation
}
return nil
}
type isVariableDefinition_Expr interface {
isVariableDefinition_Expr()
}
type VariableDefinition_By struct {
// `by` evaluates with CEL.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type VariableDefinition_Map struct {
// map apply map operation for the specified repeated type.
Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"`
}
type VariableDefinition_Message struct {
// message gets with message arguments.
Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"`
}
type VariableDefinition_Call struct {
// call specifies how to call gRPC method.
Call *CallExpr `protobuf:"bytes,14,opt,name=call,proto3,oneof"`
}
type VariableDefinition_Validation struct {
// validation defines the validation rule and error.
Validation *ValidationExpr `protobuf:"bytes,15,opt,name=validation,proto3,oneof"`
}
func (*VariableDefinition_By) isVariableDefinition_Expr() {}
func (*VariableDefinition_Map) isVariableDefinition_Expr() {}
func (*VariableDefinition_Message) isVariableDefinition_Expr() {}
func (*VariableDefinition_Call) isVariableDefinition_Expr() {}
func (*VariableDefinition_Validation) isVariableDefinition_Expr() {}
// MapExpr apply map operation for the specified repeated type.
type MapExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// iterator define iterator variable.
// When evaluating CEL in `expr`, we can refer to the name defined in iterator.
Iterator *Iterator `protobuf:"bytes,1,opt,name=iterator,proto3" json:"iterator,omitempty"`
// expr creates map elements using iterator variable.
//
// Types that are assignable to Expr:
//
// *MapExpr_By
// *MapExpr_Message
Expr isMapExpr_Expr `protobuf_oneof:"expr"`
}
func (x *MapExpr) Reset() {
*x = MapExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MapExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MapExpr) ProtoMessage() {}
func (x *MapExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_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 MapExpr.ProtoReflect.Descriptor instead.
func (*MapExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{8}
}
func (x *MapExpr) GetIterator() *Iterator {
if x != nil {
return x.Iterator
}
return nil
}
func (m *MapExpr) GetExpr() isMapExpr_Expr {
if m != nil {
return m.Expr
}
return nil
}
func (x *MapExpr) GetBy() string {
if x, ok := x.GetExpr().(*MapExpr_By); ok {
return x.By
}
return ""
}
func (x *MapExpr) GetMessage() *MessageExpr {
if x, ok := x.GetExpr().(*MapExpr_Message); ok {
return x.Message
}
return nil
}
type isMapExpr_Expr interface {
isMapExpr_Expr()
}
type MapExpr_By struct {
// `by` evaluates with CEL.
// this can refer to the variable declared by `iterator`.
By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"`
}
type MapExpr_Message struct {
// message gets with message arguments, and it is made an element of the map.
// The result type of MapExpr is the repeated type of the specified message.
Message *MessageExpr `protobuf:"bytes,12,opt,name=message,proto3,oneof"`
}
func (*MapExpr_By) isMapExpr_Expr() {}
func (*MapExpr_Message) isMapExpr_Expr() {}
// Iterator represents iterator variable.
type Iterator struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// variable name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// src the value that will be the source for creating the iterator.
// src must be a repeated type.
Src string `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"`
}
func (x *Iterator) Reset() {
*x = Iterator{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Iterator) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Iterator) ProtoMessage() {}
func (x *Iterator) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_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 Iterator.ProtoReflect.Descriptor instead.
func (*Iterator) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{9}
}
func (x *Iterator) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Iterator) GetSrc() string {
if x != nil {
return x.Src
}
return ""
}
// MessageExpr represents dependent message.
type MessageExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// name specify the message name by FQDN. format is `<package-name>.<message-name>`.
// <package-name> can be omitted when referring to messages in the same package.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// args specify the parameters needed to get the message. This is called the "message arguments".
Args []*Argument `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
}
func (x *MessageExpr) Reset() {
*x = MessageExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MessageExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MessageExpr) ProtoMessage() {}
func (x *MessageExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_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 MessageExpr.ProtoReflect.Descriptor instead.
func (*MessageExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{10}
}
func (x *MessageExpr) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *MessageExpr) GetArgs() []*Argument {
if x != nil {
return x.Args
}
return nil
}
// CallExpr represents how to call gRPC method.
type CallExpr struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// method specify the FQDN for the gRPC method. format is `<package-name>.<service-name>/<method-name>`.
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
// request specify request parameters for the gRPC method.
Request []*MethodRequest `protobuf:"bytes,2,rep,name=request,proto3" json:"request,omitempty"`
// the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned.
// If you want to handle this error, you need to implement a custom error handler in Go.
// The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration.
Timeout *string `protobuf:"bytes,3,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"`
// retry specifies the retry policy if the method call fails.
Retry *RetryPolicy `protobuf:"bytes,4,opt,name=retry,proto3,oneof" json:"retry,omitempty"`
// error evaluated when an error occurs during a method call.
// Multiple errors can be defined and are evaluated in the order in which they are described.
// If an error occurs while creating an gRPC status error, original error will be returned.
Error []*GRPCError `protobuf:"bytes,5,rep,name=error,proto3" json:"error,omitempty"`
}
func (x *CallExpr) Reset() {
*x = CallExpr{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CallExpr) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CallExpr) ProtoMessage() {}
func (x *CallExpr) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_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 CallExpr.ProtoReflect.Descriptor instead.
func (*CallExpr) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{11}
}
func (x *CallExpr) GetMethod() string {
if x != nil {
return x.Method
}
return ""
}
func (x *CallExpr) GetRequest() []*MethodRequest {
if x != nil {
return x.Request
}
return nil
}
func (x *CallExpr) GetTimeout() string {
if x != nil && x.Timeout != nil {
return *x.Timeout
}
return ""
}
func (x *CallExpr) GetRetry() *RetryPolicy {
if x != nil {
return x.Retry
}
return nil
}
func (x *CallExpr) GetError() []*GRPCError {
if x != nil {
return x.Error
}
return nil
}
// GRPCError create gRPC status value.
type GRPCError struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"`
// if specifies condition in CEL. If the condition is true, it returns defined error information.
// If this field is omitted, it is always treated as 'true' and returns defined error information.
// The return value must always be of type boolean.
If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"`
// code is a gRPC status code.
Code code.Code `protobuf:"varint,3,opt,name=code,proto3,enum=google.rpc.Code" json:"code,omitempty"`
// message is a gRPC status message.
// If omitted, the message will be auto-generated from the configurations.
Message *string `protobuf:"bytes,4,opt,name=message,proto3,oneof" json:"message,omitempty"`
// details is a list of error details.
// If returns error, the corresponding error details are set.
Details []*GRPCErrorDetail `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"`
// ignore ignore the error if the condition in the "if" field is true and "ignore" field is set to true.
// When an error is ignored, the returned response is always null value.
// If you want to return a response that is not null, please use `ignore_and_response` feature.
// Therefore, `ignore` and `ignore_and_response` cannot be specified same.
Ignore *bool `protobuf:"varint,6,opt,name=ignore,proto3,oneof" json:"ignore,omitempty"`
// ignore_and_response ignore the error if the condition in the "if" field is true and it returns response specified in CEL.
// The evaluation value of CEL must always be the same as the response message type.
// `ignore` and `ignore_and_response` cannot be specified same.
IgnoreAndResponse *string `protobuf:"bytes,7,opt,name=ignore_and_response,json=ignoreAndResponse,proto3,oneof" json:"ignore_and_response,omitempty"`
}
func (x *GRPCError) Reset() {
*x = GRPCError{}
if protoimpl.UnsafeEnabled {
mi := &file_grpc_federation_federation_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GRPCError) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GRPCError) ProtoMessage() {}
func (x *GRPCError) ProtoReflect() protoreflect.Message {
mi := &file_grpc_federation_federation_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 GRPCError.ProtoReflect.Descriptor instead.
func (*GRPCError) Descriptor() ([]byte, []int) {
return file_grpc_federation_federation_proto_rawDescGZIP(), []int{12}
}
func (x *GRPCError) GetDef() []*VariableDefinition {
if x != nil {
return x.Def
}
return nil
}
func (x *GRPCError) GetIf() string {
if x != nil && x.If != nil {
return *x.If
}
return ""
}
func (x *GRPCError) GetCode() code.Code {
if x != nil {
return x.Code
}
return code.Code(0)
}
func (x *GRPCError) GetMessage() string {
if x != nil && x.Message != nil {
return *x.Message
}
return ""
}
func (x *GRPCError) GetDetails() []*GRPCErrorDetail {
if x != nil {
return x.Details
}
return nil
}
func (x *GRPCError) GetIgnore() bool {
if x != nil && x.Ignore != nil {
return *x.Ignore
}
return false
}
func (x *GRPCError) GetIgnoreAndResponse() string {
if x != nil && x.IgnoreAndResponse != nil {
return *x.IgnoreAndResponse
}
return ""
}
type GRPCErrorDetail struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// if specifies condition rule in CEL. If the condition is true, gRPC error detail is added to the error.
If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"`
// def define variables in current scope.
Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"`