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: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DataTypeEvaluationEvent = "evaluation_event"
	DataTypeGoalEvent       = "goal_event"
	EvaluationCountSQLFile  = "sql/evaluation_count.sql"
	GoalCountSQLFile        = "sql/goal_count.sql"
)

Variables

View Source
var ErrExperimentResultNotFound = errors.New("experimentResult: experiment result not found")

Functions

This section is empty.

Types

type EvaluationEventCount added in v0.3.0

type EvaluationEventCount struct {
	VariationID     string
	EvaluationUser  int64
	EvaluationTotal int64
}

type EventStorage added in v0.2.0

type EventStorage interface {
	QueryEvaluationCount(
		ctx context.Context,
		environmentNamespace string,
		startAt, endAt time.Time,
		featureID string,
		featureVersion int32,
	) ([]*EvaluationEventCount, error)
	QueryGoalCount(
		ctx context.Context,
		environmentNamespace string,
		startAt, endAt time.Time,
		goalID, featureID string,
		featureVersion int32,
	) ([]*GoalEventCount, error)
}

func NewEventStorage added in v0.2.0

func NewEventStorage(querier bqquerier.Client, dataset string, logger *zap.Logger) EventStorage

type ExperimentResultStorage

type ExperimentResultStorage interface {
	GetExperimentResult(ctx context.Context, id, environmentNamespace string) (*domain.ExperimentResult, error)
}

func NewExperimentResultStorage

func NewExperimentResultStorage(qe mysql.QueryExecer) ExperimentResultStorage

type GoalEventCount added in v0.3.0

type GoalEventCount struct {
	VariationID       string
	GoalUser          int64
	GoalTotal         int64
	GoalValueTotal    float64
	GoalValueMean     float64
	GoalValueVariance float64
}

type MAUSummaryStorage added in v0.4.0

type MAUSummaryStorage interface {
	UpsertMAUSummary(
		ctx context.Context,
		mauSummary *eventcounter.MAUSummary,
	) error
}

func NewMAUSummaryStorage added in v0.4.0

func NewMAUSummaryStorage(qe mysql.QueryExecer) MAUSummaryStorage

type UserCountStorage added in v0.2.0

type UserCountStorage interface {
	GetMAUCount(
		ctx context.Context,
		environmentNamespace, yearMonth string,
	) (int64, int64, error)
	GetMAUCounts(
		ctx context.Context,
		yearMonth string,
	) ([]*proto.MAUSummary, error)
	GetMAUCountsGroupBySourceID(
		ctx context.Context,
		yearMonth string,
	) ([]*proto.MAUSummary, error)
}

func NewUserCountStorage added in v0.2.0

func NewUserCountStorage(qe mysql.QueryExecer) UserCountStorage

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