Documentation
¶
Index ¶
- func ErrInvalidf(format string, args ...interface{}) error
- func ErrNotFoundf(format string, args ...interface{}) error
- type ErrInvalid
- type ErrNotFound
- type FlagStorage
- func (s *FlagStorage) CreateFlag(ctx context.Context, r *flipt.CreateFlagRequest) (*flipt.Flag, error)
- func (s *FlagStorage) CreateVariant(ctx context.Context, r *flipt.CreateVariantRequest) (*flipt.Variant, error)
- func (s *FlagStorage) DeleteFlag(ctx context.Context, r *flipt.DeleteFlagRequest) error
- func (s *FlagStorage) DeleteVariant(ctx context.Context, r *flipt.DeleteVariantRequest) error
- func (s *FlagStorage) GetFlag(ctx context.Context, r *flipt.GetFlagRequest) (*flipt.Flag, error)
- func (s *FlagStorage) ListFlags(ctx context.Context, r *flipt.ListFlagRequest) ([]*flipt.Flag, error)
- func (s *FlagStorage) UpdateFlag(ctx context.Context, r *flipt.UpdateFlagRequest) (*flipt.Flag, error)
- func (s *FlagStorage) UpdateVariant(ctx context.Context, r *flipt.UpdateVariantRequest) (*flipt.Variant, error)
- type FlagStore
- type RuleStorage
- func (s *RuleStorage) CreateDistribution(ctx context.Context, r *flipt.CreateDistributionRequest) (*flipt.Distribution, error)
- func (s *RuleStorage) CreateRule(ctx context.Context, r *flipt.CreateRuleRequest) (*flipt.Rule, error)
- func (s *RuleStorage) DeleteDistribution(ctx context.Context, r *flipt.DeleteDistributionRequest) error
- func (s *RuleStorage) DeleteRule(ctx context.Context, r *flipt.DeleteRuleRequest) error
- func (s *RuleStorage) Evaluate(ctx context.Context, r *flipt.EvaluationRequest) (*flipt.EvaluationResponse, error)
- func (s *RuleStorage) GetRule(ctx context.Context, r *flipt.GetRuleRequest) (*flipt.Rule, error)
- func (s *RuleStorage) ListRules(ctx context.Context, r *flipt.ListRuleRequest) ([]*flipt.Rule, error)
- func (s *RuleStorage) OrderRules(ctx context.Context, r *flipt.OrderRulesRequest) error
- func (s *RuleStorage) UpdateDistribution(ctx context.Context, r *flipt.UpdateDistributionRequest) (*flipt.Distribution, error)
- func (s *RuleStorage) UpdateRule(ctx context.Context, r *flipt.UpdateRuleRequest) (*flipt.Rule, error)
- type RuleStore
- type SegmentStorage
- func (s *SegmentStorage) CreateConstraint(ctx context.Context, r *flipt.CreateConstraintRequest) (*flipt.Constraint, error)
- func (s *SegmentStorage) CreateSegment(ctx context.Context, r *flipt.CreateSegmentRequest) (*flipt.Segment, error)
- func (s *SegmentStorage) DeleteConstraint(ctx context.Context, r *flipt.DeleteConstraintRequest) error
- func (s *SegmentStorage) DeleteSegment(ctx context.Context, r *flipt.DeleteSegmentRequest) error
- func (s *SegmentStorage) GetSegment(ctx context.Context, r *flipt.GetSegmentRequest) (*flipt.Segment, error)
- func (s *SegmentStorage) ListSegments(ctx context.Context, r *flipt.ListSegmentRequest) ([]*flipt.Segment, error)
- func (s *SegmentStorage) UpdateConstraint(ctx context.Context, r *flipt.UpdateConstraintRequest) (*flipt.Constraint, error)
- func (s *SegmentStorage) UpdateSegment(ctx context.Context, r *flipt.UpdateSegmentRequest) (*flipt.Segment, error)
- type SegmentStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrInvalidf ¶ added in v0.1.0
ErrInvalidf creates an ErrInvalid using a custom format
func ErrNotFoundf ¶ added in v0.1.0
ErrNotFoundf creates an ErrNotFound using a custom format
Types ¶
type ErrInvalid ¶ added in v0.1.0
type ErrInvalid string
ErrInvalid represents an invalid error
func (ErrInvalid) Error ¶ added in v0.1.0
func (e ErrInvalid) Error() string
type ErrNotFound ¶ added in v0.1.0
type ErrNotFound string
ErrNotFound represents a not found error
func (ErrNotFound) Error ¶ added in v0.1.0
func (e ErrNotFound) Error() string
type FlagStorage ¶ added in v0.1.0
type FlagStorage struct {
// contains filtered or unexported fields
}
FlagStorage is a SQL FlagStore
func NewFlagStorage ¶ added in v0.1.0
func NewFlagStorage(logger logrus.FieldLogger, builder sq.StatementBuilderType) *FlagStorage
NewFlagStorage creates a FlagStorage
func (*FlagStorage) CreateFlag ¶ added in v0.1.0
func (s *FlagStorage) CreateFlag(ctx context.Context, r *flipt.CreateFlagRequest) (*flipt.Flag, error)
CreateFlag creates a flag
func (*FlagStorage) CreateVariant ¶ added in v0.1.0
func (s *FlagStorage) CreateVariant(ctx context.Context, r *flipt.CreateVariantRequest) (*flipt.Variant, error)
CreateVariant creates a variant
func (*FlagStorage) DeleteFlag ¶ added in v0.1.0
func (s *FlagStorage) DeleteFlag(ctx context.Context, r *flipt.DeleteFlagRequest) error
DeleteFlag deletes a flag
func (*FlagStorage) DeleteVariant ¶ added in v0.1.0
func (s *FlagStorage) DeleteVariant(ctx context.Context, r *flipt.DeleteVariantRequest) error
DeleteVariant deletes a variant
func (*FlagStorage) GetFlag ¶ added in v0.2.0
func (s *FlagStorage) GetFlag(ctx context.Context, r *flipt.GetFlagRequest) (*flipt.Flag, error)
GetFlag gets a flag
func (*FlagStorage) ListFlags ¶ added in v0.2.0
func (s *FlagStorage) ListFlags(ctx context.Context, r *flipt.ListFlagRequest) ([]*flipt.Flag, error)
ListFlags lists all flags
func (*FlagStorage) UpdateFlag ¶ added in v0.1.0
func (s *FlagStorage) UpdateFlag(ctx context.Context, r *flipt.UpdateFlagRequest) (*flipt.Flag, error)
UpdateFlag updates an existing flag
func (*FlagStorage) UpdateVariant ¶ added in v0.1.0
func (s *FlagStorage) UpdateVariant(ctx context.Context, r *flipt.UpdateVariantRequest) (*flipt.Variant, error)
UpdateVariant updates an existing variant
type FlagStore ¶ added in v0.2.0
type FlagStore interface { GetFlag(ctx context.Context, r *flipt.GetFlagRequest) (*flipt.Flag, error) ListFlags(ctx context.Context, r *flipt.ListFlagRequest) ([]*flipt.Flag, error) CreateFlag(ctx context.Context, r *flipt.CreateFlagRequest) (*flipt.Flag, error) UpdateFlag(ctx context.Context, r *flipt.UpdateFlagRequest) (*flipt.Flag, error) DeleteFlag(ctx context.Context, r *flipt.DeleteFlagRequest) error CreateVariant(ctx context.Context, r *flipt.CreateVariantRequest) (*flipt.Variant, error) UpdateVariant(ctx context.Context, r *flipt.UpdateVariantRequest) (*flipt.Variant, error) DeleteVariant(ctx context.Context, r *flipt.DeleteVariantRequest) error }
FlagStore ...
type RuleStorage ¶ added in v0.1.0
type RuleStorage struct {
// contains filtered or unexported fields
}
RuleStorage is a SQL RuleStore
func NewRuleStorage ¶ added in v0.1.0
func NewRuleStorage(logger logrus.FieldLogger, tx sq.DBProxyBeginner, builder sq.StatementBuilderType) *RuleStorage
NewRuleStorage creates a RuleStorage
func (*RuleStorage) CreateDistribution ¶ added in v0.1.0
func (s *RuleStorage) CreateDistribution(ctx context.Context, r *flipt.CreateDistributionRequest) (*flipt.Distribution, error)
CreateDistribution creates a distribution
func (*RuleStorage) CreateRule ¶ added in v0.1.0
func (s *RuleStorage) CreateRule(ctx context.Context, r *flipt.CreateRuleRequest) (*flipt.Rule, error)
CreateRule creates a rule
func (*RuleStorage) DeleteDistribution ¶ added in v0.1.0
func (s *RuleStorage) DeleteDistribution(ctx context.Context, r *flipt.DeleteDistributionRequest) error
DeleteDistribution deletes a distribution
func (*RuleStorage) DeleteRule ¶ added in v0.1.0
func (s *RuleStorage) DeleteRule(ctx context.Context, r *flipt.DeleteRuleRequest) error
DeleteRule deletes a rule
func (*RuleStorage) Evaluate ¶ added in v0.1.0
func (s *RuleStorage) Evaluate(ctx context.Context, r *flipt.EvaluationRequest) (*flipt.EvaluationResponse, error)
Evaluate evaluates a request for a given flag and entity
func (*RuleStorage) GetRule ¶ added in v0.2.0
func (s *RuleStorage) GetRule(ctx context.Context, r *flipt.GetRuleRequest) (*flipt.Rule, error)
GetRule gets a rule
func (*RuleStorage) ListRules ¶ added in v0.2.0
func (s *RuleStorage) ListRules(ctx context.Context, r *flipt.ListRuleRequest) ([]*flipt.Rule, error)
ListRules lists all rules
func (*RuleStorage) OrderRules ¶ added in v0.1.0
func (s *RuleStorage) OrderRules(ctx context.Context, r *flipt.OrderRulesRequest) error
OrderRules orders rules
func (*RuleStorage) UpdateDistribution ¶ added in v0.1.0
func (s *RuleStorage) UpdateDistribution(ctx context.Context, r *flipt.UpdateDistributionRequest) (*flipt.Distribution, error)
UpdateDistribution updates an existing distribution
func (*RuleStorage) UpdateRule ¶ added in v0.1.0
func (s *RuleStorage) UpdateRule(ctx context.Context, r *flipt.UpdateRuleRequest) (*flipt.Rule, error)
UpdateRule updates an existing rule
type RuleStore ¶ added in v0.2.0
type RuleStore interface { GetRule(ctx context.Context, r *flipt.GetRuleRequest) (*flipt.Rule, error) ListRules(ctx context.Context, r *flipt.ListRuleRequest) ([]*flipt.Rule, error) CreateRule(ctx context.Context, r *flipt.CreateRuleRequest) (*flipt.Rule, error) UpdateRule(ctx context.Context, r *flipt.UpdateRuleRequest) (*flipt.Rule, error) DeleteRule(ctx context.Context, r *flipt.DeleteRuleRequest) error OrderRules(ctx context.Context, r *flipt.OrderRulesRequest) error CreateDistribution(ctx context.Context, r *flipt.CreateDistributionRequest) (*flipt.Distribution, error) UpdateDistribution(ctx context.Context, r *flipt.UpdateDistributionRequest) (*flipt.Distribution, error) DeleteDistribution(ctx context.Context, r *flipt.DeleteDistributionRequest) error Evaluate(ctx context.Context, r *flipt.EvaluationRequest) (*flipt.EvaluationResponse, error) }
RuleStore ...
type SegmentStorage ¶ added in v0.1.0
type SegmentStorage struct {
// contains filtered or unexported fields
}
SegmentStorage is a SQL SegmentStore
func NewSegmentStorage ¶ added in v0.1.0
func NewSegmentStorage(logger logrus.FieldLogger, builder sq.StatementBuilderType) *SegmentStorage
NewSegmentStorage creates a SegmentStorage
func (*SegmentStorage) CreateConstraint ¶ added in v0.1.0
func (s *SegmentStorage) CreateConstraint(ctx context.Context, r *flipt.CreateConstraintRequest) (*flipt.Constraint, error)
CreateConstraint creates a constraint
func (*SegmentStorage) CreateSegment ¶ added in v0.1.0
func (s *SegmentStorage) CreateSegment(ctx context.Context, r *flipt.CreateSegmentRequest) (*flipt.Segment, error)
CreateSegment creates a segment
func (*SegmentStorage) DeleteConstraint ¶ added in v0.1.0
func (s *SegmentStorage) DeleteConstraint(ctx context.Context, r *flipt.DeleteConstraintRequest) error
DeleteConstraint deletes a constraint
func (*SegmentStorage) DeleteSegment ¶ added in v0.1.0
func (s *SegmentStorage) DeleteSegment(ctx context.Context, r *flipt.DeleteSegmentRequest) error
DeleteSegment deletes a segment
func (*SegmentStorage) GetSegment ¶ added in v0.2.0
func (s *SegmentStorage) GetSegment(ctx context.Context, r *flipt.GetSegmentRequest) (*flipt.Segment, error)
GetSegment gets a segment
func (*SegmentStorage) ListSegments ¶ added in v0.2.0
func (s *SegmentStorage) ListSegments(ctx context.Context, r *flipt.ListSegmentRequest) ([]*flipt.Segment, error)
ListSegments lists all segments
func (*SegmentStorage) UpdateConstraint ¶ added in v0.1.0
func (s *SegmentStorage) UpdateConstraint(ctx context.Context, r *flipt.UpdateConstraintRequest) (*flipt.Constraint, error)
UpdateConstraint updates an existing constraint
func (*SegmentStorage) UpdateSegment ¶ added in v0.1.0
func (s *SegmentStorage) UpdateSegment(ctx context.Context, r *flipt.UpdateSegmentRequest) (*flipt.Segment, error)
UpdateSegment updates an existing segment
type SegmentStore ¶ added in v0.2.0
type SegmentStore interface { GetSegment(ctx context.Context, r *flipt.GetSegmentRequest) (*flipt.Segment, error) ListSegments(ctx context.Context, r *flipt.ListSegmentRequest) ([]*flipt.Segment, error) CreateSegment(ctx context.Context, r *flipt.CreateSegmentRequest) (*flipt.Segment, error) UpdateSegment(ctx context.Context, r *flipt.UpdateSegmentRequest) (*flipt.Segment, error) DeleteSegment(ctx context.Context, r *flipt.DeleteSegmentRequest) error CreateConstraint(ctx context.Context, r *flipt.CreateConstraintRequest) (*flipt.Constraint, error) UpdateConstraint(ctx context.Context, r *flipt.UpdateConstraintRequest) (*flipt.Constraint, error) DeleteConstraint(ctx context.Context, r *flipt.DeleteConstraintRequest) error }
SegmentStore ...