mocks

package
v0.0.0-...-b112479 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	mock.Mock
}

DB is an autogenerated mock type for the DB type

func NewDB

func NewDB(t mockConstructorTestingTNewDB) *DB

NewDB creates a new instance of DB. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*DB) ActiveExperimentConfig

func (_m *DB) ActiveExperimentConfig(id int) (expconf.ExperimentConfigV0, error)

ActiveExperimentConfig provides a mock function with given fields: id

func (*DB) AddAllocation

func (_m *DB) AddAllocation(a *model.Allocation) error

AddAllocation provides a mock function with given fields: a

func (*DB) AddAuthTokenKeypair

func (_m *DB) AddAuthTokenKeypair(tokenKeypair *model.AuthTokenKeypair) error

AddAuthTokenKeypair provides a mock function with given fields: tokenKeypair

func (*DB) AddExperiment

func (_m *DB) AddExperiment(experiment *model.Experiment, activeConfig expconf.ExperimentConfigV0) error

AddExperiment provides a mock function with given fields: experiment, activeConfig

func (*DB) AddTask

func (_m *DB) AddTask(t *model.Task) error

AddTask provides a mock function with given fields: t

func (*DB) AddTrainingMetrics

func (_m *DB) AddTrainingMetrics(ctx context.Context, m *trialv1.TrialMetrics) error

AddTrainingMetrics provides a mock function with given fields: ctx, m

func (*DB) AddTrial

func (_m *DB) AddTrial(trial *model.Trial) error

AddTrial provides a mock function with given fields: trial

func (*DB) AddUser

func (_m *DB) AddUser(user *model.User, ug *model.AgentUserGroup) (model.UserID, error)

AddUser provides a mock function with given fields: user, ug

func (*DB) AddValidationMetrics

func (_m *DB) AddValidationMetrics(ctx context.Context, m *trialv1.TrialMetrics) error

AddValidationMetrics provides a mock function with given fields: ctx, m

func (*DB) AgentUserGroup

func (_m *DB) AgentUserGroup(userID model.UserID) (*model.AgentUserGroup, error)

AgentUserGroup provides a mock function with given fields: userID

func (*DB) AuthTokenKeypair

func (_m *DB) AuthTokenKeypair() (*model.AuthTokenKeypair, error)

AuthTokenKeypair provides a mock function with given fields:

func (*DB) CheckExperimentExists

func (_m *DB) CheckExperimentExists(id int) (bool, error)

CheckExperimentExists provides a mock function with given fields: id

func (*DB) CheckTrialExists

func (_m *DB) CheckTrialExists(id int) (bool, error)

CheckTrialExists provides a mock function with given fields: id

func (*DB) CheckpointByTotalBatches

func (_m *DB) CheckpointByTotalBatches(trialID int, totalBatches int) (*model.Checkpoint, error)

CheckpointByTotalBatches provides a mock function with given fields: trialID, totalBatches

func (*DB) CheckpointByUUID

func (_m *DB) CheckpointByUUID(id uuid.UUID) (*model.Checkpoint, error)

CheckpointByUUID provides a mock function with given fields: id

func (*DB) Close

func (_m *DB) Close() error

Close provides a mock function with given fields:

func (*DB) CompleteAllocation

func (_m *DB) CompleteAllocation(a *model.Allocation) error

CompleteAllocation provides a mock function with given fields: a

func (*DB) CompleteAllocationTelemetry

func (_m *DB) CompleteAllocationTelemetry(aID model.AllocationID) ([]byte, error)

CompleteAllocationTelemetry provides a mock function with given fields: aID

func (*DB) DeleteAllocationSession

func (_m *DB) DeleteAllocationSession(allocationID model.AllocationID) error

DeleteAllocationSession provides a mock function with given fields: allocationID

func (*DB) DeleteExperiment

func (_m *DB) DeleteExperiment(id int) error

DeleteExperiment provides a mock function with given fields: id

func (*DB) DeleteSnapshotsForExperiment

func (_m *DB) DeleteSnapshotsForExperiment(experimentID int) error

DeleteSnapshotsForExperiment provides a mock function with given fields: experimentID

func (*DB) DeleteSnapshotsForTerminalExperiments

func (_m *DB) DeleteSnapshotsForTerminalExperiments() error

DeleteSnapshotsForTerminalExperiments provides a mock function with given fields:

func (*DB) DeleteTemplate

func (_m *DB) DeleteTemplate(name string) error

DeleteTemplate provides a mock function with given fields: name

func (*DB) DeleteTrialLogs

func (_m *DB) DeleteTrialLogs(ids []int) error

DeleteTrialLogs provides a mock function with given fields: ids

func (*DB) DeleteUserSessionByID

func (_m *DB) DeleteUserSessionByID(sessionID model.SessionID) error

DeleteUserSessionByID provides a mock function with given fields: sessionID

func (*DB) DeleteUserSessionByToken

func (_m *DB) DeleteUserSessionByToken(userSessionToken string) error

DeleteUserSessionByToken provides a mock function with given fields: userSessionToken

func (*DB) EndAllAgentStats

func (_m *DB) EndAllAgentStats() error

EndAllAgentStats provides a mock function with given fields:

func (*DB) EndAllInstanceStats

func (_m *DB) EndAllInstanceStats() error

EndAllInstanceStats provides a mock function with given fields:

func (*DB) EndAllTaskStats

func (_m *DB) EndAllTaskStats() error

EndAllTaskStats provides a mock function with given fields:

func (*DB) EndInstanceStats

