Documentation
¶
Index ¶
- Variables
- type ContextOptions
- type DimensionOptions
- func (*DimensionOptions) Descriptor() ([]byte, []int)deprecated
- func (x *DimensionOptions) GetBounded() bool
- func (x *DimensionOptions) GetDescription() string
- func (x *DimensionOptions) GetHashable() bool
- func (*DimensionOptions) ProtoMessage()
- func (x *DimensionOptions) ProtoReflect() protoreflect.Message
- func (x *DimensionOptions) Reset()
- func (x *DimensionOptions) String() string
- 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) GetBoolListValue() *FlagDefaultBoolList
- func (x *FlagDefault) GetBoolValue() *wrapperspb.BoolValue
- func (x *FlagDefault) GetDoubleListValue() *FlagDefaultDoubleList
- func (x *FlagDefault) GetDoubleValue() *wrapperspb.DoubleValue
- func (x *FlagDefault) GetInt64ListValue() *FlagDefaultInt64List
- func (x *FlagDefault) GetInt64Value() *wrapperspb.Int64Value
- func (x *FlagDefault) GetStringListValue() *FlagDefaultStringList
- 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 FlagDefaultBoolList
- func (*FlagDefaultBoolList) Descriptor() ([]byte, []int)deprecated
- func (x *FlagDefaultBoolList) GetValues() []bool
- func (*FlagDefaultBoolList) ProtoMessage()
- func (x *FlagDefaultBoolList) ProtoReflect() protoreflect.Message
- func (x *FlagDefaultBoolList) Reset()
- func (x *FlagDefaultBoolList) String() string
- type FlagDefaultDoubleList
- func (*FlagDefaultDoubleList) Descriptor() ([]byte, []int)deprecated
- func (x *FlagDefaultDoubleList) GetValues() []float64
- func (*FlagDefaultDoubleList) ProtoMessage()
- func (x *FlagDefaultDoubleList) ProtoReflect() protoreflect.Message
- func (x *FlagDefaultDoubleList) Reset()
- func (x *FlagDefaultDoubleList) String() string
- type FlagDefaultInt64List
- func (*FlagDefaultInt64List) Descriptor() ([]byte, []int)deprecated
- func (x *FlagDefaultInt64List) GetValues() []int64
- func (*FlagDefaultInt64List) ProtoMessage()
- func (x *FlagDefaultInt64List) ProtoReflect() protoreflect.Message
- func (x *FlagDefaultInt64List) Reset()
- func (x *FlagDefaultInt64List) String() string
- type FlagDefaultStringList
- func (*FlagDefaultStringList) Descriptor() ([]byte, []int)deprecated
- func (x *FlagDefaultStringList) GetValues() []string
- func (*FlagDefaultStringList) ProtoMessage()
- func (x *FlagDefaultStringList) ProtoReflect() protoreflect.Message
- func (x *FlagDefaultStringList) Reset()
- func (x *FlagDefaultStringList) String() string
- type FlagDefault_BoolListValue
- type FlagDefault_BoolValue
- type FlagDefault_DoubleListValue
- type FlagDefault_DoubleValue
- type FlagDefault_Int64ListValue
- type FlagDefault_Int64Value
- type FlagDefault_StringListValue
- type FlagDefault_StringValue
- type FlagOptions
- func (*FlagOptions) Descriptor() ([]byte, []int)deprecated
- func (x *FlagOptions) GetDefault() *FlagDefault
- func (x *FlagOptions) GetDescription() 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] // optional pbflags.ContextOptions context = 51003; E_Context = &file_pbflags_options_proto_extTypes[1] )
Extension fields to descriptorpb.MessageOptions.
var ( // optional pbflags.FlagOptions flag = 51001; E_Flag = &file_pbflags_options_proto_extTypes[2] // optional pbflags.DimensionOptions dimension = 51004; E_Dimension = &file_pbflags_options_proto_extTypes[3] )
Extension fields to descriptorpb.FieldOptions.
var File_pbflags_options_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type ContextOptions ¶ added in v0.15.0
type ContextOptions struct {
// contains filtered or unexported fields
}
Applied to a message to mark it as the evaluation context. Exactly one message in the input files must carry this annotation. Each field defines a context dimension (string, enum, bool, or int64).
func (*ContextOptions) Descriptor
deprecated
added in
v0.15.0
func (*ContextOptions) Descriptor() ([]byte, []int)
Deprecated: Use ContextOptions.ProtoReflect.Descriptor instead.
func (*ContextOptions) ProtoMessage ¶ added in v0.15.0
func (*ContextOptions) ProtoMessage()
func (*ContextOptions) ProtoReflect ¶ added in v0.15.0
func (x *ContextOptions) ProtoReflect() protoreflect.Message
func (*ContextOptions) Reset ¶ added in v0.15.0
func (x *ContextOptions) Reset()
func (*ContextOptions) String ¶ added in v0.15.0
func (x *ContextOptions) String() string
type DimensionOptions ¶ added in v0.15.0
type DimensionOptions struct {
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
// Whether this dimension can be used for percentage-based hashing
// (launches, experiments). Typically true for stable identifiers
// like user_id, false for attributes like plan or device_type.
Hashable bool `protobuf:"varint,2,opt,name=hashable,proto3" json:"hashable,omitempty"`
// Explicitly declare a string or int64 dimension as having bounded
// cardinality. Enum and bool dimensions are inherently bounded.
// String and int64 dimensions are unbounded by default.
Bounded bool `protobuf:"varint,3,opt,name=bounded,proto3" json:"bounded,omitempty"`
// contains filtered or unexported fields
}
Applied to a field within the context message to define a dimension.
func (*DimensionOptions) Descriptor
deprecated
added in
v0.15.0
func (*DimensionOptions) Descriptor() ([]byte, []int)
Deprecated: Use DimensionOptions.ProtoReflect.Descriptor instead.
func (*DimensionOptions) GetBounded ¶ added in v0.15.0
func (x *DimensionOptions) GetBounded() bool
func (*DimensionOptions) GetDescription ¶ added in v0.15.0
func (x *DimensionOptions) GetDescription() string
func (*DimensionOptions) GetHashable ¶ added in v0.15.0
func (x *DimensionOptions) GetHashable() bool
func (*DimensionOptions) ProtoMessage ¶ added in v0.15.0
func (*DimensionOptions) ProtoMessage()
func (*DimensionOptions) ProtoReflect ¶ added in v0.15.0
func (x *DimensionOptions) ProtoReflect() protoreflect.Message
func (*DimensionOptions) Reset ¶ added in v0.15.0
func (x *DimensionOptions) Reset()
func (*DimensionOptions) String ¶ added in v0.15.0
func (x *DimensionOptions) String() string
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
// *FlagDefault_BoolListValue
// *FlagDefault_StringListValue
// *FlagDefault_Int64ListValue
// *FlagDefault_DoubleListValue
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) GetBoolListValue ¶ added in v0.11.0
func (x *FlagDefault) GetBoolListValue() *FlagDefaultBoolList
func (*FlagDefault) GetBoolValue ¶
func (x *FlagDefault) GetBoolValue() *wrapperspb.BoolValue
func (*FlagDefault) GetDoubleListValue ¶ added in v0.11.0
func (x *FlagDefault) GetDoubleListValue() *FlagDefaultDoubleList
func (*FlagDefault) GetDoubleValue ¶
func (x *FlagDefault) GetDoubleValue() *wrapperspb.DoubleValue
func (*FlagDefault) GetInt64ListValue ¶ added in v0.11.0
func (x *FlagDefault) GetInt64ListValue() *FlagDefaultInt64List
func (*FlagDefault) GetInt64Value ¶
func (x *FlagDefault) GetInt64Value() *wrapperspb.Int64Value
func (*FlagDefault) GetStringListValue ¶ added in v0.11.0
func (x *FlagDefault) GetStringListValue() *FlagDefaultStringList
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 FlagDefaultBoolList ¶ added in v0.11.0
type FlagDefaultBoolList struct {
Values []bool `protobuf:"varint,1,rep,packed,name=values,proto3" json:"values,omitempty"`
// contains filtered or unexported fields
}
List wrapper messages for FlagDefault. These are structurally identical to the v1.BoolList/StringList/etc. messages but defined here to avoid an import cycle (v1/admin.proto already imports this package).
func (*FlagDefaultBoolList) Descriptor
deprecated
added in
v0.11.0
func (*FlagDefaultBoolList) Descriptor() ([]byte, []int)
Deprecated: Use FlagDefaultBoolList.ProtoReflect.Descriptor instead.
func (*FlagDefaultBoolList) GetValues ¶ added in v0.11.0
func (x *FlagDefaultBoolList) GetValues() []bool
func (*FlagDefaultBoolList) ProtoMessage ¶ added in v0.11.0
func (*FlagDefaultBoolList) ProtoMessage()
func (*FlagDefaultBoolList) ProtoReflect ¶ added in v0.11.0
func (x *FlagDefaultBoolList) ProtoReflect() protoreflect.Message
func (*FlagDefaultBoolList) Reset ¶ added in v0.11.0
func (x *FlagDefaultBoolList) Reset()
func (*FlagDefaultBoolList) String ¶ added in v0.11.0
func (x *FlagDefaultBoolList) String() string
type FlagDefaultDoubleList ¶ added in v0.11.0
type FlagDefaultDoubleList struct {
Values []float64 `protobuf:"fixed64,1,rep,packed,name=values,proto3" json:"values,omitempty"`
// contains filtered or unexported fields
}
func (*FlagDefaultDoubleList) Descriptor
deprecated
added in
v0.11.0
func (*FlagDefaultDoubleList) Descriptor() ([]byte, []int)
Deprecated: Use FlagDefaultDoubleList.ProtoReflect.Descriptor instead.
func (*FlagDefaultDoubleList) GetValues ¶ added in v0.11.0
func (x *FlagDefaultDoubleList) GetValues() []float64
func (*FlagDefaultDoubleList) ProtoMessage ¶ added in v0.11.0
func (*FlagDefaultDoubleList) ProtoMessage()
func (*FlagDefaultDoubleList) ProtoReflect ¶ added in v0.11.0
func (x *FlagDefaultDoubleList) ProtoReflect() protoreflect.Message
func (*FlagDefaultDoubleList) Reset ¶ added in v0.11.0
func (x *FlagDefaultDoubleList) Reset()
func (*FlagDefaultDoubleList) String ¶ added in v0.11.0
func (x *FlagDefaultDoubleList) String() string
type FlagDefaultInt64List ¶ added in v0.11.0
type FlagDefaultInt64List struct {
Values []int64 `protobuf:"varint,1,rep,packed,name=values,proto3" json:"values,omitempty"`
// contains filtered or unexported fields
}
func (*FlagDefaultInt64List) Descriptor
deprecated
added in
v0.11.0
func (*FlagDefaultInt64List) Descriptor() ([]byte, []int)
Deprecated: Use FlagDefaultInt64List.ProtoReflect.Descriptor instead.
func (*FlagDefaultInt64List) GetValues ¶ added in v0.11.0
func (x *FlagDefaultInt64List) GetValues() []int64
func (*FlagDefaultInt64List) ProtoMessage ¶ added in v0.11.0
func (*FlagDefaultInt64List) ProtoMessage()
func (*FlagDefaultInt64List) ProtoReflect ¶ added in v0.11.0
func (x *FlagDefaultInt64List) ProtoReflect() protoreflect.Message
func (*FlagDefaultInt64List) Reset ¶ added in v0.11.0
func (x *FlagDefaultInt64List) Reset()
func (*FlagDefaultInt64List) String ¶ added in v0.11.0
func (x *FlagDefaultInt64List) String() string
type FlagDefaultStringList ¶ added in v0.11.0
type FlagDefaultStringList struct {
Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
// contains filtered or unexported fields
}
func (*FlagDefaultStringList) Descriptor
deprecated
added in
v0.11.0
func (*FlagDefaultStringList) Descriptor() ([]byte, []int)
Deprecated: Use FlagDefaultStringList.ProtoReflect.Descriptor instead.
func (*FlagDefaultStringList) GetValues ¶ added in v0.11.0
func (x *FlagDefaultStringList) GetValues() []string
func (*FlagDefaultStringList) ProtoMessage ¶ added in v0.11.0
func (*FlagDefaultStringList) ProtoMessage()
func (*FlagDefaultStringList) ProtoReflect ¶ added in v0.11.0
func (x *FlagDefaultStringList) ProtoReflect() protoreflect.Message
func (*FlagDefaultStringList) Reset ¶ added in v0.11.0
func (x *FlagDefaultStringList) Reset()
func (*FlagDefaultStringList) String ¶ added in v0.11.0
func (x *FlagDefaultStringList) String() string
type FlagDefault_BoolListValue ¶ added in v0.11.0
type FlagDefault_BoolListValue struct {
// List defaults — use types from this package to avoid import cycle
// (v1/admin.proto imports pbflags/options.proto, so options.proto
// cannot import v1/types.proto).
BoolListValue *FlagDefaultBoolList `protobuf:"bytes,5,opt,name=bool_list_value,json=boolListValue,proto3,oneof"`
}
type FlagDefault_BoolValue ¶
type FlagDefault_BoolValue struct {
BoolValue *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=bool_value,json=boolValue,proto3,oneof"`
}
type FlagDefault_DoubleListValue ¶ added in v0.11.0
type FlagDefault_DoubleListValue struct {
DoubleListValue *FlagDefaultDoubleList `protobuf:"bytes,8,opt,name=double_list_value,json=doubleListValue,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_Int64ListValue ¶ added in v0.11.0
type FlagDefault_Int64ListValue struct {
Int64ListValue *FlagDefaultInt64List `protobuf:"bytes,7,opt,name=int64_list_value,json=int64ListValue,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_StringListValue ¶ added in v0.11.0
type FlagDefault_StringListValue struct {
StringListValue *FlagDefaultStringList `protobuf:"bytes,6,opt,name=string_list_value,json=stringListValue,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"`
// 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) 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