common

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(db *sql.DB, builder sq.StatementBuilderType) *Store

func (*Store) CreateConstraint

func (s *Store) CreateConstraint(ctx context.Context, r *flipt.CreateConstraintRequest) (*flipt.Constraint, error)

CreateConstraint creates a constraint

func (*Store) CreateDistribution

func (s *Store) CreateDistribution(ctx context.Context, r *flipt.CreateDistributionRequest) (*flipt.Distribution, error)

CreateDistribution creates a distribution

func (*Store) CreateFlag

func (s *Store) CreateFlag(ctx context.Context, r *flipt.CreateFlagRequest) (*flipt.Flag, error)

CreateFlag creates a flag

func (*Store) CreateRule

func (s *Store) CreateRule(ctx context.Context, r *flipt.CreateRuleRequest) (*flipt.Rule, error)

CreateRule creates a rule

func (*Store) CreateSegment

func (s *Store) CreateSegment(ctx context.Context, r *flipt.CreateSegmentRequest) (*flipt.Segment, error)

CreateSegment creates a segment

func (*Store) CreateVariant

func (s *Store) CreateVariant(ctx context.Context, r *flipt.CreateVariantRequest) (*flipt.Variant, error)

CreateVariant creates a variant

func (*Store) DeleteConstraint

func (s *Store) DeleteConstraint(ctx context.Context, r *flipt.DeleteConstraintRequest) error

DeleteConstraint deletes a constraint

func (*Store) DeleteDistribution

func (s *Store) DeleteDistribution(ctx context.Context, r *flipt.DeleteDistributionRequest) error

DeleteDistribution deletes a distribution

func (*Store) DeleteFlag

func (s *Store) DeleteFlag(ctx context.Context, r *flipt.DeleteFlagRequest) error

DeleteFlag deletes a flag

func (*Store) DeleteRule

func (s *Store) DeleteRule(ctx context.Context, r *flipt.DeleteRuleRequest) error

DeleteRule deletes a rule

func (*Store) DeleteSegment

func (s *Store) DeleteSegment(ctx context.Context, r *flipt.DeleteSegmentRequest) error

DeleteSegment deletes a segment

func (*Store) DeleteVariant

func (s *Store) DeleteVariant(ctx context.Context, r *flipt.DeleteVariantRequest) error

DeleteVariant deletes a variant

func (*Store) GetEvaluationDistributions

func (s *Store) GetEvaluationDistributions(ctx context.Context, ruleID string) ([]*storage.EvaluationDistribution, error)

func (*Store) GetEvaluationRules

func (s *Store) GetEvaluationRules(ctx context.Context, flagKey string) ([]*storage.EvaluationRule, error)

func (*Store) GetFlag

func (s *Store) GetFlag(ctx context.Context, key string) (*flipt.Flag, error)

GetFlag gets a flag

func (*Store) GetRule

func (s *Store) GetRule(ctx context.Context, id string) (*flipt.Rule, error)

GetRule gets an individual rule

func (*Store) GetSegment

func (s *Store) GetSegment(ctx context.Context, key string) (*flipt.Segment, error)

GetSegment gets a segment

func (*Store) ListFlags

func (s *Store) ListFlags(ctx context.Context, opts ...storage.QueryOption) ([]*flipt.Flag, error)

ListFlags lists all flags

func (*Store) ListRules

func (s *Store) ListRules(ctx context.Context, flagKey string, opts ...storage.QueryOption) ([]*flipt.Rule, error)

ListRules gets all rules for a flag

func (*Store) ListSegments

func (s *Store) ListSegments(ctx context.Context, opts ...storage.QueryOption) ([]*flipt.Segment, error)

ListSegments lists all segments

func (*Store) OrderRules

func (s *Store) OrderRules(ctx context.Context, r *flipt.OrderRulesRequest) error

OrderRules orders rules

func (*Store) UpdateConstraint

func (s *Store) UpdateConstraint(ctx context.Context, r *flipt.UpdateConstraintRequest) (*flipt.Constraint, error)

UpdateConstraint updates an existing constraint

func (*Store) UpdateDistribution

func (s *Store) UpdateDistribution(ctx context.Context, r *flipt.UpdateDistributionRequest) (*flipt.Distribution, error)

UpdateDistribution updates an existing distribution

func (*Store) UpdateFlag

func (s *Store) UpdateFlag(ctx context.Context, r *flipt.UpdateFlagRequest) (*flipt.Flag, error)

UpdateFlag updates an existing flag

func (*Store) UpdateRule

func (s *Store) UpdateRule(ctx context.Context, r *flipt.UpdateRuleRequest) (*flipt.Rule, error)

UpdateRule updates an existing rule

func (*Store) UpdateSegment

func (s *Store) UpdateSegment(ctx context.Context, r *flipt.UpdateSegmentRequest) (*flipt.Segment, error)

UpdateSegment updates an existing segment

func (*Store) UpdateVariant

func (s *Store) UpdateVariant(ctx context.Context, r *flipt.UpdateVariantRequest) (*flipt.Variant, error)

UpdateVariant updates an existing variant

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL