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 CommonRollout ¶
type CommonRollout struct { // 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 `json:"experimentation,omitempty" yaml:"experimentation,omitempty" toml:"experimentation,omitempty"` // nolint: lll // Progressive (only for v0) is your struct to configure a progressive rollout deployment of your flag. // It will allow you to ramp up the percentage of your flag over time. // You can decide at which percentage you start and at what percentage you ends in your release ramp. // Before the start date we will serve the initial percentage and, after we will serve the end percentage. Progressive *ProgressiveV0 `json:"progressive,omitempty" yaml:"progressive,omitempty" toml:"progressive,omitempty"` // nolint: lll }
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 /* 284-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 ¶
type ProgressivePercentageV0 ¶
type ProgressivePercentageV0 struct { // Initial is the initial percentage before the rollout start date. // This field is optional // Default: 0.0 Initial float64 `json:"initial,omitempty" yaml:"initial,omitempty" toml:"initial,omitempty"` // End is the target percentage we want to reach at the end of the rollout phase. // This field is optional // Default: 100.0 End float64 `json:"end,omitempty" yaml:"end,omitempty" toml:"end,omitempty"` }
type ProgressiveV0 ¶
type ProgressiveV0 struct { // Percentage is where you can configure at what percentage your progressive rollout start // and at what percentage it ends. // This field is optional Percentage ProgressivePercentageV0 `json:"percentage,omitempty" yaml:"percentage,omitempty" toml:"percentage,omitempty"` // nolint: lll // ReleaseRamp is the defining when the progressive rollout starts and ends. // This field is mandatory if you want to use a progressive rollout. // If any field missing we ignore the progressive rollout. ReleaseRamp ProgressiveReleaseRampV0 `json:"releaseRamp,omitempty" yaml:"releaseRamp,omitempty" toml:"releaseRamp,omitempty"` // nolint: lll }
ProgressiveV0 is the configuration struct to define a progressive rollout.
type Rollout ¶
type Rollout struct { // CommonRollout is the struct containing the configuration for rollout that applies for // all types of flag in your input file. CommonRollout `json:",inline" yaml:",inline" toml:",inline"` // V0Rollout contains the configuration available only for the flags version v0.X.X V0Rollout `json:",inline" yaml:",inline" toml:",inline"` // nolint: govet }
type ScheduledRolloutV0 ¶
type ScheduledRolloutV0 struct { // Steps is the list of updates to do in a specific date. Steps []ScheduledStepV0 `json:"steps,omitempty" yaml:"steps,omitempty" toml:"steps,omitempty"` }
type ScheduledStepV0 ¶
type V0Rollout ¶
type V0Rollout struct { // 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 *ScheduledRolloutV0 `json:"scheduled,omitempty" yaml:"scheduled,omitempty" toml:"scheduled,omitempty"` // nolint: lll }
Click to show internal directories.
Click to hide internal directories.