func (_m *DB) EndInstanceStats(a *model.InstanceStats) error

EndInstanceStats provides a mock function with given fields: a

func (*DB) ExperimentBestSearcherValidation

func (_m *DB) ExperimentBestSearcherValidation(id int) (float32, error)

ExperimentBestSearcherValidation provides a mock function with given fields: id

func (*DB) ExperimentByID

func (_m *DB) ExperimentByID(id int) (*model.Experiment, error)

ExperimentByID provides a mock function with given fields: id

func (*DB) ExperimentByTrialID

func (_m *DB) ExperimentByTrialID(trialID int) (*model.Experiment, error)

ExperimentByTrialID provides a mock function with given fields: trialID

func (*DB) ExperimentCheckpointsToGCRaw

func (_m *DB) ExperimentCheckpointsToGCRaw(id int, experimentBest int, trialBest int, trialLatest int) ([]uuid.UUID, error)

ExperimentCheckpointsToGCRaw provides a mock function with given fields: id, experimentBest, trialBest, trialLatest

func (*DB) ExperimentHasCheckpointsInRegistry

func (_m *DB) ExperimentHasCheckpointsInRegistry(id int) (bool, error)

ExperimentHasCheckpointsInRegistry provides a mock function with given fields: id

func (*DB) ExperimentIDByTrialID

func (_m *DB) ExperimentIDByTrialID(trialID int) (int, error)

ExperimentIDByTrialID provides a mock function with given fields: trialID

func (*DB) ExperimentLabelUsage

func (_m *DB) ExperimentLabelUsage(projectID int32) (map[string]int, error)

ExperimentLabelUsage provides a mock function with given fields: projectID

func (*DB) ExperimentModelDefinitionRaw

func (_m *DB) ExperimentModelDefinitionRaw(id int) ([]byte, error)

ExperimentModelDefinitionRaw provides a mock function with given fields: id

func (*DB) ExperimentNumSteps

func (_m *DB) ExperimentNumSteps(id int) (int64, error)

ExperimentNumSteps provides a mock function with given fields: id

func (*DB) ExperimentNumTrials

func (_m *DB) ExperimentNumTrials(id int) (int64, error)

ExperimentNumTrials provides a mock function with given fields: id

func (*DB) ExperimentSnapshot

func (_m *DB) ExperimentSnapshot(experimentID int) ([]byte, int, error)

ExperimentSnapshot provides a mock function with given fields: experimentID

func (*DB) ExperimentTotalStepTime

func (_m *DB) ExperimentTotalStepTime(id int) (float64, error)

ExperimentTotalStepTime provides a mock function with given fields: id

func (*DB) ExperimentTrialAndTaskIDs

func (_m *DB) ExperimentTrialAndTaskIDs(expID int) ([]int, []model.TaskID, error)

ExperimentTrialAndTaskIDs provides a mock function with given fields: expID

func (*DB) ExperimentTrialIDs

func (_m *DB) ExperimentTrialIDs(expID int) ([]int, error)

ExperimentTrialIDs provides a mock function with given fields: expID

func (*DB) GetExperimentStatus

func (_m *DB) GetExperimentStatus(experimentID int) (model.State, float64, error)

GetExperimentStatus provides a mock function with given fields: experimentID

func (*DB) GetOrCreateClusterID

func (_m *DB) GetOrCreateClusterID() (string, error)

GetOrCreateClusterID provides a mock function with given fields:

func (*DB) GetTrialProfilerMetricsBatches

func (_m *DB) GetTrialProfilerMetricsBatches(labelsJSON []byte, offset int, limit int) (model.TrialProfilerMetricsBatchBatch, error)

GetTrialProfilerMetricsBatches provides a mock function with given fields: labelsJSON, offset, limit

func (*DB) InsertTrialProfilerMetricsBatch

func (_m *DB) InsertTrialProfilerMetricsBatch(values []float32, batches []int32, timestamps []time.Time, labels []byte) error

InsertTrialProfilerMetricsBatch provides a mock function with given fields: values, batches, timestamps, labels

func (*DB) LatestCheckpointForTrial

func (_m *DB) LatestCheckpointForTrial(trialID int) (*model.Checkpoint, error)

LatestCheckpointForTrial provides a mock function with given fields: trialID

func (*DB) MetricNames

func (_m *DB) MetricNames(experimentID int, sStartTime time.Time, vStartTime time.Time) ([]string, []string, time.Time, time.Time, error)

MetricNames provides a mock function with given fields: experimentID, sStartTime, vStartTime

func (*DB) Migrate

func (_m *DB) Migrate(migrationURL string, actions []string) error

Migrate provides a mock function with given fields: migrationURL, actions

func (*DB) NonTerminalExperiments

func (_m *DB) NonTerminalExperiments() ([]*model.Experiment, error)

NonTerminalExperiments provides a mock function with given fields:

func (*DB) PeriodicTelemetryInfo

func (_m *DB) PeriodicTelemetryInfo() ([]byte, error)

PeriodicTelemetryInfo provides a mock function with given fields:

func (*DB) ProjectByName

func (_m *DB) ProjectByName(workspaceName string, projectName string) (int, error)

ProjectByName provides a mock function with given fields: workspaceName, projectName

func (*DB) ProjectExperiments

func (_m *DB) ProjectExperiments(id int) ([]*model.Experiment, error)

ProjectExperiments provides a mock function with given fields: id

func (*DB) Query

func (_m *DB) Query(queryName string, v interface{}, params ...interface{}) error

Query provides a mock function with given fields: queryName, v, params

