repository

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Evaluation

type Evaluation interface {
	// FindAllByUserID returns all previous flag evaluations for a given user ID.
	FindAllByUserID(ctx context.Context, userID string, search *string, offset, limit *int64) (*flaggio.EvaluationResults, error)
	// FindAllByReqHash returns all previous flag evaluations for a given request hash.
	FindAllByReqHash(ctx context.Context, reqHash string) (flaggio.EvaluationList, error)
	// FindByReqHashAndFlagKey returns a previous flag evaluation for a given request hash and flag key.
	FindByReqHashAndFlagKey(ctx context.Context, reqHash, flagKey string) (*flaggio.Evaluation, error)
	// FindByID returns a previous flag evaluation by its ID.
	FindByID(ctx context.Context, id string) (*flaggio.Evaluation, error)
	// ReplaceOne creates or replaces one evaluation for a user ID.
	ReplaceOne(ctx context.Context, userID string, eval *flaggio.Evaluation) error
	// ReplaceAll creates or replaces evaluations for a combination of user and request hash.
	ReplaceAll(ctx context.Context, userID, reqHash string, evals flaggio.EvaluationList) error
	// DeleteAllByUserID deletes evaluations for a user.
	DeleteAllByUserID(ctx context.Context, userID string) error
	// DeleteByID deletes an evaluation by its ID.
	DeleteByID(ctx context.Context, id string) error
}

Flag represents a set of operations available to list and manage evaluations.

type Flag

type Flag interface {
	// FindAll returns a list of flags, based on an optional offset and limit.
	FindAll(ctx context.Context, search *string, offset, limit *int64) (*flaggio.FlagResults, error)
	// FindByID returns a flag that has a given ID.
	FindByID(ctx context.Context, id string) (*flaggio.Flag, error)
	// FindByKey returns a flag that has a given key.
	FindByKey(ctx context.Context, key string) (*flaggio.Flag, error)
	// Create creates a new flag.
	Create(ctx context.Context, input flaggio.NewFlag) (string, error)
	// Update updates a flag.
	Update(ctx context.Context, id string, input flaggio.UpdateFlag) error
	// Delete deletes a flag.
	Delete(ctx context.Context, id string) error
}

Flag represents a set of operations available to list and manage flags.

type Rule

type Rule interface {
	// FindFlagRuleByID returns a flag rule that has a given ID.
	FindFlagRuleByID(ctx context.Context, flagIDHex, idHex string) (*flaggio.FlagRule, error)
	// CreateFlagRule creates a new rule under a flag.
	CreateFlagRule(ctx context.Context, flagID string, input flaggio.NewFlagRule) (string, error)
	// UpdateFlagRule updates a rule under a flag.
	UpdateFlagRule(ctx context.Context, flagID, id string, input flaggio.UpdateFlagRule) error
	// DeleteFlagRule deletes a rule under a flag.
	DeleteFlagRule(ctx context.Context, flagID, id string) error
	// FindSegmentRuleByID returns a segment rule that has a given ID.
	FindSegmentRuleByID(ctx context.Context, segmentIDHex, idHex string) (*flaggio.SegmentRule, error)
	// CreateSegmentRule creates a new rule under a segment.
	CreateSegmentRule(ctx context.Context, segmentID string, input flaggio.NewSegmentRule) (string, error)
	// UpdateSegmentRule updates a rule under a segment.
	UpdateSegmentRule(ctx context.Context, segmentID, id string, input flaggio.UpdateSegmentRule) error
	// DeleteSegmentRule deletes a rule under a segment.
	DeleteSegmentRule(ctx context.Context, segmentID, id string) error
}

Rule represents a set of operations available to list and manage rules.

type Segment

type Segment interface {
	// FindAll returns a list of segments, based on an optional offset and limit.
	FindAll(ctx context.Context, offset, limit *int64) ([]*flaggio.Segment, error)
	// FindByID returns a segment that has a given ID.
	FindByID(ctx context.Context, id string) (*flaggio.Segment, error)
	// Create creates a new segment.
	Create(ctx context.Context, input flaggio.NewSegment) (string, error)
	// Update updates a segment.
	Update(ctx context.Context, id string, input flaggio.UpdateSegment) error
	// Delete deletes a segment.
	Delete(ctx context.Context, id string) error
}

Segment represents a set of operations available to list and manage segments.

type User

type User interface {
	// FindAll returns a list of users, based on an optional offset and limit.
	FindAll(ctx context.Context, search *string, offset, limit *int64) (*flaggio.UserResults, error)
	// FindByID returns a user by its id.
	FindByID(ctx context.Context, id string) (*flaggio.User, error)
	// Replace creates or updates a user.
	Replace(ctx context.Context, userID string, userCtx flaggio.UserContext) error
	// Delete deletes a user.
	Delete(ctx context.Context, userID string) error
}

User represents a set of operations available to list and manage users.

type Variant

type Variant interface {
	// FindByID returns a variant that has a given ID.
	FindByID(ctx context.Context, flagIDHex, idHex string) (*flaggio.Variant, error)
	// Create creates a new variant under a flag.
	Create(ctx context.Context, flagID string, input flaggio.NewVariant) (string, error)
	// Update updates a variant under a flag.
	Update(ctx context.Context, flagID, id string, input flaggio.UpdateVariant) error
	// Delete deletes a variant under a flag.
	Delete(ctx context.Context, flagID, id string) error
}

Variant represents a set of operations available to list and manage variants.

Directories

Path Synopsis
Package repository_mock is a generated GoMock package.
Package repository_mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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