-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvalidate.proto
115 lines (100 loc) · 2.44 KB
/
validate.proto
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
syntax = "proto3";
package cel.validate;
option go_package = "github.com/nlachfr/protoc-gen-cel-validate/validate";
import "google/protobuf/descriptor.proto";
message Options {
message Globals {
map<string, string> functions = 1;
map<string, string> constants = 2;
}
message Overloads {
message Type {
enum Primitive {
PRIMITIVE_UNSPECIFIED = 0;
BOOL = 1;
INT = 2;
UINT = 3;
DOUBLE = 4;
BYTES = 5;
STRING = 6;
DURATION = 7;
TIMESTAMP = 8;
ERROR = 9;
DYN = 10;
ANY = 11;
}
message Array {
Type type = 1;
}
message Map {
Type key = 1;
Type value = 2;
}
oneof type {
Primitive primitive = 1;
string object = 2;
Array array = 3;
Map map = 4;
}
}
message Function {
repeated Type args = 1;
Type result = 2;
}
map<string,Function> functions = 1;
map<string,Type> variables = 2;
}
Globals globals = 1;
Overloads overloads = 2;
bool stdlib_overriding_enabled = 3;
}
extend google.protobuf.FileOptions {
FileRule file = 1178;
}
extend google.protobuf.ServiceOptions {
ServiceRule service = 1178;
}
extend google.protobuf.MethodOptions {
MethodRule method = 1178;
}
extend google.protobuf.MessageOptions {
MessageRule message = 1178;
}
extend google.protobuf.FieldOptions {
FieldRule field = 1178;
}
message FileRule {
Options options = 1;
map<string,ServiceRule> service_rules = 2;
map<string,MessageRule> message_rules = 3;
}
message ServiceRule {
Options options = 1;
Rule rule = 2;
map<string,MethodRule> method_rules = 3;
}
message MethodRule {
Rule rule = 1;
}
message MessageRule {
Options options = 1;
Rule rule = 2;
map<string,FieldRule> field_rules = 3;
}
message FieldRule {
Rule rule = 1;
bool required = 2;
}
message Rule {
message Program {
string id = 1;
string expr = 2;
}
Options options = 1;
repeated Program programs = 2;
}
message Configuration {
FileRule rule = 1;
bool required_support_disabled = 2;
bool resource_reference_support_disabled = 3;
}