v2

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExperimentAlreadyExists          = errors.New("experiment: already exists")
	ErrExperimentNotFound               = errors.New("experiment: not found")
	ErrExperimentUnexpectedAffectedRows = errors.New("experiment: unexpected affected rows")
)
View Source
var (
	ErrGoalAlreadyExists          = errors.New("goal: already exists")
	ErrGoalNotFound               = errors.New("goal: not found")
	ErrGoalUnexpectedAffectedRows = errors.New("goal: unexpected affected rows")
)

Functions

This section is empty.

Types

type ExperimentStorage

type ExperimentStorage interface {
	CreateExperiment(ctx context.Context, e *domain.Experiment, environmentNamespace string) error
	UpdateExperiment(ctx context.Context, e *domain.Experiment, environmentNamespace string) error
	GetExperiment(ctx context.Context, id, environmentNamespace string) (*domain.Experiment, error)
	ListExperiments(
		ctx context.Context,
		whereParts []mysql.WherePart,
		orders []*mysql.Order,
		limit, offset int,
	) ([]*proto.Experiment, int, int64, error)
}

func NewExperimentStorage

func NewExperimentStorage(qe mysql.QueryExecer) ExperimentStorage

type GoalStorage

type GoalStorage interface {
	CreateGoal(ctx context.Context, g *domain.Goal, environmentNamespace string) error
	UpdateGoal(ctx context.Context, g *domain.Goal, environmentNamespace string) error
	GetGoal(ctx context.Context, id, environmentNamespace string) (*domain.Goal, error)
	ListGoals(
		ctx context.Context,
		whereParts []mysql.WherePart,
		orders []*mysql.Order,
		limit, offset int,
		isInUseStatus *bool,
		environmentNamespace string,
	) ([]*proto.Goal, int, int64, error)
}

func NewGoalStorage

func NewGoalStorage(qe mysql.QueryExecer) GoalStorage

Directories

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

Jump to

Keyboard shortcuts

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