mocks

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Completer

type Completer struct {
	mock.Mock
}

Completer is an autogenerated mock type for the Completer type

func NewCompleter

func NewCompleter(t interface {
	mock.TestingT
	Cleanup(func())
}) *Completer

NewCompleter creates a new instance of Completer. 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 (*Completer) Complete

func (_m *Completer) Complete(taskID int64) error

Complete provides a mock function with given fields: taskID

func (*Completer) EXPECT

func (_m *Completer) EXPECT() *Completer_Expecter

func (*Completer) Fail

func (_m *Completer) Fail(taskID int64, message string) error

Fail provides a mock function with given fields: taskID, message

func (*Completer) Retry

func (_m *Completer) Retry(taskID int64, blockedTill time.Time, message string) error

Retry provides a mock function with given fields: taskID, blockedTill, message

func (*Completer) Snooze

func (_m *Completer) Snooze(taskID int64, blockedTill time.Time) error

Snooze provides a mock function with given fields: taskID, blockedTill

func (*Completer) Start

func (_m *Completer) Start(ctx context.Context) error

Start provides a mock function with given fields: ctx

func (*Completer) Stop

func (_m *Completer) Stop()

Stop provides a mock function with no fields

type Completer_Complete_Call

type Completer_Complete_Call struct {
	*mock.Call
}

Completer_Complete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Complete'

func (*Completer_Complete_Call) Return

func (*Completer_Complete_Call) Run

func (_c *Completer_Complete_Call) Run(run func(taskID int64)) *Completer_Complete_Call

func (*Completer_Complete_Call) RunAndReturn

func (_c *Completer_Complete_Call) RunAndReturn(run func(int64) error) *Completer_Complete_Call

type Completer_Expecter

type Completer_Expecter struct {
	// contains filtered or unexported fields
}

func (*Completer_Expecter) Complete

func (_e *Completer_Expecter) Complete(taskID interface{}) *Completer_Complete_Call

Complete is a helper method to define mock.On call

  • taskID int64

func (*Completer_Expecter) Fail

func (_e *Completer_Expecter) Fail(taskID interface{}, message interface{}) *Completer_Fail_Call

Fail is a helper method to define mock.On call

  • taskID int64
  • message string

func (*Completer_Expecter) Retry

func (_e *Completer_Expecter) Retry(taskID interface{}, blockedTill interface{}, message interface{}) *Completer_Retry_Call

Retry is a helper method to define mock.On call

  • taskID int64
  • blockedTill time.Time
  • message string

func (*Completer_Expecter) Snooze

func (_e *Completer_Expecter) Snooze(taskID interface{}, blockedTill interface{}) *Completer_Snooze_Call

Snooze is a helper method to define mock.On call

  • taskID int64
  • blockedTill time.Time

func (*Completer_Expecter) Start

func (_e *Completer_Expecter) Start(ctx interface{}) *Completer_Start_Call

Start is a helper method to define mock.On call

  • ctx context.Context

func (*Completer_Expecter) Stop

Stop is a helper method to define mock.On call

type Completer_Fail_Call

type Completer_Fail_Call struct {
	*mock.Call
}

Completer_Fail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Fail'

func (*Completer_Fail_Call) Return

func (*Completer_Fail_Call) Run

func (_c *Completer_Fail_Call) Run(run func(taskID int64, message string)) *Completer_Fail_Call

func (*Completer_Fail_Call) RunAndReturn

func (_c *Completer_Fail_Call) RunAndReturn(run func(int64, string) error) *Completer_Fail_Call

type Completer_Retry_Call

type Completer_Retry_Call struct {
	*mock.Call
}

Completer_Retry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Retry'

func (*Completer_Retry_Call) Return

func (*Completer_Retry_Call) Run

func (_c *Completer_Retry_Call) Run(run func(taskID int64, blockedTill time.Time, message string)) *Completer_Retry_Call

func (*Completer_Retry_Call) RunAndReturn

func (_c *Completer_Retry_Call) RunAndReturn(run func(int64, time.Time, string) error) *Completer_Retry_Call

type Completer_Snooze_Call

type Completer_Snooze_Call struct {
	*mock.Call
}

Completer_Snooze_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Snooze'

func (*Completer_Snooze_Call) Return

func (*Completer_Snooze_Call) Run

func (_c *Completer_Snooze_Call) Run(run func(taskID int64, blockedTill time.Time)) *Completer_Snooze_Call

