forked from bufbuild/protoc-gen-validate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfixed64.proto
More file actions
28 lines (21 loc) · 1.35 KB
/
fixed64.proto
File metadata and controls
28 lines (21 loc) · 1.35 KB
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
syntax = "proto3";
package tests.kitchensink;
import "validate/validate.proto";
message Fixed64 {
fixed64 none = 1;
fixed64 lt = 2 [(validate.rules).fixed64.lt = 5]; // x < 5
fixed64 lte = 3 [(validate.rules).fixed64.lte = 5]; // x <= 5
fixed64 gt = 4 [(validate.rules).fixed64.gt = 5]; // x > 5
fixed64 gte = 5 [(validate.rules).fixed64.gte = 5]; // x >= 5
fixed64 lt_gt = 6 [(validate.rules).fixed64 = {gt: 10, lt: 15}]; // x > gt && x < lt
fixed64 lt_gte = 7 [(validate.rules).fixed64 = {gte: 10, lt: 15}]; // x >= gte && x < lt
fixed64 lte_gt = 8 [(validate.rules).fixed64 = {gt: 10, lte: 15}]; // x > gt && x <= lte
fixed64 lte_gte = 9 [(validate.rules).fixed64 = {gte: 10, lte: 15}]; // x >= gte && x <= lte
fixed64 lt_gt_inv = 10 [(validate.rules).fixed64 = {lt: 20, gt: 25}]; // x < lt || x > gt
fixed64 lt_gte_inv = 11 [(validate.rules).fixed64 = {lt: 20, gte: 25}]; // x < lt || x >= gte
fixed64 lte_gt_inv = 12 [(validate.rules).fixed64 = {lte: 20, gt: 25}]; // x <= lte || x > gt
fixed64 lte_gte_inv = 13 [(validate.rules).fixed64 = {lte: 20, gte: 25}]; // x <= lte || x >= gte
fixed64 in = 14 [(validate.rules).fixed64 = {in: [30, 35]}];
fixed64 not_in = 15 [(validate.rules).fixed64 = {not_in: [40, 45]}];
fixed64 const = 16 [(validate.rules).fixed64.const = 50];
}