Documentation
¶
Index ¶
- Variables
- type FeatureOptions
- func (*FeatureOptions) Descriptor() ([]byte, []int)deprecated
- func (x *FeatureOptions) GetDescription() string
- func (x *FeatureOptions) GetId() string
- func (x *FeatureOptions) GetOwner() string
- func (*FeatureOptions) ProtoMessage()
- func (x *FeatureOptions) ProtoReflect() protoreflect.Message
- func (x *FeatureOptions) Reset()
- func (x *FeatureOptions) String() string
- type FlagDefault
- func (*FlagDefault) Descriptor() ([]byte, []int)deprecated
- func (x *FlagDefault) GetBoolValue() *wrapperspb.BoolValue
- func (x *FlagDefault) GetDoubleValue() *wrapperspb.DoubleValue
- func (x *FlagDefault) GetInt64Value() *wrapperspb.Int64Value
- func (x *FlagDefault) GetStringValue() *wrapperspb.StringValue
- func (x *FlagDefault) GetValue() isFlagDefault_Value
- func (*FlagDefault) ProtoMessage()
- func (x *FlagDefault) ProtoReflect() protoreflect.Message
- func (x *FlagDefault) Reset()
- func (x *FlagDefault) String() string
- type FlagDefault_BoolValue
- type FlagDefault_DoubleValue
- type FlagDefault_Int64Value
- type FlagDefault_StringValue
- type FlagOptions
- func (*FlagOptions) Descriptor() ([]byte, []int)deprecated
- func (x *FlagOptions) GetDefault() *FlagDefault
- func (x *FlagOptions) GetDescription() string
- func (x *FlagOptions) GetLayer() string
- func (x *FlagOptions) GetSupportedValues() *SupportedValues
- func (*FlagOptions) ProtoMessage()
- func (x *FlagOptions) ProtoReflect() protoreflect.Message
- func (x *FlagOptions) Reset()
- func (x *FlagOptions) String() string
- type SupportedValues
- func (*SupportedValues) Descriptor() ([]byte, []int)deprecated
- func (x *SupportedValues) GetDoubleValues() []float64
- func (x *SupportedValues) GetInt64Values() []int64
- func (x *SupportedValues) GetStringValues() []string
- func (*SupportedValues) ProtoMessage()
- func (x *SupportedValues) ProtoReflect() protoreflect.Message
- func (x *SupportedValues) Reset()
- func (x *SupportedValues) String() string
Constants ¶
This section is empty.
Variables ¶
var (
// optional pbflags.FeatureOptions feature = 51000;
E_Feature = &file_pbflags_options_proto_extTypes[0]
)
Extension fields to descriptorpb.MessageOptions.
var (
// optional pbflags.FlagOptions flag = 51001;
E_Flag = &file_pbflags_options_proto_extTypes[1]
)
Extension fields to descriptorpb.FieldOptions.
var (
// optional bool layers = 51002;
E_Layers = &file_pbflags_options_proto_extTypes[2]
)
Extension fields to descriptorpb.EnumOptions.
var File_pbflags_options_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type FeatureOptions ¶
type FeatureOptions struct {
// Stable identifier for this feature. Used as the DB primary key.
// MUST be unique across all features. MUST NOT change once set.
// Convention: snake_case, e.g., "notifications", "billing_v2".
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
// Owner team for the feature (for UI grouping / contact).
Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
// contains filtered or unexported fields
}
Applied to a message to mark it as a feature.
func (*FeatureOptions) Descriptor
deprecated
func (*FeatureOptions) Descriptor() ([]byte, []int)
Deprecated: Use FeatureOptions.ProtoReflect.Descriptor instead.
func (*FeatureOptions) GetDescription ¶
func (x *FeatureOptions) GetDescription() string
func (*FeatureOptions) GetId ¶
func (x *FeatureOptions) GetId() string
func (*FeatureOptions) GetOwner ¶
func (x *FeatureOptions) GetOwner() string
func (*FeatureOptions) ProtoMessage ¶
func (*FeatureOptions) ProtoMessage()
func (*FeatureOptions) ProtoReflect ¶
func (x *FeatureOptions) ProtoReflect() protoreflect.Message
func (*FeatureOptions) Reset ¶
func (x *FeatureOptions) Reset()
func (*FeatureOptions) String ¶
func (x *FeatureOptions) String() string
type FlagDefault ¶
type FlagDefault struct {
// Types that are valid to be assigned to Value:
//
// *FlagDefault_BoolValue
// *FlagDefault_StringValue
// *FlagDefault_Int64Value
// *FlagDefault_DoubleValue
Value isFlagDefault_Value `protobuf_oneof:"value"`
// contains filtered or unexported fields
}
Uses wrapper types to distinguish "default is false/0" from "no default set." In proto3, bare bool false and int64 0 are default values and won't serialize in a oneof, making them indistinguishable from "not set."
func (*FlagDefault) Descriptor
deprecated
func (*FlagDefault) Descriptor() ([]byte, []int)
Deprecated: Use FlagDefault.ProtoReflect.Descriptor instead.
func (*FlagDefault) GetBoolValue ¶
func (x *FlagDefault) GetBoolValue() *wrapperspb.BoolValue
func (*FlagDefault) GetDoubleValue ¶
func (x *FlagDefault) GetDoubleValue() *wrapperspb.DoubleValue
func (*FlagDefault) GetInt64Value ¶
func (x *FlagDefault) GetInt64Value() *wrapperspb.Int64Value
func (*FlagDefault) GetStringValue ¶
func (x *FlagDefault) GetStringValue() *wrapperspb.StringValue
func (*FlagDefault) GetValue ¶
func (x *FlagDefault) GetValue() isFlagDefault_Value
func (*FlagDefault) ProtoMessage ¶
func (*FlagDefault) ProtoMessage()
func (*FlagDefault) ProtoReflect ¶
func (x *FlagDefault) ProtoReflect() protoreflect.Message
func (*FlagDefault) Reset ¶
func (x *FlagDefault) Reset()
func (*FlagDefault) String ¶
func (x *FlagDefault) String() string
type FlagDefault_BoolValue ¶
type FlagDefault_BoolValue struct {
BoolValue *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=bool_value,json=boolValue,proto3,oneof"`
}
type FlagDefault_DoubleValue ¶
type FlagDefault_DoubleValue struct {
DoubleValue *wrapperspb.DoubleValue `protobuf:"bytes,4,opt,name=double_value,json=doubleValue,proto3,oneof"`
}
type FlagDefault_Int64Value ¶
type FlagDefault_Int64Value struct {
Int64Value *wrapperspb.Int64Value `protobuf:"bytes,3,opt,name=int64_value,json=int64Value,proto3,oneof"`
}
type FlagDefault_StringValue ¶
type FlagDefault_StringValue struct {
StringValue *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=string_value,json=stringValue,proto3,oneof"`
}
type FlagOptions ¶
type FlagOptions struct {
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
// Default value (type must match the field type).
Default *FlagDefault `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"`
// Suggested values for the UI dropdown. Not enforced at evaluation time.
// Can be overridden in the UI when setting values.
SupportedValues *SupportedValues `protobuf:"bytes,4,opt,name=supported_values,json=supportedValues,proto3" json:"supported_values,omitempty"`
// Override layer name. Must match a value from the enum annotated with
// option (pbflags.layers) = true, using the prefix-stripped, lowercase
// enum value name (e.g., LAYER_ENTITY → "entity").
// Empty or "global" means no per-entity overrides.
Layer string `protobuf:"bytes,5,opt,name=layer,proto3" json:"layer,omitempty"`
// contains filtered or unexported fields
}
Applied to a field to mark it as a flag.
func (*FlagOptions) Descriptor
deprecated
func (*FlagOptions) Descriptor() ([]byte, []int)
Deprecated: Use FlagOptions.ProtoReflect.Descriptor instead.
func (*FlagOptions) GetDefault ¶
func (x *FlagOptions) GetDefault() *FlagDefault
func (*FlagOptions) GetDescription ¶
func (x *FlagOptions) GetDescription() string
func (*FlagOptions) GetLayer ¶
func (x *FlagOptions) GetLayer() string
func (*FlagOptions) GetSupportedValues ¶
func (x *FlagOptions) GetSupportedValues() *SupportedValues
func (*FlagOptions) ProtoMessage ¶
func (*FlagOptions) ProtoMessage()
func (*FlagOptions) ProtoReflect ¶
func (x *FlagOptions) ProtoReflect() protoreflect.Message
func (*FlagOptions) Reset ¶
func (x *FlagOptions) Reset()
func (*FlagOptions) String ¶
func (x *FlagOptions) String() string
type SupportedValues ¶
type SupportedValues struct {
// At most one of these should be populated, matching the flag's field type.
// Validated at schema sync time (not enforced by proto structure).
StringValues []string `protobuf:"bytes,1,rep,name=string_values,json=stringValues,proto3" json:"string_values,omitempty"`
Int64Values []int64 `protobuf:"varint,2,rep,packed,name=int64_values,json=int64Values,proto3" json:"int64_values,omitempty"`
DoubleValues []float64 `protobuf:"fixed64,3,rep,packed,name=double_values,json=doubleValues,proto3" json:"double_values,omitempty"` // (bool flags don't need supported_values — it's always true/false)
// contains filtered or unexported fields
}
func (*SupportedValues) Descriptor
deprecated
func (*SupportedValues) Descriptor() ([]byte, []int)
Deprecated: Use SupportedValues.ProtoReflect.Descriptor instead.
func (*SupportedValues) GetDoubleValues ¶
func (x *SupportedValues) GetDoubleValues() []float64
func (*SupportedValues) GetInt64Values ¶
func (x *SupportedValues) GetInt64Values() []int64
func (*SupportedValues) GetStringValues ¶
func (x *SupportedValues) GetStringValues() []string
func (*SupportedValues) ProtoMessage ¶
func (*SupportedValues) ProtoMessage()
func (*SupportedValues) ProtoReflect ¶
func (x *SupportedValues) ProtoReflect() protoreflect.Message
func (*SupportedValues) Reset ¶
func (x *SupportedValues) Reset()
func (*SupportedValues) String ¶
func (x *SupportedValues) String() string