func (*DB) QueryF

func (_m *DB) QueryF(queryName string, args []interface{}, v interface{}, params ...interface{}) error

QueryF provides a mock function with given fields: queryName, args, v, params

func (*DB) QueryProto

func (_m *DB) QueryProto(queryName string, v interface{}, args ...interface{}) error

QueryProto provides a mock function with given fields: queryName, v, args

func (*DB) QueryProtof

func (_m *DB) QueryProtof(queryName string, args []interface{}, v interface{}, params ...interface{}) error

QueryProtof provides a mock function with given fields: queryName, args, v, params

func (*DB) RawQuery

func (_m *DB) RawQuery(queryName string, params ...interface{}) ([]byte, error)

RawQuery provides a mock function with given fields: queryName, params

func (*DB) RecordAgentStats

func (_m *DB) RecordAgentStats(a *model.AgentStats) error

RecordAgentStats provides a mock function with given fields: a

func (*DB) RecordInstanceStats

func (_m *DB) RecordInstanceStats(a *model.InstanceStats) error

RecordInstanceStats provides a mock function with given fields: a

func (*DB) RecordTaskEndStats

func (_m *DB) RecordTaskEndStats(stats *model.TaskStats) error

RecordTaskEndStats provides a mock function with given fields: stats

func (*DB) RecordTaskStats

func (_m *DB) RecordTaskStats(stats *model.TaskStats) error

RecordTaskStats provides a mock function with given fields: stats

func (*DB) SaveExperimentArchiveStatus

func (_m *DB) SaveExperimentArchiveStatus(experiment *model.Experiment) error

SaveExperimentArchiveStatus provides a mock function with given fields: experiment

func (*DB) SaveExperimentConfig

func (_m *DB) SaveExperimentConfig(id int, config expconf.ExperimentConfigV0) error

SaveExperimentConfig provides a mock function with given fields: id, config

func (*DB) SaveExperimentProgress

func (_m *DB) SaveExperimentProgress(id int, progress *float64) error

SaveExperimentProgress provides a mock function with given fields: id, progress

func (*DB) SaveExperimentState

func (_m *DB) SaveExperimentState(experiment *model.Experiment) error

SaveExperimentState provides a mock function with given fields: experiment

func (*DB) SaveSnapshot

func (_m *DB) SaveSnapshot(experimentID int, version int, experimentSnapshot []byte) error

SaveSnapshot provides a mock function with given fields: experimentID, version, experimentSnapshot

func (*DB) StartAllocationSession

func (_m *DB) StartAllocationSession(allocationID model.AllocationID, owner *model.User) (string, error)

StartAllocationSession provides a mock function with given fields: allocationID, owner

func (*DB) StartUserSession

func (_m *DB) StartUserSession(user *model.User) (string, error)

StartUserSession provides a mock function with given fields: user

func (*DB) TemplateByName

func (_m *DB) TemplateByName(name string) (model.Template, error)

TemplateByName provides a mock function with given fields: name

func (*DB) TemplateList

func (_m *DB) TemplateList() ([]model.Template, error)

TemplateList provides a mock function with given fields:

func (*DB) TerminateExperimentInRestart

func (_m *DB) TerminateExperimentInRestart(id int, state model.State) error

TerminateExperimentInRestart provides a mock function with given fields: id, state

func (*DB) TopTrialsByMetric

func (_m *DB) TopTrialsByMetric(experimentID int, maxTrials int, metric string, smallerIsBetter bool) ([]int32, error)

TopTrialsByMetric provides a mock function with given fields: experimentID, maxTrials, metric, smallerIsBetter

func (*DB) TopTrialsByTrainingLength

func (_m *DB) TopTrialsByTrainingLength(experimentID int, maxTrials int, metric string, smallerIsBetter bool) ([]int32, error)

TopTrialsByTrainingLength provides a mock function with given fields: experimentID, maxTrials, metric, smallerIsBetter

func (*DB) TrainingMetricBatches

func (_m *DB) TrainingMetricBatches(experimentID int, metricName string, startTime time.Time) ([]int32, time.Time, error)

TrainingMetricBatches provides a mock function with given fields: experimentID, metricName, startTime

func (*DB) TrainingTrialsSnapshot

func (_m *DB) TrainingTrialsSnapshot(experimentID int, minBatches int, maxBatches int, metricName string, startTime time.Time) ([]*apiv1.TrialsSnapshotResponse_Trial, time.Time, error)

TrainingTrialsSnapshot provides a mock function with given fields: experimentID, minBatches, maxBatches, metricName, startTime

func (*DB) TrialByExperimentAndRequestID

func (_m *DB) TrialByExperimentAndRequestID(experimentID int, requestID model.RequestID) (*model.Trial, error)

TrialByExperimentAndRequestID provides a mock function with given fields: experimentID, requestID

func (*DB) TrialByID

func (_m *DB) TrialByID(id int) (*model.Trial, error)

TrialByID provides a mock function with given fields: id

func (*DB) TrialExperimentAndRequestID

func (_m *DB) TrialExperimentAndRequestID(id int) (int, model.RequestID, error)

TrialExperimentAndRequestID provides a mock function with given fields: id

func (*DB) TrialLogs

func (_m *DB) TrialLogs(trialID int, limit int, fs []api.Filter, order apiv1.OrderBy, followState interface{}) ([]*model.TrialLog, interface{}, error)

TrialLogs provides a mock function with given fields: trialID, limit, fs, order, followState

func (*DB) TrialLogsCount

