Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertDtoToInternalFlag ¶ added in v1.40.0
func ConvertDtoToInternalFlag(dto DTO) flag.InternalFlag
ConvertDtoToInternalFlag is converting a DTO to a flag.InternalFlag
Types ¶
type DTO ¶
type DTO struct { // TrackEvents is false if you don't want to export the data in your data exporter. // Default value is true TrackEvents *bool `json:"trackEvents,omitempty" yaml:"trackEvents,omitempty" toml:"trackEvents,omitempty"` // Disable is true if the flag is disabled. Disable *bool `json:"disable,omitempty" yaml:"disable,omitempty" toml:"disable,omitempty"` // Version (optional) This field contains the version of the flag. // The version is manually managed when you configure your flags and, it is used to display the information // in the notifications and data collection. Version *string `json:"version,omitempty" yaml:"version,omitempty" toml:"version,omitempty"` // Converter (optional) is the name of converter to use, if no converter specified we try to determine // which converter to use based on the fields we receive for the flag Converter *string `json:"converter,omitempty" yaml:"converter,omitempty" toml:"converter,omitempty"` // Variations are all the variations available for this flag. The minimum is 2 variations and, we don't have any max // limit except if the variationValue is a bool, the max is 2. Variations *map[string]*interface{} `` // nolint:lll /* 283-byte string literal not displayed */ // Rules is the list of Rule for this flag. // This an optional field. Rules *[]flag.Rule `` // nolint: lll /* 199-byte string literal not displayed */ // BucketingKey defines a source for a dynamic targeting key BucketingKey *string `json:"bucketingKey,omitempty" yaml:"bucketingKey,omitempty" toml:"bucketingKey,omitempty"` // DefaultRule is the rule applied after checking that any other rules // matched the user. DefaultRule *flag.Rule `` // nolint: lll /* 220-byte string literal not displayed */ // Scheduled is your struct to configure an update on some fields of your flag over time. // You can add several steps that updates the flag, this is typically used if you want to gradually add more user // in your flag. Scheduled *[]flag.ScheduledStep `` // nolint: lll /* 208-byte string literal not displayed */ // Experimentation is your struct to configure an experimentation. // It will allow you to configure a start date and an end date for your flag. // When the experimentation is not running, the flag will serve the default value. Experimentation *ExperimentationDto `` // nolint: lll /* 250-byte string literal not displayed */ // Metadata is a field containing information about your flag such as an issue tracker link, a description, etc ... Metadata *map[string]interface{} `` // nolint: lll /* 215-byte string literal not displayed */ }
DTO is representing all the fields we can have in a flag. This DTO supports all flag formats and convert them into an InternalFlag using a converter.
func (*DTO) Convert ¶
func (d *DTO) Convert() flag.InternalFlag
Convert is converting the DTO into a flag.InternalFlag.
type ExperimentationDto ¶
Click to show internal directories.
Click to hide internal directories.