Documentation ¶
Index ¶
- type AppFixtures
- func (f AppFixtures) CreateApp(ctx context.Context, app *database.App) (*database.App, error)
- func (f AppFixtures) CreateApps(ctx context.Context, namespace *models.Namespace, num int) ([]*database.App, error)
- func (f AppFixtures) GetApps(ctx context.Context) ([]database.App, error)
- func (f AppFixtures) TruncateTables() error
- type DashboardFixtures
- func (f DashboardFixtures) CreateDashboard(ctx context.Context, dashboard *database.Dashboard) (*database.Dashboard, error)
- func (f DashboardFixtures) CreateDashboards(ctx context.Context, num int, appId *uuid.UUID) ([]*database.Dashboard, error)
- func (f DashboardFixtures) GetDashboardByID(ctx context.Context, dashboardID string) (*database.Dashboard, error)
- func (f DashboardFixtures) GetDashboards(ctx context.Context) ([]database.Dashboard, error)
- func (f DashboardFixtures) TruncateTables() error
- type ExperimentFixtures
- func (f ExperimentFixtures) CreateExperiment(ctx context.Context, experiment *models.Experiment) (*models.Experiment, error)
- func (f ExperimentFixtures) GetByNamespaceIDAndExperimentID(ctx context.Context, namespaceID uint, experimentID int32) (*models.Experiment, error)
- func (f ExperimentFixtures) GetTestExperiments(ctx context.Context) ([]models.Experiment, error)
- func (f ExperimentFixtures) TruncateTables() error
- type MetricFixtures
- func (f MetricFixtures) CreateLatestMetric(ctx context.Context, metric *models.LatestMetric) (*models.LatestMetric, error)
- func (f MetricFixtures) CreateMetric(ctx context.Context, metric *models.Metric) (*models.Metric, error)
- func (f MetricFixtures) GetLatestMetricByKey(ctx context.Context, key string) (*models.LatestMetric, error)
- func (f MetricFixtures) GetLatestMetricByRunID(ctx context.Context, runID string) (*models.LatestMetric, error)
- func (f MetricFixtures) TruncateTables() error
- type NamespaceFixtures
- func (f NamespaceFixtures) CreateNamespace(ctx context.Context, namespace *models.Namespace) (*models.Namespace, error)
- func (f NamespaceFixtures) GetNamespaceByID(ctx context.Context, id uint) (*models.Namespace, error)
- func (f NamespaceFixtures) GetNamespaces(ctx context.Context) ([]models.Namespace, error)
- func (f NamespaceFixtures) TruncateTables() error
- func (f NamespaceFixtures) UpdateNamespace(ctx context.Context, namespace *models.Namespace) (*models.Namespace, error)
- func (f NamespaceFixtures) UpsertNamespace(ctx context.Context, namespace *models.Namespace) (*models.Namespace, error)
- type ParamFixtures
- type ProjectFixtures
- type RunFixtures
- func (f RunFixtures) ArchiveRun(ctx context.Context, namespaceID uint, ids []string) error
- func (f RunFixtures) ArchiveRuns(ctx context.Context, namespaceID uint, runIDs []string) error
- func (f RunFixtures) CreateExampleRun(ctx context.Context, exp *models.Experiment) (*models.Run, error)
- func (f RunFixtures) CreateExampleRuns(ctx context.Context, exp *models.Experiment, num int) ([]*models.Run, error)
- func (f RunFixtures) CreateMetric(ctx context.Context, metric *models.Metric) error
- func (f RunFixtures) CreateMetrics(ctx context.Context, run *models.Run, count int) error
- func (f RunFixtures) CreateParams(ctx context.Context, run *models.Run, count int) error
- func (f RunFixtures) CreateRun(ctx context.Context, run *models.Run) (*models.Run, error)
- func (f RunFixtures) CreateTag(ctx context.Context, tag models.Tag) error
- func (f RunFixtures) FindMinMaxRowNums(ctx context.Context, experimentID int32) (int64, int64, error)
- func (f RunFixtures) GetRun(ctx context.Context, runID string) (*models.Run, error)
- func (f RunFixtures) GetRuns(ctx context.Context, experimentID int32) ([]models.Run, error)
- func (f RunFixtures) TruncateTables() error
- func (f RunFixtures) UpdateRun(ctx context.Context, run *models.Run) error
- type TagFixtures
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppFixtures ¶ added in v0.3.0
type AppFixtures struct {
// contains filtered or unexported fields
}
AppFixtures represents data fixtures object.
func NewAppFixtures ¶ added in v0.3.0
func NewAppFixtures(db *gorm.DB) (*AppFixtures, error)
NewAppFixtures creates new instance of AppFixtures.
func (AppFixtures) CreateApps ¶ added in v0.3.0
func (f AppFixtures) CreateApps(ctx context.Context, namespace *models.Namespace, num int) ([]*database.App, error)
CreateApps creates some num apps belonging to the experiment.
func (AppFixtures) TruncateTables ¶ added in v0.4.0
func (f AppFixtures) TruncateTables() error
TruncateTables cleans database from the old data.
type DashboardFixtures ¶ added in v0.3.0
type DashboardFixtures struct {
// contains filtered or unexported fields
}
DashboardFixtures represents data fixtures object.
func NewDashboardFixtures ¶ added in v0.3.0
func NewDashboardFixtures(db *gorm.DB) (*DashboardFixtures, error)
NewDashboardFixtures creates new instance of DashboardFixtures.
func (DashboardFixtures) CreateDashboard ¶ added in v0.3.0
func (f DashboardFixtures) CreateDashboard( ctx context.Context, dashboard *database.Dashboard, ) (*database.Dashboard, error)
CreateDashboard creates a new test Dashboard.
func (DashboardFixtures) CreateDashboards ¶ added in v0.3.0
func (f DashboardFixtures) CreateDashboards( ctx context.Context, num int, appId *uuid.UUID, ) ([]*database.Dashboard, error)
CreateDashboards creates some num dashboards belonging to the experiment
func (DashboardFixtures) GetDashboardByID ¶ added in v0.4.0
func (f DashboardFixtures) GetDashboardByID(ctx context.Context, dashboardID string) (*database.Dashboard, error)
GetDashboardByID returns database.Dashboard entity by its ID.
func (DashboardFixtures) GetDashboards ¶ added in v0.3.0
GetDashboards fetches all dashboards which are not archived
func (DashboardFixtures) TruncateTables ¶ added in v0.4.0
func (f DashboardFixtures) TruncateTables() error
TruncateTables cleans database from the old data.
type ExperimentFixtures ¶
type ExperimentFixtures struct {
// contains filtered or unexported fields
}
ExperimentFixtures represents data fixtures object.
func NewExperimentFixtures ¶
func NewExperimentFixtures(db *gorm.DB) (*ExperimentFixtures, error)
NewExperimentFixtures creates new instance of ExperimentFixtures.
func (ExperimentFixtures) CreateExperiment ¶
func (f ExperimentFixtures) CreateExperiment( ctx context.Context, experiment *models.Experiment, ) (*models.Experiment, error)
CreateExperiment creates a new test Experiment.
func (ExperimentFixtures) GetByNamespaceIDAndExperimentID ¶ added in v0.4.0
func (f ExperimentFixtures) GetByNamespaceIDAndExperimentID( ctx context.Context, namespaceID uint, experimentID int32, ) (*models.Experiment, error)
GetByNamespaceIDAndExperimentID returns the experiment by Namespace ID and the given Experiment id.
func (ExperimentFixtures) GetTestExperiments ¶ added in v0.3.0
func (f ExperimentFixtures) GetTestExperiments( ctx context.Context, ) ([]models.Experiment, error)
GetTestExperiments fetches all experiments.
func (ExperimentFixtures) TruncateTables ¶ added in v0.4.0
func (f ExperimentFixtures) TruncateTables() error
TruncateTables cleans database from the old data.
type MetricFixtures ¶
type MetricFixtures struct {
// contains filtered or unexported fields
}
MetricFixtures represents data fixtures object.
func NewMetricFixtures ¶
func NewMetricFixtures(db *gorm.DB) (*MetricFixtures, error)
NewMetricFixtures creates new instance of MetricFixtures.
func (MetricFixtures) CreateLatestMetric ¶
func (f MetricFixtures) CreateLatestMetric( ctx context.Context, metric *models.LatestMetric, ) (*models.LatestMetric, error)
CreateLatestMetric creates new test Latest Metric.
func (MetricFixtures) CreateMetric ¶
func (f MetricFixtures) CreateMetric(ctx context.Context, metric *models.Metric) (*models.Metric, error)
CreateMetric creates new test Metric.
func (MetricFixtures) GetLatestMetricByKey ¶
func (f MetricFixtures) GetLatestMetricByKey(ctx context.Context, key string) (*models.LatestMetric, error)
GetLatestMetricByKey returns the latest metric by provided key.
func (MetricFixtures) GetLatestMetricByRunID ¶ added in v0.3.0
func (f MetricFixtures) GetLatestMetricByRunID(ctx context.Context, runID string) (*models.LatestMetric, error)
GetLatestMetricByRunID returns the latest metric by provide Run ID.
func (MetricFixtures) TruncateTables ¶ added in v0.4.0
func (f MetricFixtures) TruncateTables() error
TruncateTables cleans database from the old data.
type NamespaceFixtures ¶ added in v0.4.0
type NamespaceFixtures struct {
// contains filtered or unexported fields
}
NamespaceFixtures represents data fixtures object.
func NewNamespaceFixtures ¶ added in v0.4.0
func NewNamespaceFixtures(db *gorm.DB) (*NamespaceFixtures, error)
NewNamespaceFixtures creates new instance of NamespaceFixtures.
func (NamespaceFixtures) CreateNamespace ¶ added in v0.4.0
func (f NamespaceFixtures) CreateNamespace( ctx context.Context, namespace *models.Namespace, ) (*models.Namespace, error)
CreateNamespace creates a new test Namespace.
func (NamespaceFixtures) GetNamespaceByID ¶ added in v0.4.0
func (f NamespaceFixtures) GetNamespaceByID( ctx context.Context, id uint, ) (*models.Namespace, error)
GetNamespaceByID fetches a namespace by ID.
func (NamespaceFixtures) GetNamespaces ¶ added in v0.4.0
GetNamespaces fetches all namespaces.
func (NamespaceFixtures) TruncateTables ¶ added in v0.4.0
func (f NamespaceFixtures) TruncateTables() error
TruncateTables cleans database from the old data.
func (NamespaceFixtures) UpdateNamespace ¶ added in v0.4.0
func (f NamespaceFixtures) UpdateNamespace( ctx context.Context, namespace *models.Namespace, ) (*models.Namespace, error)
UpdateNamespace updates an existing test Namespace.
func (NamespaceFixtures) UpsertNamespace ¶ added in v0.4.0
func (f NamespaceFixtures) UpsertNamespace( ctx context.Context, namespace *models.Namespace, ) (*models.Namespace, error)
UpsertNamespace creates a new test Namespace or updates existing.
type ParamFixtures ¶ added in v0.3.0
type ParamFixtures struct {
// contains filtered or unexported fields
}
ParamFixtures represents data fixtures object.
func NewParamFixtures ¶ added in v0.3.0
func NewParamFixtures(db *gorm.DB) (*ParamFixtures, error)
NewParamFixtures creates new instance of ParamFixtures.
func (ParamFixtures) CreateParam ¶ added in v0.3.0
CreateParam creates new test Param.
func (ParamFixtures) GetParamsByRunID ¶ added in v0.3.7
GetParamsByRunID returns all params for a given run.
func (ParamFixtures) TruncateTables ¶ added in v0.4.0
func (f ParamFixtures) TruncateTables() error
TruncateTables cleans database from the old data.
type ProjectFixtures ¶ added in v0.3.2
type ProjectFixtures struct {
// contains filtered or unexported fields
}
ProjectFixtures represents data fixtures object.
func NewProjectFixtures ¶ added in v0.3.2
func NewProjectFixtures(db *gorm.DB) (*ProjectFixtures, error)
NewProjectFixtures creates new instance of ProjectFixtures.
func (ProjectFixtures) TruncateTables ¶ added in v0.4.0
func (f ProjectFixtures) TruncateTables() error
TruncateTables cleans database from the old data.
type RunFixtures ¶
type RunFixtures struct {
// contains filtered or unexported fields
}
RunFixtures represents data fixtures object.
func NewRunFixtures ¶
func NewRunFixtures(db *gorm.DB) (*RunFixtures, error)
NewRunFixtures creates new instance of RunFixtures.
func (RunFixtures) ArchiveRun ¶ added in v0.4.0
ArchiveRun archive existing runs by their ids.
func (RunFixtures) ArchiveRuns ¶ added in v0.3.0
ArchiveRuns soft-deletes existing Runs.
func (RunFixtures) CreateExampleRun ¶ added in v0.3.0
func (f RunFixtures) CreateExampleRun( ctx context.Context, exp *models.Experiment, ) (*models.Run, error)
CreateExampleRun creates one example run belonging to the experiment, with tags and metrics.
func (RunFixtures) CreateExampleRuns ¶ added in v0.3.0
func (f RunFixtures) CreateExampleRuns( ctx context.Context, exp *models.Experiment, num int, ) ([]*models.Run, error)
CreateExampleRuns creates some example runs belonging to the experiment, with tags and metrics.
func (RunFixtures) CreateMetric ¶ added in v0.4.0
CreateMetric creates a new test Metric.
func (RunFixtures) CreateMetrics ¶ added in v0.3.0
CreateMetrics creates some example metrics for a Run, up to count.
func (RunFixtures) CreateParams ¶ added in v0.3.0
CreateParams creates some example params for a Run, up to count.
func (RunFixtures) FindMinMaxRowNums ¶
func (f RunFixtures) FindMinMaxRowNums( ctx context.Context, experimentID int32, ) (int64, int64, error)
FindMinMaxRowNums finds min and max rownum for an experiment's runs.
func (RunFixtures) TruncateTables ¶ added in v0.4.0
func (f RunFixtures) TruncateTables() error
TruncateTables cleans database from the old data.
type TagFixtures ¶ added in v0.3.0
type TagFixtures struct {
// contains filtered or unexported fields
}
TagFixtures represents data fixtures object.
func NewTagFixtures ¶ added in v0.3.0
func NewTagFixtures(db *gorm.DB) (*TagFixtures, error)
NewTagFixtures creates new instance of TagFixtures.
func (TagFixtures) GetByRunID ¶ added in v0.3.0
GetByRunID returns tag list by requested Run ID.
func (TagFixtures) TruncateTables ¶ added in v0.4.0
func (f TagFixtures) TruncateTables() error
TruncateTables cleans database from the old data.