func (_m *DB) TrialLogsCount(trialID int, fs []api.Filter) (int, error)

TrialLogsCount provides a mock function with given fields: trialID, fs

func (*DB) TrialLogsFields

func (_m *DB) TrialLogsFields(trialID int) (*apiv1.TrialLogsFieldsResponse, error)

TrialLogsFields provides a mock function with given fields: trialID

func (*DB) TrialRunIDAndRestarts

func (_m *DB) TrialRunIDAndRestarts(trialID int) (int, int, error)

TrialRunIDAndRestarts provides a mock function with given fields: trialID

func (*DB) TrialState

func (_m *DB) TrialState(trialID int) (model.State, error)

TrialState provides a mock function with given fields: trialID

func (*DB) TrialStatus

func (_m *DB) TrialStatus(trialID int) (model.State, *time.Time, error)

TrialStatus provides a mock function with given fields: trialID

func (*DB) UpdateAllocationStartTime

func (_m *DB) UpdateAllocationStartTime(allocation model.Allocation) error

UpdateAllocationStartTime provides a mock function with given fields: allocation

func (*DB) UpdateAllocationState

func (_m *DB) UpdateAllocationState(allocation model.Allocation) error

UpdateAllocationState provides a mock function with given fields: allocation

func (*DB) UpdateResourceAllocationAggregation

func (_m *DB) UpdateResourceAllocationAggregation() error

UpdateResourceAllocationAggregation provides a mock function with given fields:

func (*DB) UpdateTrial

func (_m *DB) UpdateTrial(id int, newState model.State) error

UpdateTrial provides a mock function with given fields: id, newState

func (*DB) UpdateTrialRestarts

func (_m *DB) UpdateTrialRestarts(id int, restarts int) error

UpdateTrialRestarts provides a mock function with given fields: id, restarts

func (*DB) UpdateTrialRunID

func (_m *DB) UpdateTrialRunID(id int, runID int) error

UpdateTrialRunID provides a mock function with given fields: id, runID

func (*DB) UpdateTrialRunnerMetadata

func (_m *DB) UpdateTrialRunnerMetadata(id int, md *trialv1.TrialRunnerMetadata) error

UpdateTrialRunnerMetadata provides a mock function with given fields: id, md

func (*DB) UpdateTrialRunnerState

func (_m *DB) UpdateTrialRunnerState(id int, state string) error

UpdateTrialRunnerState provides a mock function with given fields: id, state

func (*DB) UpdateUser

func (_m *DB) UpdateUser(updated *model.User, toUpdate []string, ug *model.AgentUserGroup) error

UpdateUser provides a mock function with given fields: updated, toUpdate, ug

func (*DB) UpdateUsername

func (_m *DB) UpdateUsername(userID *model.UserID, newUsername string) error

UpdateUsername provides a mock function with given fields: userID, newUsername

func (*DB) UpsertTemplate

func (_m *DB) UpsertTemplate(tpl *model.Template) error

UpsertTemplate provides a mock function with given fields: tpl

func (*DB) UserList

func (_m *DB) UserList() ([]model.FullUser, error)

UserList provides a mock function with given fields:

func (*DB) ValidationByTotalBatches

func (_m *DB) ValidationByTotalBatches(trialID int, totalBatches int) (*model.TrialMetrics, error)

ValidationByTotalBatches provides a mock function with given fields: trialID, totalBatches

func (*DB) ValidationMetricBatches

func (_m *DB) ValidationMetricBatches(experimentID int, metricName string, startTime time.Time) ([]int32, time.Time, error)

ValidationMetricBatches provides a mock function with given fields: experimentID, metricName, startTime

func (*DB) ValidationTrialsSnapshot

func (_m *DB) ValidationTrialsSnapshot(experimentID int, minBatches int, maxBatches int, metricName string, startTime time.Time) ([]*apiv1.TrialsSnapshotResponse_Trial, time.Time, error)

ValidationTrialsSnapshot provides a mock function with given fields: experimentID, minBatches, maxBatches, metricName, startTime

type ExperimentAuthZ

type ExperimentAuthZ struct {
	mock.Mock
}

ExperimentAuthZ is an autogenerated mock type for the ExperimentAuthZ type

func NewExperimentAuthZ

func NewExperimentAuthZ(t mockConstructorTestingTNewExperimentAuthZ) *ExperimentAuthZ

NewExperimentAuthZ creates a new instance of ExperimentAuthZ. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ExperimentAuthZ) CanCreateExperiment

func (_m *ExperimentAuthZ) CanCreateExperiment(ctx context.Context, curUser model.User, proj *projectv1.Project, e *model.Experiment) error

CanCreateExperiment provides a mock function with given fields: ctx, curUser, proj, e

func (*ExperimentAuthZ) CanDeleteExperiment

func (_m *ExperimentAuthZ) CanDeleteExperiment(ctx context.Context, curUser model.User, e *model.Experiment) error

CanDeleteExperiment provides a mock function with given fields: ctx, curUser, e

func (*ExperimentAuthZ) CanEditExperiment

func (_m *ExperimentAuthZ) CanEditExperiment(ctx context.Context, curUser model.User, e *model.Experiment) error

CanEditExperiment provides a mock function with given fields: ctx, curUser, e

func (*ExperimentAuthZ) CanEditExperimentsMetadata

func (_m *ExperimentAuthZ) CanEditExperimentsMetadata(ctx context.Context, curUser model.User, e *model.Experiment) error

CanEditExperimentsMetadata provides a mock function with given fields: ctx, curUser, e

