Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions internal/ext/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ type Distribution struct {
}

type Rollout struct {
Id string `yaml:"id,omitempty" json:"id,omitempty"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Segment *SegmentRule `yaml:"segment,omitempty" json:"segment,omitempty"`
Threshold *ThresholdRule `yaml:"threshold,omitempty" json:"threshold,omitempty"`
Expand All @@ -71,6 +72,7 @@ type Segment struct {
}

type Constraint struct {
Id string `yaml:"id,omitempty" json:"id,omitempty"`
Type string `yaml:"type,omitempty" json:"type,omitempty"`
Property string `yaml:"property,omitempty" json:"property,omitempty"`
Operator string `yaml:"operator,omitempty" json:"operator,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions internal/ext/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ func (e *Exporter) Export(ctx context.Context, encoding Encoding, w io.Writer) e

for _, r := range rollouts.Rules {
rollout := Rollout{
Id: r.Id,
Description: r.Description,
}

Expand Down Expand Up @@ -321,6 +322,7 @@ func (e *Exporter) Export(ctx context.Context, encoding Encoding, w io.Writer) e

for _, c := range s.Constraints {
segment.Constraints = append(segment.Constraints, &Constraint{
Id: c.Id,
Type: c.Type.String(),
Property: c.Property,
Operator: c.Operator,
Expand Down
Loading