-
Notifications
You must be signed in to change notification settings - Fork 123
/
base.pb.go
4680 lines (4127 loc) · 162 KB
/
base.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.30.0
// protoc (unknown)
// source: base/v1/base.proto
package basev1
import (
_ "github.com/envoyproxy/protoc-gen-validate/validate"
v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
anypb "google.golang.org/protobuf/types/known/anypb"
structpb "google.golang.org/protobuf/types/known/structpb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
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)
)
// Enumerates results of a check operation.
type CheckResult int32
const (
// Not specified check result. This is the default value.
CheckResult_CHECK_RESULT_UNSPECIFIED CheckResult = 0
// Represents a successful check (the check allowed the operation).
CheckResult_CHECK_RESULT_ALLOWED CheckResult = 1
// Represents a failed check (the check denied the operation).
CheckResult_CHECK_RESULT_DENIED CheckResult = 2
)
// Enum value maps for CheckResult.
var (
CheckResult_name = map[int32]string{
0: "CHECK_RESULT_UNSPECIFIED",
1: "CHECK_RESULT_ALLOWED",
2: "CHECK_RESULT_DENIED",
}
CheckResult_value = map[string]int32{
"CHECK_RESULT_UNSPECIFIED": 0,
"CHECK_RESULT_ALLOWED": 1,
"CHECK_RESULT_DENIED": 2,
}
)
func (x CheckResult) Enum() *CheckResult {
p := new(CheckResult)
*p = x
return p
}
func (x CheckResult) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CheckResult) Descriptor() protoreflect.EnumDescriptor {
return file_base_v1_base_proto_enumTypes[0].Descriptor()
}
func (CheckResult) Type() protoreflect.EnumType {
return &file_base_v1_base_proto_enumTypes[0]
}
func (x CheckResult) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CheckResult.Descriptor instead.
func (CheckResult) EnumDescriptor() ([]byte, []int) {
return file_base_v1_base_proto_rawDescGZIP(), []int{0}
}
// Enumerates the types of attribute.
type AttributeType int32
const (
// Not specified attribute type. This is the default value.
AttributeType_ATTRIBUTE_TYPE_UNSPECIFIED AttributeType = 0
// A boolean attribute type.
AttributeType_ATTRIBUTE_TYPE_BOOLEAN AttributeType = 1
// A boolean array attribute type.
AttributeType_ATTRIBUTE_TYPE_BOOLEAN_ARRAY AttributeType = 2
// A string attribute type.
AttributeType_ATTRIBUTE_TYPE_STRING AttributeType = 3
// A string array attribute type.
AttributeType_ATTRIBUTE_TYPE_STRING_ARRAY AttributeType = 4
// An integer attribute type.
AttributeType_ATTRIBUTE_TYPE_INTEGER AttributeType = 5
// An integer array attribute type.
AttributeType_ATTRIBUTE_TYPE_INTEGER_ARRAY AttributeType = 6
// A double attribute type.
AttributeType_ATTRIBUTE_TYPE_DOUBLE AttributeType = 7
// A double array attribute type.
AttributeType_ATTRIBUTE_TYPE_DOUBLE_ARRAY AttributeType = 8
)
// Enum value maps for AttributeType.
var (
AttributeType_name = map[int32]string{
0: "ATTRIBUTE_TYPE_UNSPECIFIED",
1: "ATTRIBUTE_TYPE_BOOLEAN",
2: "ATTRIBUTE_TYPE_BOOLEAN_ARRAY",
3: "ATTRIBUTE_TYPE_STRING",
4: "ATTRIBUTE_TYPE_STRING_ARRAY",
5: "ATTRIBUTE_TYPE_INTEGER",
6: "ATTRIBUTE_TYPE_INTEGER_ARRAY",
7: "ATTRIBUTE_TYPE_DOUBLE",
8: "ATTRIBUTE_TYPE_DOUBLE_ARRAY",
}
AttributeType_value = map[string]int32{
"ATTRIBUTE_TYPE_UNSPECIFIED": 0,
"ATTRIBUTE_TYPE_BOOLEAN": 1,
"ATTRIBUTE_TYPE_BOOLEAN_ARRAY": 2,
"ATTRIBUTE_TYPE_STRING": 3,
"ATTRIBUTE_TYPE_STRING_ARRAY": 4,
"ATTRIBUTE_TYPE_INTEGER": 5,
"ATTRIBUTE_TYPE_INTEGER_ARRAY": 6,
"ATTRIBUTE_TYPE_DOUBLE": 7,
"ATTRIBUTE_TYPE_DOUBLE_ARRAY": 8,
}
)
func (x AttributeType) Enum() *AttributeType {
p := new(AttributeType)
*p = x
return p
}
func (x AttributeType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (AttributeType) Descriptor() protoreflect.EnumDescriptor {
return file_base_v1_base_proto_enumTypes[1].Descriptor()
}
func (AttributeType) Type() protoreflect.EnumType {
return &file_base_v1_base_proto_enumTypes[1]
}
func (x AttributeType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use AttributeType.Descriptor instead.
func (AttributeType) EnumDescriptor() ([]byte, []int) {
return file_base_v1_base_proto_rawDescGZIP(), []int{1}
}
// Operation enum includes potential rewrite operations.
// OPERATION_UNION: Represents a union operation.
// OPERATION_INTERSECTION: Represents an intersection operation.
// OPERATION_EXCLUSION: Represents an exclusion operation.
type Rewrite_Operation int32
const (
Rewrite_OPERATION_UNSPECIFIED Rewrite_Operation = 0 // Default, unspecified operation.
Rewrite_OPERATION_UNION Rewrite_Operation = 1 // Represents a union operation.
Rewrite_OPERATION_INTERSECTION Rewrite_Operation = 2 // Represents an intersection operation.
Rewrite_OPERATION_EXCLUSION Rewrite_Operation = 3 // Represents an exclusion operation.
)
// Enum value maps for Rewrite_Operation.
var (
Rewrite_Operation_name = map[int32]string{
0: "OPERATION_UNSPECIFIED",
1: "OPERATION_UNION",
2: "OPERATION_INTERSECTION",
3: "OPERATION_EXCLUSION",
}
Rewrite_Operation_value = map[string]int32{
"OPERATION_UNSPECIFIED": 0,
"OPERATION_UNION": 1,
"OPERATION_INTERSECTION": 2,
"OPERATION_EXCLUSION": 3,
}
)
func (x Rewrite_Operation) Enum() *Rewrite_Operation {
p := new(Rewrite_Operation)
*p = x
return p
}
func (x Rewrite_Operation) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Rewrite_Operation) Descriptor() protoreflect.EnumDescriptor {
return file_base_v1_base_proto_enumTypes[2].Descriptor()
}
func (Rewrite_Operation) Type() protoreflect.EnumType {
return &file_base_v1_base_proto_enumTypes[2]
}
func (x Rewrite_Operation) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Rewrite_Operation.Descriptor instead.
func (Rewrite_Operation) EnumDescriptor() ([]byte, []int) {
return file_base_v1_base_proto_rawDescGZIP(), []int{3, 0}
}
// The Reference enum helps distinguish whether a name corresponds to an entity or a rule.
type SchemaDefinition_Reference int32
const (
SchemaDefinition_REFERENCE_UNSPECIFIED SchemaDefinition_Reference = 0 // Default, unspecified reference.
SchemaDefinition_REFERENCE_ENTITY SchemaDefinition_Reference = 1 // Indicates that the name refers to an entity.
SchemaDefinition_REFERENCE_RULE SchemaDefinition_Reference = 2 // Indicates that the name refers to a rule.
)
// Enum value maps for SchemaDefinition_Reference.
var (
SchemaDefinition_Reference_name = map[int32]string{
0: "REFERENCE_UNSPECIFIED",
1: "REFERENCE_ENTITY",
2: "REFERENCE_RULE",
}
SchemaDefinition_Reference_value = map[string]int32{
"REFERENCE_UNSPECIFIED": 0,
"REFERENCE_ENTITY": 1,
"REFERENCE_RULE": 2,
}
)
func (x SchemaDefinition_Reference) Enum() *SchemaDefinition_Reference {
p := new(SchemaDefinition_Reference)
*p = x
return p
}
func (x SchemaDefinition_Reference) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SchemaDefinition_Reference) Descriptor() protoreflect.EnumDescriptor {
return file_base_v1_base_proto_enumTypes[3].Descriptor()
}
func (SchemaDefinition_Reference) Type() protoreflect.EnumType {
return &file_base_v1_base_proto_enumTypes[3]
}
func (x SchemaDefinition_Reference) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SchemaDefinition_Reference.Descriptor instead.
func (SchemaDefinition_Reference) EnumDescriptor() ([]byte, []int) {
return file_base_v1_base_proto_rawDescGZIP(), []int{4, 0}
}
// The Reference enum specifies whether a name pertains to a relation, permission, or attribute.
type EntityDefinition_Reference int32
const (
EntityDefinition_REFERENCE_UNSPECIFIED EntityDefinition_Reference = 0 // Default, unspecified reference.
EntityDefinition_REFERENCE_RELATION EntityDefinition_Reference = 1 // Indicates that the name refers to a relation.
EntityDefinition_REFERENCE_PERMISSION EntityDefinition_Reference = 2 // Indicates that the name refers to a permission.
EntityDefinition_REFERENCE_ATTRIBUTE EntityDefinition_Reference = 3 // Indicates that the name refers to an attribute.
)
// Enum value maps for EntityDefinition_Reference.
var (
EntityDefinition_Reference_name = map[int32]string{
0: "REFERENCE_UNSPECIFIED",
1: "REFERENCE_RELATION",
2: "REFERENCE_PERMISSION",
3: "REFERENCE_ATTRIBUTE",
}
EntityDefinition_Reference_value = map[string]int32{
"REFERENCE_UNSPECIFIED": 0,
"REFERENCE_RELATION": 1,
"REFERENCE_PERMISSION": 2,
"REFERENCE_ATTRIBUTE": 3,
}
)
func (x EntityDefinition_Reference) Enum() *EntityDefinition_Reference {
p := new(EntityDefinition_Reference)
*p = x
return p
}
func (x EntityDefinition_Reference) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (EntityDefinition_Reference) Descriptor() protoreflect.EnumDescriptor {
return file_base_v1_base_proto_enumTypes[4].Descriptor()
}
func (EntityDefinition_Reference) Type() protoreflect.EnumType {
return &file_base_v1_base_proto_enumTypes[4]
}
func (x EntityDefinition_Reference) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use EntityDefinition_Reference.Descriptor instead.
func (EntityDefinition_Reference) EnumDescriptor() ([]byte, []int) {
return file_base_v1_base_proto_rawDescGZIP(), []int{5, 0}
}
// Operation is an enum representing the type of operation to be applied on the tree node.
type ExpandTreeNode_Operation int32
const (
ExpandTreeNode_OPERATION_UNSPECIFIED ExpandTreeNode_Operation = 0
ExpandTreeNode_OPERATION_UNION ExpandTreeNode_Operation = 1
ExpandTreeNode_OPERATION_INTERSECTION ExpandTreeNode_Operation = 2
ExpandTreeNode_OPERATION_EXCLUSION ExpandTreeNode_Operation = 3
)
// Enum value maps for ExpandTreeNode_Operation.
var (
ExpandTreeNode_Operation_name = map[int32]string{
0: "OPERATION_UNSPECIFIED",
1: "OPERATION_UNION",
2: "OPERATION_INTERSECTION",
3: "OPERATION_EXCLUSION",
}
ExpandTreeNode_Operation_value = map[string]int32{
"OPERATION_UNSPECIFIED": 0,
"OPERATION_UNION": 1,
"OPERATION_INTERSECTION": 2,
"OPERATION_EXCLUSION": 3,
}
)
func (x ExpandTreeNode_Operation) Enum() *ExpandTreeNode_Operation {
p := new(ExpandTreeNode_Operation)
*p = x
return p
}
func (x ExpandTreeNode_Operation) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ExpandTreeNode_Operation) Descriptor() protoreflect.EnumDescriptor {
return file_base_v1_base_proto_enumTypes[5].Descriptor()
}
func (ExpandTreeNode_Operation) Type() protoreflect.EnumType {
return &file_base_v1_base_proto_enumTypes[5]
}
func (x ExpandTreeNode_Operation) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ExpandTreeNode_Operation.Descriptor instead.
func (ExpandTreeNode_Operation) EnumDescriptor() ([]byte, []int) {
return file_base_v1_base_proto_rawDescGZIP(), []int{29, 0}
}
type DataChange_Operation int32
const (
DataChange_OPERATION_UNSPECIFIED DataChange_Operation = 0 // Default operation, not specified.
DataChange_OPERATION_CREATE DataChange_Operation = 1 // Creation operation.
DataChange_OPERATION_DELETE DataChange_Operation = 2 // Deletion operation.
)
// Enum value maps for DataChange_Operation.
var (
DataChange_Operation_name = map[int32]string{
0: "OPERATION_UNSPECIFIED",
1: "OPERATION_CREATE",
2: "OPERATION_DELETE",
}
DataChange_Operation_value = map[string]int32{
"OPERATION_UNSPECIFIED": 0,
"OPERATION_CREATE": 1,
"OPERATION_DELETE": 2,
}
)
func (x DataChange_Operation) Enum() *DataChange_Operation {
p := new(DataChange_Operation)
*p = x
return p
}
func (x DataChange_Operation) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (DataChange_Operation) Descriptor() protoreflect.EnumDescriptor {
return file_base_v1_base_proto_enumTypes[6].Descriptor()
}
func (DataChange_Operation) Type() protoreflect.EnumType {
return &file_base_v1_base_proto_enumTypes[6]
}
func (x DataChange_Operation) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use DataChange_Operation.Descriptor instead.
func (DataChange_Operation) EnumDescriptor() ([]byte, []int) {
return file_base_v1_base_proto_rawDescGZIP(), []int{36, 0}
}
// Context encapsulates the information related to a single operation,
// including the tuples involved and the associated attributes.
type Context struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A repeated field of tuples involved in the operation.
Tuples []*Tuple `protobuf:"bytes,1,rep,name=tuples,proto3" json:"tuples,omitempty"`
// A repeated field of attributes associated with the operation.
Attributes []*Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
// Additional data associated with the context.
Data *structpb.Struct `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
}
func (x *Context) Reset() {
*x = Context{}
if protoimpl.UnsafeEnabled {
mi := &file_base_v1_base_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Context) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Context) ProtoMessage() {}
func (x *Context) ProtoReflect() protoreflect.Message {
mi := &file_base_v1_base_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 Context.ProtoReflect.Descriptor instead.
func (*Context) Descriptor() ([]byte, []int) {
return file_base_v1_base_proto_rawDescGZIP(), []int{0}
}
func (x *Context) GetTuples() []*Tuple {
if x != nil {
return x.Tuples
}
return nil
}
func (x *Context) GetAttributes() []*Attribute {
if x != nil {
return x.Attributes
}
return nil
}
func (x *Context) GetData() *structpb.Struct {
if x != nil {
return x.Data
}
return nil
}
// Child represents a node in the permission tree.
type Child struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Child node can be either a leaf or a rewrite operation.
//
// Types that are assignable to Type:
//
// *Child_Leaf
// *Child_Rewrite
Type isChild_Type `protobuf_oneof:"type"`
}
func (x *Child) Reset() {
*x = Child{}
if protoimpl.UnsafeEnabled {
mi := &file_base_v1_base_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Child) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Child) ProtoMessage() {}
func (x *Child) ProtoReflect() protoreflect.Message {
mi := &file_base_v1_base_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 Child.ProtoReflect.Descriptor instead.
func (*Child) Descriptor() ([]byte, []int) {
return file_base_v1_base_proto_rawDescGZIP(), []int{1}
}
func (m *Child) GetType() isChild_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *Child) GetLeaf() *Leaf {
if x, ok := x.GetType().(*Child_Leaf); ok {
return x.Leaf
}
return nil
}
func (x *Child) GetRewrite() *Rewrite {
if x, ok := x.GetType().(*Child_Rewrite); ok {
return x.Rewrite
}
return nil
}
type isChild_Type interface {
isChild_Type()
}
type Child_Leaf struct {
// Leaf node in the permission tree.
Leaf *Leaf `protobuf:"bytes,1,opt,name=leaf,proto3,oneof"`
}
type Child_Rewrite struct {
// Rewrite operation in the permission tree.
Rewrite *Rewrite `protobuf:"bytes,2,opt,name=rewrite,proto3,oneof"`
}
func (*Child_Leaf) isChild_Type() {}
func (*Child_Rewrite) isChild_Type() {}
// Leaf represents a leaf node in the permission tree.
type Leaf struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Leaf node can be one of several types.
//
// Types that are assignable to Type:
//
// *Leaf_ComputedUserSet
// *Leaf_TupleToUserSet
// *Leaf_ComputedAttribute
// *Leaf_Call
Type isLeaf_Type `protobuf_oneof:"type"`
}
func (x *Leaf) Reset() {
*x = Leaf{}
if protoimpl.UnsafeEnabled {
mi := &file_base_v1_base_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Leaf) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Leaf) ProtoMessage() {}
func (x *Leaf) ProtoReflect() protoreflect.Message {
mi := &file_base_v1_base_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 Leaf.ProtoReflect.Descriptor instead.
func (*Leaf) Descriptor() ([]byte, []int) {
return file_base_v1_base_proto_rawDescGZIP(), []int{2}
}
func (m *Leaf) GetType() isLeaf_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *Leaf) GetComputedUserSet() *ComputedUserSet {
if x, ok := x.GetType().(*Leaf_ComputedUserSet); ok {
return x.ComputedUserSet
}
return nil
}
func (x *Leaf) GetTupleToUserSet() *TupleToUserSet {
if x, ok := x.GetType().(*Leaf_TupleToUserSet); ok {
return x.TupleToUserSet
}
return nil
}
func (x *Leaf) GetComputedAttribute() *ComputedAttribute {
if x, ok := x.GetType().(*Leaf_ComputedAttribute); ok {
return x.ComputedAttribute
}
return nil
}
func (x *Leaf) GetCall() *Call {
if x, ok := x.GetType().(*Leaf_Call); ok {
return x.Call
}
return nil
}
type isLeaf_Type interface {
isLeaf_Type()
}
type Leaf_ComputedUserSet struct {
// A computed set of users.
ComputedUserSet *ComputedUserSet `protobuf:"bytes,1,opt,name=computed_user_set,json=computedUserSet,proto3,oneof"`
}
type Leaf_TupleToUserSet struct {
// A tuple to user set conversion.
TupleToUserSet *TupleToUserSet `protobuf:"bytes,2,opt,name=tuple_to_user_set,json=tupleToUserSet,proto3,oneof"`
}
type Leaf_ComputedAttribute struct {
// A computed attribute.
ComputedAttribute *ComputedAttribute `protobuf:"bytes,3,opt,name=computed_attribute,json=computedAttribute,proto3,oneof"`
}
type Leaf_Call struct {
// A call to a function or method.
Call *Call `protobuf:"bytes,4,opt,name=call,proto3,oneof"`
}
func (*Leaf_ComputedUserSet) isLeaf_Type() {}
func (*Leaf_TupleToUserSet) isLeaf_Type() {}
func (*Leaf_ComputedAttribute) isLeaf_Type() {}
func (*Leaf_Call) isLeaf_Type() {}
// The Rewrite message represents a specific rewrite operation.
// This operation could be one of the following: union, intersection, or exclusion.
type Rewrite struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The type of rewrite operation to be performed.
RewriteOperation Rewrite_Operation `protobuf:"varint,1,opt,name=rewrite_operation,json=rewriteOperation,proto3,enum=base.v1.Rewrite_Operation" json:"rewrite_operation,omitempty"`
// A list of children that are operated upon by the rewrite operation.
Children []*Child `protobuf:"bytes,2,rep,name=children,proto3" json:"children,omitempty"`
}
func (x *Rewrite) Reset() {
*x = Rewrite{}
if protoimpl.UnsafeEnabled {
mi := &file_base_v1_base_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Rewrite) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Rewrite) ProtoMessage() {}
func (x *Rewrite) ProtoReflect() protoreflect.Message {
mi := &file_base_v1_base_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 Rewrite.ProtoReflect.Descriptor instead.
func (*Rewrite) Descriptor() ([]byte, []int) {
return file_base_v1_base_proto_rawDescGZIP(), []int{3}
}
func (x *Rewrite) GetRewriteOperation() Rewrite_Operation {
if x != nil {
return x.RewriteOperation
}
return Rewrite_OPERATION_UNSPECIFIED
}
func (x *Rewrite) GetChildren() []*Child {
if x != nil {
return x.Children
}
return nil
}
// The SchemaDefinition message provides definitions for entities and rules,
// and includes references to clarify whether a name refers to an entity or a rule.
type SchemaDefinition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map of entity definitions. The key is the entity name, and the value is the corresponding EntityDefinition.
EntityDefinitions map[string]*EntityDefinition `protobuf:"bytes,1,rep,name=entity_definitions,json=entityDefinitions,proto3" json:"entity_definitions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Map of rule definitions. The key is the rule name, and the value is the corresponding RuleDefinition.
RuleDefinitions map[string]*RuleDefinition `protobuf:"bytes,2,rep,name=rule_definitions,json=ruleDefinitions,proto3" json:"rule_definitions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Map of references to signify whether a string refers to an entity or a rule.
References map[string]SchemaDefinition_Reference `protobuf:"bytes,3,rep,name=references,proto3" json:"references,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=base.v1.SchemaDefinition_Reference"`
}
func (x *SchemaDefinition) Reset() {
*x = SchemaDefinition{}
if protoimpl.UnsafeEnabled {
mi := &file_base_v1_base_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SchemaDefinition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SchemaDefinition) ProtoMessage() {}
func (x *SchemaDefinition) ProtoReflect() protoreflect.Message {
mi := &file_base_v1_base_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 SchemaDefinition.ProtoReflect.Descriptor instead.
func (*SchemaDefinition) Descriptor() ([]byte, []int) {
return file_base_v1_base_proto_rawDescGZIP(), []int{4}
}
func (x *SchemaDefinition) GetEntityDefinitions() map[string]*EntityDefinition {
if x != nil {
return x.EntityDefinitions
}
return nil
}
func (x *SchemaDefinition) GetRuleDefinitions() map[string]*RuleDefinition {
if x != nil {
return x.RuleDefinitions
}
return nil
}
func (x *SchemaDefinition) GetReferences() map[string]SchemaDefinition_Reference {
if x != nil {
return x.References
}
return nil
}
// The EntityDefinition message provides detailed information about a specific entity.
type EntityDefinition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The name of the entity, which follows a specific string pattern and has a maximum byte size.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Map of relation definitions within this entity. The key is the relation name, and the value is the RelationDefinition.
Relations map[string]*RelationDefinition `protobuf:"bytes,2,rep,name=relations,proto3" json:"relations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Map of permission definitions within this entity. The key is the permission name, and the value is the PermissionDefinition.
Permissions map[string]*PermissionDefinition `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Map of attribute definitions within this entity. The key is the attribute name, and the value is the AttributeDefinition.
Attributes map[string]*AttributeDefinition `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Map of references indicating whether a string pertains to a relation, permission, or attribute.
References map[string]EntityDefinition_Reference `protobuf:"bytes,5,rep,name=references,proto3" json:"references,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=base.v1.EntityDefinition_Reference"`
}
func (x *EntityDefinition) Reset() {
*x = EntityDefinition{}
if protoimpl.UnsafeEnabled {
mi := &file_base_v1_base_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EntityDefinition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EntityDefinition) ProtoMessage() {}
func (x *EntityDefinition) ProtoReflect() protoreflect.Message {
mi := &file_base_v1_base_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 EntityDefinition.ProtoReflect.Descriptor instead.
func (*EntityDefinition) Descriptor() ([]byte, []int) {
return file_base_v1_base_proto_rawDescGZIP(), []int{5}
}
func (x *EntityDefinition) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *EntityDefinition) GetRelations() map[string]*RelationDefinition {
if x != nil {
return x.Relations
}
return nil
}
func (x *EntityDefinition) GetPermissions() map[string]*PermissionDefinition {
if x != nil {
return x.Permissions
}
return nil
}
func (x *EntityDefinition) GetAttributes() map[string]*AttributeDefinition {
if x != nil {
return x.Attributes
}
return nil
}
func (x *EntityDefinition) GetReferences() map[string]EntityDefinition_Reference {
if x != nil {
return x.References
}
return nil
}
// The RuleDefinition message provides detailed information about a specific rule.
type RuleDefinition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The name of the rule, which follows a specific string pattern and has a maximum byte size.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Map of arguments for this rule. The key is the attribute name, and the value is the AttributeType.
Arguments map[string]AttributeType `protobuf:"bytes,2,rep,name=arguments,proto3" json:"arguments,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=base.v1.AttributeType"`
// The expression for this rule in the form of a google.api.expr.v1alpha1.CheckedExpr.
Expression *v1alpha1.CheckedExpr `protobuf:"bytes,3,opt,name=expression,proto3" json:"expression,omitempty"`
}
func (x *RuleDefinition) Reset() {
*x = RuleDefinition{}
if protoimpl.UnsafeEnabled {
mi := &file_base_v1_base_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RuleDefinition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RuleDefinition) ProtoMessage() {}
func (x *RuleDefinition) ProtoReflect() protoreflect.Message {
mi := &file_base_v1_base_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 RuleDefinition.ProtoReflect.Descriptor instead.
func (*RuleDefinition) Descriptor() ([]byte, []int) {
return file_base_v1_base_proto_rawDescGZIP(), []int{6}
}
func (x *RuleDefinition) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *RuleDefinition) GetArguments() map[string]AttributeType {
if x != nil {
return x.Arguments
}
return nil
}
func (x *RuleDefinition) GetExpression() *v1alpha1.CheckedExpr {
if x != nil {
return x.Expression
}
return nil
}
// The AttributeDefinition message provides detailed information about a specific attribute.
type AttributeDefinition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The name of the attribute, which follows a specific string pattern and has a maximum byte size.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The type of the attribute.
Type AttributeType `protobuf:"varint,2,opt,name=type,proto3,enum=base.v1.AttributeType" json:"type,omitempty"`
}
func (x *AttributeDefinition) Reset() {
*x = AttributeDefinition{}
if protoimpl.UnsafeEnabled {
mi := &file_base_v1_base_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AttributeDefinition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AttributeDefinition) ProtoMessage() {}
func (x *AttributeDefinition) ProtoReflect() protoreflect.Message {
mi := &file_base_v1_base_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)