func (*ExperimentAuthZ) CanForkFromExperiment

func (_m *ExperimentAuthZ) CanForkFromExperiment(ctx context.Context, curUser model.User, e *model.Experiment) error

CanForkFromExperiment provides a mock function with given fields: ctx, curUser, e

func (*ExperimentAuthZ) CanGetExperiment

func (_m *ExperimentAuthZ) CanGetExperiment(ctx context.Context, curUser model.User, e *model.Experiment) (bool, error)

CanGetExperiment provides a mock function with given fields: ctx, curUser, e

func (*ExperimentAuthZ) CanGetExperimentArtifacts

func (_m *ExperimentAuthZ) CanGetExperimentArtifacts(ctx context.Context, curUser model.User, e *model.Experiment) error

CanGetExperimentArtifacts provides a mock function with given fields: ctx, curUser, e

func (*ExperimentAuthZ) CanPreviewHPSearch

func (_m *ExperimentAuthZ) CanPreviewHPSearch(ctx context.Context, curUser model.User) error

CanPreviewHPSearch provides a mock function with given fields: ctx, curUser

func (*ExperimentAuthZ) CanRunCustomSearch

func (_m *ExperimentAuthZ) CanRunCustomSearch(ctx context.Context, curUser model.User, e *model.Experiment) error

CanRunCustomSearch provides a mock function with given fields: ctx, curUser, e

func (*ExperimentAuthZ) CanSetExperimentsCheckpointGCPolicy

func (_m *ExperimentAuthZ) CanSetExperimentsCheckpointGCPolicy(ctx context.Context, curUser model.User, e *model.Experiment) error

CanSetExperimentsCheckpointGCPolicy provides a mock function with given fields: ctx, curUser, e

func (*ExperimentAuthZ) CanSetExperimentsMaxSlots

func (_m *ExperimentAuthZ) CanSetExperimentsMaxSlots(ctx context.Context, curUser model.User, e *model.Experiment, slots int) error

CanSetExperimentsMaxSlots provides a mock function with given fields: ctx, curUser, e, slots

func (*ExperimentAuthZ) CanSetExperimentsPriority

func (_m *ExperimentAuthZ) CanSetExperimentsPriority(ctx context.Context, curUser model.User, e *model.Experiment, priority int) error

CanSetExperimentsPriority provides a mock function with given fields: ctx, curUser, e, priority

func (*ExperimentAuthZ) CanSetExperimentsWeight

func (_m *ExperimentAuthZ) CanSetExperimentsWeight(ctx context.Context, curUser model.User, e *model.Experiment, weight float64) error

CanSetExperimentsWeight provides a mock function with given fields: ctx, curUser, e, weight

func (*ExperimentAuthZ) FilterExperimentLabelsQuery

func (_m *ExperimentAuthZ) FilterExperimentLabelsQuery(ctx context.Context, curUser model.User, proj *projectv1.Project, query *bun.SelectQuery) (*bun.SelectQuery, error)

FilterExperimentLabelsQuery provides a mock function with given fields: ctx, curUser, proj, query

func (*ExperimentAuthZ) FilterExperimentsQuery

func (_m *ExperimentAuthZ) FilterExperimentsQuery(ctx context.Context, curUser model.User, proj *projectv1.Project, query *bun.SelectQuery, permissions []rbacv1.PermissionType) (*bun.SelectQuery, error)

FilterExperimentsQuery provides a mock function with given fields: ctx, curUser, proj, query, permissions

type ModelAuthZ

type ModelAuthZ struct {
	mock.Mock
}

ModelAuthZ is an autogenerated mock type for the ModelAuthZ type

func NewModelAuthZ

func NewModelAuthZ(t mockConstructorTestingTNewModelAuthZ) *ModelAuthZ

NewModelAuthZ creates a new instance of ModelAuthZ. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ModelAuthZ) CanCreateModel

func (_m *ModelAuthZ) CanCreateModel(ctx context.Context, curUser model.User, workspaceID int32) error

CanCreateModel provides a mock function with given fields: ctx, curUser, workspaceID

func (*ModelAuthZ) CanDeleteModel

func (_m *ModelAuthZ) CanDeleteModel(ctx context.Context, curUser model.User, m *modelv1.Model, workspaceID int32) error

CanDeleteModel provides a mock function with given fields: ctx, curUser, m, workspaceID

func (*ModelAuthZ) CanEditModel

func (_m *ModelAuthZ) CanEditModel(ctx context.Context, curUser model.User, m *modelv1.Model, workspaceID int32) error

CanEditModel provides a mock function with given fields: ctx, curUser, m, workspaceID

func (*ModelAuthZ) CanGetModel

func (_m *ModelAuthZ) CanGetModel(ctx context.Context, curUser model.User, m *modelv1.Model, workspaceID int32) (bool, error)

CanGetModel provides a mock function with given fields: ctx, curUser, m, workspaceID

func (*ModelAuthZ) CanGetModels

func (_m *ModelAuthZ) CanGetModels(ctx context.Context, curUser model.User, workspaceIDs []int32) ([]int32, bool, error)

CanGetModels provides a mock function with given fields: ctx, curUser, workspaceIDs

func (*ModelAuthZ) CanMoveModel

func (_m *ModelAuthZ) CanMoveModel(ctx context.Context, curUser model.User, _a2 *modelv1.Model, fromWorkspaceID int32, toWorkspaceID int32) error

CanMoveModel provides a mock function with given fields: ctx, curUser, _a2, fromWorkspaceID, toWorkspaceID