func (*Completer_Snooze_Call) RunAndReturn

func (_c *Completer_Snooze_Call) RunAndReturn(run func(int64, time.Time) error) *Completer_Snooze_Call

type Completer_Start_Call

type Completer_Start_Call struct {
	*mock.Call
}

Completer_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'

func (*Completer_Start_Call) Return

func (*Completer_Start_Call) Run

func (_c *Completer_Start_Call) Run(run func(ctx context.Context)) *Completer_Start_Call

func (*Completer_Start_Call) RunAndReturn

func (_c *Completer_Start_Call) RunAndReturn(run func(context.Context) error) *Completer_Start_Call

type Completer_Stop_Call

type Completer_Stop_Call struct {
	*mock.Call
}

Completer_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'

func (*Completer_Stop_Call) Return

func (*Completer_Stop_Call) Run

func (_c *Completer_Stop_Call) Run(run func()) *Completer_Stop_Call

func (*Completer_Stop_Call) RunAndReturn

func (_c *Completer_Stop_Call) RunAndReturn(run func()) *Completer_Stop_Call

type Pool

type Pool struct {
	mock.Mock
}

Pool is an autogenerated mock type for the pool type

func NewPool

func NewPool(t interface {
	mock.TestingT
	Cleanup(func())
}) *Pool

NewPool creates a new instance of Pool. 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 (*Pool) EXPECT

func (_m *Pool) EXPECT() *Pool_Expecter

func (*Pool) ExecContext

func (_m *Pool) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)

ExecContext provides a mock function with given fields: ctx, query, args

func (*Pool) GetContext

func (_m *Pool) GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error

GetContext provides a mock function with given fields: ctx, dest, query, args

func (*Pool) PingContext

func (_m *Pool) PingContext(ctx context.Context) error

PingContext provides a mock function with given fields: ctx

func (*Pool) QueryContext

func (_m *Pool) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

QueryContext provides a mock function with given fields: ctx, query, args

func (*Pool) QueryRowContext

func (_m *Pool) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row

QueryRowContext provides a mock function with given fields: ctx, query, args

func (*Pool) SelectContext

func (_m *Pool) SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error

SelectContext provides a mock function with given fields: ctx, dest, query, args

type Pool_ExecContext_Call

type Pool_ExecContext_Call struct {
	*mock.Call
}

Pool_ExecContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecContext'

func (*Pool_ExecContext_Call) Return

func (*Pool_ExecContext_Call) Run

func (_c *Pool_ExecContext_Call) Run(run func(ctx context.Context, query string, args ...interface{})) *Pool_ExecContext_Call

func (*Pool_ExecContext_Call) RunAndReturn

func (_c *Pool_ExecContext_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (sql.Result, error)) *Pool_ExecContext_Call

type Pool_Expecter

type Pool_Expecter struct {
	// contains filtered or unexported fields
}

func (*Pool_Expecter) ExecContext

func (_e *Pool_Expecter) ExecContext(ctx interface{}, query interface{}, args ...interface{}) *Pool_ExecContext_Call

ExecContext is a helper method to define mock.On call

  • ctx context.Context
  • query string
  • args ...interface{}

func (*Pool_Expecter) GetContext

func (_e *Pool_Expecter) GetContext(ctx interface{}, dest interface{}, query interface{}, args ...interface{}) *Pool_GetContext_Call

GetContext is a helper method to define mock.On call

  • ctx context.Context
  • dest interface{}
  • query string
  • args ...interface{}

func (*Pool_Expecter) PingContext

func (_e *Pool_Expecter) PingContext(ctx interface{}) *Pool_PingContext_Call

PingContext is a helper method to define mock.On call

  • ctx context.Context

func (*Pool_Expecter) QueryContext

func (_e *Pool_Expecter) QueryContext(ctx interface{}, query interface{}, args ...interface{}) *Pool_QueryContext_Call

QueryContext is a helper method to define mock.On call

  • ctx context.Context
  • query string
  • args ...interface{}

func (*Pool_Expecter) QueryRowContext

func (_e *Pool_Expecter) QueryRowContext(ctx interface{}, query interface{}, args ...interface{}) *Pool_QueryRowContext_Call

QueryRowContext is a helper method to define mock.On call

  • ctx context.Context
  • query string
  • args ...interface{}

func (*Pool_Expecter) SelectContext

func (_e *Pool_Expecter) SelectContext(ctx interface{}, dest interface{}, query interface{}, args ...interface{}) *Pool_SelectContext_Call

