common

package
v1.40.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PageToken

type PageToken struct {
	Key    string `json:"key,omitempty"`
	Offset uint64 `json:"offset,omitempty"`
}

type Store

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

func NewStore

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

func (*Store) CountFlags

func (s *Store) CountFlags(ctx context.Context, p storage.NamespaceRequest) (uint64, error)

CountFlags counts all flags

func (*Store) CountNamespaces added in v1.20.0

func (s *Store) CountNamespaces(ctx context.Context, _ storage.ReferenceRequest) (uint64, error)

func (*Store) CountRollouts added in v1.24.0

func (s *Store) CountRollouts(ctx context.Context, flag storage.ResourceRequest) (uint64, error)

CountRollouts counts all rollouts

func (*Store) CountRules

func (s *Store) CountRules(ctx context.Context, flag storage.ResourceRequest) (uint64, error)

CountRules counts all rules

func (*Store) CountSegments

func (s *Store) CountSegments(ctx context.Context, ns storage.NamespaceRequest) (uint64, error)

CountSegments counts all segments

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) CreateNamespace added in v1.20.0

func (s *Store) CreateNamespace(ctx context.Context, r *flipt.CreateNamespaceRequest) (*flipt.Namespace, error)

func (*Store) CreateRollout added in v1.24.0

func (s *Store) CreateRollout(ctx context.Context, r *flipt.CreateRolloutRequest) (_ *flipt.Rollout, err error)

func (*Store) CreateRule

func (s *Store) CreateRule(ctx context.Context, r *flipt.CreateRuleRequest) (_ *flipt.Rule, err 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) DeleteNamespace added in v1.20.0

func (s *Store) DeleteNamespace(ctx context.Context, r *flipt.DeleteNamespaceRequest) error

func (*Store) DeleteRollout added in v1.24.0

func (s *Store) DeleteRollout(ctx context.Context, r *flipt.DeleteRolloutRequest) (err error)

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, rule storage.IDRequest) (_ []*storage.EvaluationDistribution, err error)

func (*Store) GetEvaluationRollouts added in v1.24.0

func (s *Store) GetEvaluationRollouts(ctx context.Context, flag storage.ResourceRequest) (_ []*storage.EvaluationRollout, err error)

func (*Store) GetEvaluationRules

func (s *Store) GetEvaluationRules(ctx context.Context, flag storage.ResourceRequest) (_ []*storage.EvaluationRule, err error)

func (*Store) GetFlag

func (s *Store) GetFlag(ctx context.Context, p storage.ResourceRequest) (*flipt.Flag, error)

GetFlag gets a flag with variants by key

func (*Store) GetNamespace added in v1.20.0

func (s *Store) GetNamespace(ctx context.Context, p storage.NamespaceRequest) (*flipt.Namespace, error)

func (*Store) GetRollout added in v1.24.0

func (s *Store) GetRollout(ctx context.Context, ns storage.NamespaceRequest, id string) (*flipt.Rollout, error)

func (*Store) GetRule

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

GetRule gets an individual rule with distributions by ID

func (*Store) GetSegment

func (s *Store) GetSegment(ctx context.Context, req storage.ResourceRequest) (*flipt.Segment, error)

GetSegment gets a segment

func (*Store) ListFlags

ListFlags lists all flags with variants

func (*Store) ListNamespaces added in v1.20.0

func (*Store) ListRollouts added in v1.24.0

func (*Store) ListRules

ListRules gets all rules for a flag with distributions

func (*Store) ListSegments

ListSegments lists all segments

func (*Store) OrderRollouts added in v1.24.0

func (s *Store) OrderRollouts(ctx context.Context, r *flipt.OrderRolloutsRequest) error

OrderRollouts orders rollouts

func (*Store) OrderRules

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

OrderRules orders rules

func (*Store) String added in v1.20.0

func (s *Store) String() string

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 TODO: we dont let user to update variant_id currently.. we should

func (*Store) UpdateFlag

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

UpdateFlag updates an existing flag

func (*Store) UpdateNamespace added in v1.20.0

func (s *Store) UpdateNamespace(ctx context.Context, r *flipt.UpdateNamespaceRequest) (*flipt.Namespace, error)

func (*Store) UpdateRollout added in v1.24.0

func (s *Store) UpdateRollout(ctx context.Context, r *flipt.UpdateRolloutRequest) (_ *flipt.Rollout, err error)

func (*Store) UpdateRule

func (s *Store) UpdateRule(ctx context.Context, r *flipt.UpdateRuleRequest) (_ *flipt.Rule, err 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