func (*ModelAuthZ) FilterReadableModelsQuery

func (_m *ModelAuthZ) FilterReadableModelsQuery(ctx context.Context, curUser model.User, query *bun.SelectQuery) (*bun.SelectQuery, error)

FilterReadableModelsQuery provides a mock function with given fields: ctx, curUser, query

type NSCAuthZ

type NSCAuthZ struct {
	mock.Mock
}

NSCAuthZ is an autogenerated mock type for the NSCAuthZ type

func NewNSCAuthZ

func NewNSCAuthZ(t mockConstructorTestingTNewNSCAuthZ) *NSCAuthZ

NewNSCAuthZ creates a new instance of NSCAuthZ. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*NSCAuthZ) AccessibleScopes

func (_m *NSCAuthZ) AccessibleScopes(ctx context.Context, curUser model.User, requestedScope model.AccessScopeID) (map[model.AccessScopeID]bool, error)

AccessibleScopes provides a mock function with given fields: ctx, curUser, requestedScope

func (*NSCAuthZ) CanCreateNSC

func (_m *NSCAuthZ) CanCreateNSC(ctx context.Context, curUser model.User, workspaceID model.AccessScopeID) error

CanCreateNSC provides a mock function with given fields: ctx, curUser, workspaceID

func (*NSCAuthZ) CanGetActiveTasksCount

func (_m *NSCAuthZ) CanGetActiveTasksCount(ctx context.Context, curUser model.User) error

CanGetActiveTasksCount provides a mock function with given fields: ctx, curUser

func (*NSCAuthZ) CanGetNSC

func (_m *NSCAuthZ) CanGetNSC(ctx context.Context, curUser model.User, workspaceID model.AccessScopeID) (bool, error)

CanGetNSC provides a mock function with given fields: ctx, curUser, workspaceID

func (*NSCAuthZ) CanGetTensorboard

func (_m *NSCAuthZ) CanGetTensorboard(ctx context.Context, curUser model.User, workspaceID model.AccessScopeID, experimentIDs []int32, trialIDs []int32) (bool, error)

CanGetTensorboard provides a mock function with given fields: ctx, curUser, workspaceID, experimentIDs, trialIDs

func (*NSCAuthZ) CanSetNSCsPriority

func (_m *NSCAuthZ) CanSetNSCsPriority(ctx context.Context, curUser model.User, workspaceID model.AccessScopeID, priority int) error

CanSetNSCsPriority provides a mock function with given fields: ctx, curUser, workspaceID, priority

func (*NSCAuthZ) CanTerminateNSC

func (_m *NSCAuthZ) CanTerminateNSC(ctx context.Context, curUser model.User, workspaceID model.AccessScopeID) error

CanTerminateNSC provides a mock function with given fields: ctx, curUser, workspaceID

func (*NSCAuthZ) CanTerminateTensorboard

func (_m *NSCAuthZ) CanTerminateTensorboard(ctx context.Context, curUser model.User, workspaceID model.AccessScopeID) error

CanTerminateTensorboard provides a mock function with given fields: ctx, curUser, workspaceID

func (*NSCAuthZ) FilterTensorboards

func (_m *NSCAuthZ) FilterTensorboards(ctx context.Context, curUser model.User, requestedScope model.AccessScopeID, tensorboards []*tensorboardv1.Tensorboard) ([]*tensorboardv1.Tensorboard, error)

FilterTensorboards provides a mock function with given fields: ctx, curUser, requestedScope, tensorboards

type ProjectAuthZ

type ProjectAuthZ struct {
	mock.Mock
}

ProjectAuthZ is an autogenerated mock type for the ProjectAuthZ type

func NewProjectAuthZ

func NewProjectAuthZ(t mockConstructorTestingTNewProjectAuthZ) *ProjectAuthZ

NewProjectAuthZ creates a new instance of ProjectAuthZ. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ProjectAuthZ) CanArchiveProject

func (_m *ProjectAuthZ) CanArchiveProject(ctx context.Context, curUser model.User, _a2 *projectv1.Project) error

CanArchiveProject provides a mock function with given fields: ctx, curUser, _a2

func (*ProjectAuthZ) CanCreateProject

func (_m *ProjectAuthZ) CanCreateProject(ctx context.Context, curUser model.User, targetWorkspace *workspacev1.Workspace) error

CanCreateProject provides a mock function with given fields: ctx, curUser, targetWorkspace

func (*ProjectAuthZ) CanDeleteProject

func (_m *ProjectAuthZ) CanDeleteProject(ctx context.Context, curUser model.User, targetProject *projectv1.Project) error

CanDeleteProject provides a mock function with given fields: ctx, curUser, targetProject

func (*ProjectAuthZ) CanGetProject

func (_m *ProjectAuthZ) CanGetProject(ctx context.Context, curUser model.User, _a2 *projectv1.Project) (bool, error)

CanGetProject provides a mock function with given fields: ctx, curUser, _a2

func (*ProjectAuthZ) CanMoveProject

func (_m *ProjectAuthZ) CanMoveProject(ctx context.Context, curUser model.User, _a2 *projectv1.Project, from *workspacev1.Workspace, to *workspacev1.Workspace) error

CanMoveProject provides a mock function with given fields: ctx, curUser, _a2, from, to

func (*ProjectAuthZ) CanMoveProjectExperiments

func (_m *ProjectAuthZ) CanMoveProjectExperiments(ctx context.Context, curUser model.User, exp *model.Experiment, from *projectv1.Project, to *projectv1.Project) error

