Source
- acme
- experiment
- v1
flags.proto
editions · edition 2023 · package acme.experiment.v1
1
edition = "2023";2
package acme.experiment.v1;4
import "cybozu/validate/options.proto";6
option go_package = "acme.example/experiment/v1;experimentv1";8
// Feature flags used by the experimental rollout pipeline.9
// This file is compiled as Protobuf Editions 2023 so effective feature10
// inheritance shows up in the generated docs.11
message 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
}22
}24
// Scratch flags that are not validated by generated code.25
message FlagDraft {26
option (cybozu.validate.ignored) = true;27
string name = 1;28
}30
enum FlagState {31
FLAG_STATE_UNSPECIFIED = 0;32
FLAG_STATE_DRAFT = 1;33
FLAG_STATE_LIVE = 2;34
FLAG_STATE_RETIRED = 3;35
}