SelectContext is a helper method to define mock.On call

  • ctx context.Context
  • dest interface{}
  • query string
  • args ...interface{}

type Pool_GetContext_Call

type Pool_GetContext_Call struct {
	*mock.Call
}

Pool_GetContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetContext'

func (*Pool_GetContext_Call) Return

func (*Pool_GetContext_Call) Run

func (_c *Pool_GetContext_Call) Run(run func(ctx context.Context, dest interface{}, query string, args ...interface{})) *Pool_GetContext_Call

func (*Pool_GetContext_Call) RunAndReturn

func (_c *Pool_GetContext_Call) RunAndReturn(run func(context.Context, interface{}, string, ...interface{}) error) *Pool_GetContext_Call

type Pool_PingContext_Call

type Pool_PingContext_Call struct {
	*mock.Call
}

Pool_PingContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PingContext'

func (*Pool_PingContext_Call) Return

func (*Pool_PingContext_Call) Run

func (*Pool_PingContext_Call) RunAndReturn

func (_c *Pool_PingContext_Call) RunAndReturn(run func(context.Context) error) *Pool_PingContext_Call

type Pool_QueryContext_Call

type Pool_QueryContext_Call struct {
	*mock.Call
}

Pool_QueryContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryContext'

func (*Pool_QueryContext_Call) Return

func (*Pool_QueryContext_Call) Run

func (_c *Pool_QueryContext_Call) Run(run func(ctx context.Context, query string, args ...interface{})) *Pool_QueryContext_Call

func (*Pool_QueryContext_Call) RunAndReturn

func (_c *Pool_QueryContext_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (*sql.Rows, error)) *Pool_QueryContext_Call

type Pool_QueryRowContext_Call

type Pool_QueryRowContext_Call struct {
	*mock.Call
}

Pool_QueryRowContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryRowContext'

func (*Pool_QueryRowContext_Call) Return

func (*Pool_QueryRowContext_Call) Run

func (_c *Pool_QueryRowContext_Call) Run(run func(ctx context.Context, query string, args ...interface{})) *Pool_QueryRowContext_Call

func (*Pool_QueryRowContext_Call) RunAndReturn

func (_c *Pool_QueryRowContext_Call) RunAndReturn(run func(context.Context, string, ...interface{}) *sql.Row) *Pool_QueryRowContext_Call

type Pool_SelectContext_Call

type Pool_SelectContext_Call struct {
	*mock.Call
}

Pool_SelectContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectContext'

func (*Pool_SelectContext_Call) Return

func (*Pool_SelectContext_Call) Run

func (_c *Pool_SelectContext_Call) Run(run func(ctx context.Context, dest interface{}, query string, args ...interface{})) *Pool_SelectContext_Call

func (*Pool_SelectContext_Call) RunAndReturn

func (_c *Pool_SelectContext_Call) RunAndReturn(run func(context.Context, interface{}, string, ...interface{}) error) *Pool_SelectContext_Call

type TaskHandler

type TaskHandler struct {
	mock.Mock
}

TaskHandler is an autogenerated mock type for the TaskHandler type

func NewTaskHandler

func NewTaskHandler(t interface {
	mock.TestingT
	Cleanup(func())
}) *TaskHandler

NewTaskHandler creates a new instance of TaskHandler. 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 (*TaskHandler) EXPECT

func (_m *TaskHandler) EXPECT() *TaskHandler_Expecter

func (*TaskHandler) Handle

func (_m *TaskHandler) Handle(ctx context.Context, task *asynqpg.TaskInfo) error

Handle provides a mock function with given fields: ctx, task

type TaskHandler_Expecter

type TaskHandler_Expecter struct {
	// contains filtered or unexported fields
}

func (*TaskHandler_Expecter) Handle

func (_e *TaskHandler_Expecter) Handle(ctx interface{}, task interface{}) *TaskHandler_Handle_Call

Handle is a helper method to define mock.On call

  • ctx context.Context
  • task *asynqpg.TaskInfo

type TaskHandler_Handle_Call

type TaskHandler_Handle_Call struct {
	*mock.Call
}

TaskHandler_Handle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Handle'

func (*TaskHandler_Handle_Call) Return

func (*TaskHandler_Handle_Call) Run

func (*TaskHandler_Handle_Call) RunAndReturn

Jump to

Keyboard shortcuts

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