Documentation ¶
Index ¶
- type Constraint
- type Creator
- type Decoder
- type Distribution
- type Document
- type EncodeCloser
- type Encoder
- type Encoding
- type Exporter
- type Flag
- type ImportOpt
- type Importer
- type IsSegment
- type Lister
- type NopCloseEncoder
- type Rollout
- type Rule
- type Segment
- type SegmentEmbed
- type SegmentKey
- type SegmentRule
- type Segments
- type ThresholdRule
- type Variant
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Constraint ¶
type Constraint struct { Type string `yaml:"type,omitempty" json:"type,omitempty"` Property string `yaml:"property,omitempty" json:"property,omitempty"` Operator string `yaml:"operator,omitempty" json:"operator,omitempty"` Value string `yaml:"value,omitempty" json:"value,omitempty"` Description string `yaml:"description,omitempty" json:"description,omitempty"` }
type Creator ¶ added in v1.20.0
type Creator interface { GetNamespace(context.Context, *flipt.GetNamespaceRequest) (*flipt.Namespace, error) CreateNamespace(context.Context, *flipt.CreateNamespaceRequest) (*flipt.Namespace, error) CreateFlag(context.Context, *flipt.CreateFlagRequest) (*flipt.Flag, error) CreateVariant(context.Context, *flipt.CreateVariantRequest) (*flipt.Variant, error) CreateSegment(context.Context, *flipt.CreateSegmentRequest) (*flipt.Segment, error) CreateConstraint(context.Context, *flipt.CreateConstraintRequest) (*flipt.Constraint, error) CreateRule(context.Context, *flipt.CreateRuleRequest) (*flipt.Rule, error) CreateDistribution(context.Context, *flipt.CreateDistributionRequest) (*flipt.Distribution, error) CreateRollout(context.Context, *flipt.CreateRolloutRequest) (*flipt.Rollout, error) }
type Distribution ¶
type Document ¶
type Document struct { Version string `yaml:"version,omitempty" json:"version,omitempty"` Namespace string `yaml:"namespace,omitempty" json:"namespace,omitempty"` Flags []*Flag `yaml:"flags,omitempty" json:"flags,omitempty"` Segments []*Segment `yaml:"segments,omitempty" json:"segments,omitempty"` }
type EncodeCloser ¶ added in v1.31.0
type Encoding ¶ added in v1.31.0
type Encoding string
func (Encoding) NewEncoder ¶ added in v1.31.0
func (e Encoding) NewEncoder(w io.Writer) EncodeCloser
type Flag ¶
type Flag struct { Key string `yaml:"key,omitempty" json:"key,omitempty"` Name string `yaml:"name,omitempty" json:"name,omitempty"` Type string `yaml:"type,omitempty" json:"type,omitempty"` Description string `yaml:"description,omitempty" json:"description,omitempty"` Enabled bool `yaml:"enabled" json:"enabled"` Variants []*Variant `yaml:"variants,omitempty" json:"variants,omitempty"` Rules []*Rule `yaml:"rules,omitempty" json:"rules,omitempty"` Rollouts []*Rollout `yaml:"rollouts,omitempty" json:"rollouts,omitempty"` }
type Importer ¶
type Importer struct {
// contains filtered or unexported fields
}
func NewImporter ¶
type IsSegment ¶ added in v1.25.0
type IsSegment interface {
IsSegment()
}
IsSegment is used to unify the two types of segments that can come in from the import.
type Lister ¶ added in v1.20.0
type Lister interface { ListNamespaces(context.Context, *flipt.ListNamespaceRequest) (*flipt.NamespaceList, error) ListFlags(context.Context, *flipt.ListFlagRequest) (*flipt.FlagList, error) ListSegments(context.Context, *flipt.ListSegmentRequest) (*flipt.SegmentList, error) ListRules(context.Context, *flipt.ListRuleRequest) (*flipt.RuleList, error) ListRollouts(context.Context, *flipt.ListRolloutRequest) (*flipt.RolloutList, error) }
type NopCloseEncoder ¶ added in v1.31.0
type NopCloseEncoder struct {
Encoder
}
func (NopCloseEncoder) Close ¶ added in v1.31.0
func (n NopCloseEncoder) Close() error
type Rollout ¶ added in v1.24.0
type Rollout struct { Description string `yaml:"description,omitempty" json:"description,omitempty"` Segment *SegmentRule `yaml:"segment,omitempty" json:"segment,omitempty"` Threshold *ThresholdRule `yaml:"threshold,omitempty" json:"threshold,omitempty"` }
type Rule ¶
type Rule struct { Segment *SegmentEmbed `yaml:"segment,omitempty" json:"segment,omitempty"` Rank uint `yaml:"rank,omitempty" json:"rank,omitempty"` Distributions []*Distribution `yaml:"distributions,omitempty" json:"distributions,omitempty"` }
type Segment ¶
type Segment struct { Key string `yaml:"key,omitempty" json:"key,omitempty"` Name string `yaml:"name,omitempty" json:"name,omitempty"` Description string `yaml:"description,omitempty" json:"description,omitempty"` Constraints []*Constraint `yaml:"constraints,omitempty" json:"constraints,omitempty"` MatchType string `yaml:"match_type,omitempty" json:"match_type,omitempty"` }
type SegmentEmbed ¶ added in v1.25.0
type SegmentEmbed struct {
IsSegment `yaml:"-"`
}
func (*SegmentEmbed) MarshalJSON ¶ added in v1.31.0
func (s *SegmentEmbed) MarshalJSON() ([]byte, error)
MarshalJSON tries to type assert to either of the following types that implement IsSegment, and returns the marshaled value.
func (*SegmentEmbed) MarshalYAML ¶ added in v1.25.0
func (s *SegmentEmbed) MarshalYAML() (interface{}, error)
MarshalYAML tries to type assert to either of the following types that implement IsSegment, and returns the marshaled value.
func (*SegmentEmbed) UnmarshalJSON ¶ added in v1.31.0
func (s *SegmentEmbed) UnmarshalJSON(v []byte) error
UnmarshalJSON attempts to unmarshal a string or `SegmentKeys`, and fails if it can not do so.
func (*SegmentEmbed) UnmarshalYAML ¶ added in v1.25.0
func (s *SegmentEmbed) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML attempts to unmarshal a string or `SegmentKeys`, and fails if it can not do so.
type SegmentKey ¶ added in v1.25.0
type SegmentKey string
func (SegmentKey) IsSegment ¶ added in v1.25.0
func (s SegmentKey) IsSegment()
type SegmentRule ¶ added in v1.24.0
type Segments ¶ added in v1.25.0
type ThresholdRule ¶ added in v1.24.0
Click to show internal directories.
Click to hide internal directories.