task

package
v0.0.0-...-ec03ccd Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecutionManager

type ExecutionManager struct {
	mock.Mock
}

ExecutionManager is an autogenerated mock type for the ExecutionManager type

func NewExecutionManager

func NewExecutionManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *ExecutionManager

NewExecutionManager creates a new instance of ExecutionManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*ExecutionManager) Count

func (_m *ExecutionManager) Count(ctx context.Context, query *q.Query) (int64, error)

Count provides a mock function with given fields: ctx, query

func (*ExecutionManager) Create

func (_m *ExecutionManager) Create(ctx context.Context, vendorType string, vendorID int64, trigger string, extraAttrs ...map[string]interface{}) (int64, error)

Create provides a mock function with given fields: ctx, vendorType, vendorID, trigger, extraAttrs

func (*ExecutionManager) Delete

func (_m *ExecutionManager) Delete(ctx context.Context, id int64) error

Delete provides a mock function with given fields: ctx, id

func (*ExecutionManager) DeleteByVendor

func (_m *ExecutionManager) DeleteByVendor(ctx context.Context, vendorType string, vendorID int64) error

DeleteByVendor provides a mock function with given fields: ctx, vendorType, vendorID

func (*ExecutionManager) Get

func (_m *ExecutionManager) Get(ctx context.Context, id int64) (*task.Execution, error)

Get provides a mock function with given fields: ctx, id

func (*ExecutionManager) List

func (_m *ExecutionManager) List(ctx context.Context, query *q.Query) ([]*task.Execution, error)

List provides a mock function with given fields: ctx, query

func (*ExecutionManager) MarkDone

func (_m *ExecutionManager) MarkDone(ctx context.Context, id int64, message string) error

MarkDone provides a mock function with given fields: ctx, id, message

func (*ExecutionManager) MarkError

func (_m *ExecutionManager) MarkError(ctx context.Context, id int64, message string) error

MarkError provides a mock function with given fields: ctx, id, message

func (*ExecutionManager) Stop

func (_m *ExecutionManager) Stop(ctx context.Context, id int64) error

Stop provides a mock function with given fields: ctx, id

func (*ExecutionManager) StopAndWait

func (_m *ExecutionManager) StopAndWait(ctx context.Context, id int64, timeout time.Duration) error

StopAndWait provides a mock function with given fields: ctx, id, timeout

func (*ExecutionManager) StopAndWaitWithError

func (_m *ExecutionManager) StopAndWaitWithError(ctx context.Context, id int64, timeout time.Duration, origError error) error

StopAndWaitWithError provides a mock function with given fields: ctx, id, timeout, origError

func (*ExecutionManager) UpdateExtraAttrs

func (_m *ExecutionManager) UpdateExtraAttrs(ctx context.Context, id int64, extraAttrs map[string]interface{}) error

UpdateExtraAttrs provides a mock function with given fields: ctx, id, extraAttrs

type Manager

type Manager struct {
	mock.Mock
}

Manager is an autogenerated mock type for the Manager type

func NewManager

func NewManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *Manager

NewManager creates a new instance of Manager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Manager) Count

func (_m *Manager) Count(ctx context.Context, query *q.Query) (int64, error)

Count provides a mock function with given fields: ctx, query

func (*Manager) Create

func (_m *Manager) Create(ctx context.Context, executionID int64, job *task.Job, extraAttrs ...map[string]interface{}) (int64, error)

Create provides a mock function with given fields: ctx, executionID, job, extraAttrs

func (*Manager) ExecutionIDsByVendorAndStatus

func (_m *Manager) ExecutionIDsByVendorAndStatus(ctx context.Context, vendorType string, status string) ([]int64, error)

ExecutionIDsByVendorAndStatus provides a mock function with given fields: ctx, vendorType, status

func (*Manager) Get

func (_m *Manager) Get(ctx context.Context, id int64) (*task.Task, error)

Get provides a mock function with given fields: ctx, id

func (*Manager) GetLog

func (_m *Manager) GetLog(ctx context.Context, id int64) ([]byte, error)

GetLog provides a mock function with given fields: ctx, id

func (*Manager) GetLogByJobID

func (_m *Manager) GetLogByJobID(ctx context.Context, jobID string) ([]byte, error)

GetLogByJobID provides a mock function with given fields: ctx, jobID

func (*Manager) IsTaskFinished

func (_m *Manager) IsTaskFinished(ctx context.Context, reportID string) bool

IsTaskFinished provides a mock function with given fields: ctx, reportID

func (*Manager) List

func (_m *Manager) List(ctx context.Context, query *q.Query) ([]*task.Task, error)

List provides a mock function with given fields: ctx, query

func (*Manager) ListScanTasksByReportUUID

func (_m *Manager) ListScanTasksByReportUUID(ctx context.Context, uuid string) ([]*task.Task, error)

ListScanTasksByReportUUID provides a mock function with given fields: ctx, uuid

func (*Manager) RetrieveStatusFromTask

func (_m *Manager) RetrieveStatusFromTask(ctx context.Context, reportID string) string

RetrieveStatusFromTask provides a mock function with given fields: ctx, reportID

func (*Manager) Stop

func (_m *Manager) Stop(ctx context.Context, id int64) error

Stop provides a mock function with given fields: ctx, id

func (*Manager) Update

func (_m *Manager) Update(ctx context.Context, _a1 *task.Task, props ...string) error

Update provides a mock function with given fields: ctx, _a1, props

func (*Manager) UpdateExtraAttrs

func (_m *Manager) UpdateExtraAttrs(ctx context.Context, id int64, extraAttrs map[string]interface{}) error

UpdateExtraAttrs provides a mock function with given fields: ctx, id, extraAttrs

func (*Manager) UpdateStatusInBatch

func (_m *Manager) UpdateStatusInBatch(ctx context.Context, jobIDs []string, status string, batchSize int) error

UpdateStatusInBatch provides a mock function with given fields: ctx, jobIDs, status, batchSize

Jump to

Keyboard shortcuts

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