Source

  1. acme
  2. experiment
  3. v1

flags.proto

editions · edition 2023 · package acme.experiment.v1

1edition = "2023";
2package acme.experiment.v1;
3
4import "cybozu/validate/options.proto";
5
6option go_package = "acme.example/experiment/v1;experimentv1";
7
8// Feature flags used by the experimental rollout pipeline.
9// This file is compiled as Protobuf Editions 2023 so effective feature
10// inheritance shows up in the generated docs.
11message Flag {
12 string id = 1 [(cybozu.validate.rules).string.min_length = 1];
13 string name = 2 [(cybozu.validate.rules).string = { min_length: 1, max_length: 80 }];
14 bool enabled = 3;
15 map<string, string> metadata = 4 [(cybozu.validate.rules).map.max_items = 20];
17 oneof owner {
18 option (cybozu.validate.required) = true;
19 string team = 5;
20 string user = 6 [(cybozu.validate.rules).string.email = true];
21 }
24// Scratch flags that are not validated by generated code.
25message FlagDraft {
26 option (cybozu.validate.ignored) = true;
27 string name = 1;
30enum FlagState {
31 FLAG_STATE_UNSPECIFIED = 0;
32 FLAG_STATE_DRAFT = 1;
33 FLAG_STATE_LIVE = 2;
34 FLAG_STATE_RETIRED = 3;