CanMoveProjectExperiments provides a mock function with given fields: ctx, curUser, exp, from, to

func (*ProjectAuthZ) CanSetProjectDescription

func (_m *ProjectAuthZ) CanSetProjectDescription(ctx context.Context, curUser model.User, _a2 *projectv1.Project) error

CanSetProjectDescription provides a mock function with given fields: ctx, curUser, _a2

func (*ProjectAuthZ) CanSetProjectName

func (_m *ProjectAuthZ) CanSetProjectName(ctx context.Context, curUser model.User, _a2 *projectv1.Project) error

CanSetProjectName provides a mock function with given fields: ctx, curUser, _a2

func (*ProjectAuthZ) CanSetProjectNotes

func (_m *ProjectAuthZ) CanSetProjectNotes(ctx context.Context, curUser model.User, _a2 *projectv1.Project) error

CanSetProjectNotes provides a mock function with given fields: ctx, curUser, _a2

func (*ProjectAuthZ) CanUnarchiveProject

func (_m *ProjectAuthZ) CanUnarchiveProject(ctx context.Context, curUser model.User, _a2 *projectv1.Project) error

CanUnarchiveProject provides a mock function with given fields: ctx, curUser, _a2

type Resources

type Resources struct {
	mock.Mock
}

Resources is an autogenerated mock type for the Resources type

func NewResources

func NewResources(t mockConstructorTestingTNewResources) *Resources

NewResources creates a new instance of Resources. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Resources) Kill

func (_m *Resources) Kill(_a0 *actor.Context, _a1 logger.Context)

Kill provides a mock function with given fields: _a0, _a1

func (*Resources) Start

Start provides a mock function with given fields: _a0, _a1, _a2, _a3

func (*Resources) Summary

func (_m *Resources) Summary() sproto.ResourcesSummary

Summary provides a mock function with given fields:

type UserAuthZ

type UserAuthZ struct {
	mock.Mock
}

UserAuthZ is an autogenerated mock type for the UserAuthZ type

func NewUserAuthZ

func NewUserAuthZ(t mockConstructorTestingTNewUserAuthZ) *UserAuthZ

NewUserAuthZ creates a new instance of UserAuthZ. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*UserAuthZ) CanCreateUser

func (_m *UserAuthZ) CanCreateUser(ctx context.Context, curUser model.User, userToAdd model.User, agentUserGroup *model.AgentUserGroup) error

CanCreateUser provides a mock function with given fields: ctx, curUser, userToAdd, agentUserGroup

func (*UserAuthZ) CanCreateUsersOwnSetting

func (_m *UserAuthZ) CanCreateUsersOwnSetting(ctx context.Context, curUser model.User, setting model.UserWebSetting) error

CanCreateUsersOwnSetting provides a mock function with given fields: ctx, curUser, setting

func (*UserAuthZ) CanGetUser

func (_m *UserAuthZ) CanGetUser(ctx context.Context, curUser model.User, targetUser model.User) (bool, error)

CanGetUser provides a mock function with given fields: ctx, curUser, targetUser

func (*UserAuthZ) CanGetUsersImage

func (_m *UserAuthZ) CanGetUsersImage(ctx context.Context, curUser model.User, targetUsername model.User) error

CanGetUsersImage provides a mock function with given fields: ctx, curUser, targetUsername

func (*UserAuthZ) CanGetUsersOwnSettings

func (_m *UserAuthZ) CanGetUsersOwnSettings(ctx context.Context, curUser model.User) error

CanGetUsersOwnSettings provides a mock function with given fields: ctx, curUser

func (*UserAuthZ) CanResetUsersOwnSettings

func (_m *UserAuthZ) CanResetUsersOwnSettings(ctx context.Context, curUser model.User) error

CanResetUsersOwnSettings provides a mock function with given fields: ctx, curUser

func (*UserAuthZ) CanSetUsersActive

func (_m *UserAuthZ) CanSetUsersActive(ctx context.Context, curUser model.User, targetUser model.User, toActiveVal bool) error

CanSetUsersActive provides a mock function with given fields: ctx, curUser, targetUser, toActiveVal

func (*UserAuthZ) CanSetUsersAdmin

func (_m *UserAuthZ) CanSetUsersAdmin(ctx context.Context, curUser model.User, targetUser model.User, toAdminVal bool) error

CanSetUsersAdmin provides a mock function with given fields: ctx, curUser, targetUser, toAdminVal

func (*UserAuthZ) CanSetUsersAgentUserGroup

func (_m *UserAuthZ) CanSetUsersAgentUserGroup(ctx context.Context, curUser model.User, targetUser model.User, agentUserGroup model.AgentUserGroup) error

CanSetUsersAgentUserGroup provides a mock function with given fields: ctx, curUser, targetUser, agentUserGroup

func (*UserAuthZ) CanSetUsersDisplayName

func (_m *UserAuthZ) CanSetUsersDisplayName(ctx context.Context, curUser model.User, targetUser model.User) error

CanSetUsersDisplayName provides a mock function with given fields: ctx, curUser, targetUser

func (*UserAuthZ) CanSetUsersPassword

func (_m *UserAuthZ) CanSetUsersPassword(ctx context.Context, curUser model.User, targetUser model.User) error

CanSetUsersPassword provides a mock function with given fields: ctx, curUser, targetUser

func (*UserAuthZ) CanSetUsersRemote

func (_m *UserAuthZ) CanSetUsersRemote(ctx context.Context, curUser model.User) error

CanSetUsersRemote provides a mock function with given fields: ctx, curUser

func (*UserAuthZ) CanSetUsersUsername

func (_m *UserAuthZ) CanSetUsersUsername(ctx context.Context, curUser model.User, targetUser model.User) error

CanSetUsersUsername provides a mock function with given fields: ctx, curUser, targetUser

func (*UserAuthZ) FilterUserList

func (_m *UserAuthZ) FilterUserList(ctx context.Context, curUser model.User, users []model.FullUser) ([]model.FullUser, error)

FilterUserList provides a mock function with given fields: ctx, curUser, users

type WorkspaceAuthZ

type WorkspaceAuthZ struct {
	mock.Mock
}

WorkspaceAuthZ is an autogenerated mock type for the WorkspaceAuthZ type

func NewWorkspaceAuthZ

func NewWorkspaceAuthZ(t mockConstructorTestingTNewWorkspaceAuthZ) *WorkspaceAuthZ

NewWorkspaceAuthZ creates a new instance of WorkspaceAuthZ. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*WorkspaceAuthZ) CanArchiveWorkspace

func (_m *WorkspaceAuthZ) CanArchiveWorkspace(ctx context.Context, curUser model.User, _a2 *workspacev1.Workspace) error

CanArchiveWorkspace provides a mock function with given fields: ctx, curUser, _a2

func (*WorkspaceAuthZ) CanCreateWorkspace

func (_m *WorkspaceAuthZ) CanCreateWorkspace(ctx context.Context, curUser model.User) error

CanCreateWorkspace provides a mock function with given fields: ctx, curUser

func (*WorkspaceAuthZ) CanCreateWorkspaceWithAgentUserGroup

func (_m *WorkspaceAuthZ) CanCreateWorkspaceWithAgentUserGroup(ctx context.Context, curUser model.User) error

CanCreateWorkspaceWithAgentUserGroup provides a mock function with given fields: ctx, curUser

func (*WorkspaceAuthZ) CanCreateWorkspaceWithCheckpointStorageConfig

func (_m *WorkspaceAuthZ) CanCreateWorkspaceWithCheckpointStorageConfig(ctx context.Context, curUser model.User) error

CanCreateWorkspaceWithCheckpointStorageConfig provides a mock function with given fields: ctx, curUser

func (*WorkspaceAuthZ) CanDeleteWorkspace

func (_m *WorkspaceAuthZ) CanDeleteWorkspace(ctx context.Context, curUser model.User, _a2 *workspacev1.Workspace) error

CanDeleteWorkspace provides a mock function with given fields: ctx, curUser, _a2

func (*WorkspaceAuthZ) CanGetWorkspace

func (_m *WorkspaceAuthZ) CanGetWorkspace(ctx context.Context, curUser model.User, _a2 *workspacev1.Workspace) (bool, error)

CanGetWorkspace provides a mock function with given fields: ctx, curUser, _a2

func (*WorkspaceAuthZ) CanPinWorkspace

func (_m *WorkspaceAuthZ) CanPinWorkspace(ctx context.Context, curUser model.User, _a2 *workspacev1.Workspace) error

CanPinWorkspace provides a mock function with given fields: ctx, curUser, _a2

func (*WorkspaceAuthZ) CanSetWorkspacesAgentUserGroup

func (_m *WorkspaceAuthZ) CanSetWorkspacesAgentUserGroup(ctx context.Context, curUser model.User, _a2 *workspacev1.Workspace) error

CanSetWorkspacesAgentUserGroup provides a mock function with given fields: ctx, curUser, _a2

func (*WorkspaceAuthZ) CanSetWorkspacesCheckpointStorageConfig

func (_m *WorkspaceAuthZ) CanSetWorkspacesCheckpointStorageConfig(ctx context.Context, curUser model.User, _a2 *workspacev1.Workspace) error

CanSetWorkspacesCheckpointStorageConfig provides a mock function with given fields: ctx, curUser, _a2

func (*WorkspaceAuthZ) CanSetWorkspacesName

func (_m *WorkspaceAuthZ) CanSetWorkspacesName(ctx context.Context, curUser model.User, _a2 *workspacev1.Workspace) error

CanSetWorkspacesName provides a mock function with given fields: ctx, curUser, _a2

func (*WorkspaceAuthZ) CanUnarchiveWorkspace

func (_m *WorkspaceAuthZ) CanUnarchiveWorkspace(ctx context.Context, curUser model.User, _a2 *workspacev1.Workspace) error

CanUnarchiveWorkspace provides a mock function with given fields: ctx, curUser, _a2

func (*WorkspaceAuthZ) CanUnpinWorkspace

func (_m *WorkspaceAuthZ) CanUnpinWorkspace(ctx context.Context, curUser model.User, _a2 *workspacev1.Workspace) error

CanUnpinWorkspace provides a mock function with given fields: ctx, curUser, _a2

func (*WorkspaceAuthZ) FilterWorkspaceProjects

func (_m *WorkspaceAuthZ) FilterWorkspaceProjects(ctx context.Context, curUser model.User, projects []*projectv1.Project) ([]*projectv1.Project, error)

FilterWorkspaceProjects provides a mock function with given fields: ctx, curUser, projects

func (*WorkspaceAuthZ) FilterWorkspaces

func (_m *WorkspaceAuthZ) FilterWorkspaces(ctx context.Context, curUser model.User, workspaces []*workspacev1.Workspace) ([]*workspacev1.Workspace, error)

FilterWorkspaces provides a mock function with given fields: ctx, curUser, workspaces

Jump to

Keyboard shortcuts

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