mocks

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 3 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 interface {
	mock.TestingT
	Cleanup(func())
}) *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. The first argument is typically a *testing.T value.

func (*DB) Begin

func (_m *DB) Begin(ctx context.Context) (tx.Transaction, error)

Begin provides a mock function with given fields: ctx

func (*DB) EXPECT

func (_m *DB) EXPECT() *DB_Expecter

type DB_Begin_Call

type DB_Begin_Call struct {
	*mock.Call
}

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

func (*DB_Begin_Call) Return

func (_c *DB_Begin_Call) Return(_a0 tx.Transaction, _a1 error) *DB_Begin_Call

func (*DB_Begin_Call) Run

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

func (*DB_Begin_Call) RunAndReturn

func (_c *DB_Begin_Call) RunAndReturn(run func(context.Context) (tx.Transaction, error)) *DB_Begin_Call

type DB_Expecter

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

func (*DB_Expecter) Begin

func (_e *DB_Expecter) Begin(ctx interface{}) *DB_Begin_Call

Begin is a helper method to define mock.On call

  • ctx context.Context

type Option

type Option struct {
	mock.Mock
}

Option is an autogenerated mock type for the Option type

func NewOption

func NewOption(t interface {
	mock.TestingT
	Cleanup(func())
}) *Option

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

func (_m *Option) EXPECT() *Option_Expecter

func (*Option) Execute

func (_m *Option) Execute(_a0 *tx.TX)

Execute provides a mock function with given fields: _a0

type Option_Execute_Call

type Option_Execute_Call struct {
	*mock.Call
}

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

func (*Option_Execute_Call) Return

func (*Option_Execute_Call) Run

func (_c *Option_Execute_Call) Run(run func(_a0 *tx.TX)) *Option_Execute_Call

func (*Option_Execute_Call) RunAndReturn

func (_c *Option_Execute_Call) RunAndReturn(run func(*tx.TX)) *Option_Execute_Call

type Option_Expecter

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

func (*Option_Expecter) Execute

func (_e *Option_Expecter) Execute(_a0 interface{}) *Option_Execute_Call

Execute is a helper method to define mock.On call

  • _a0 *tx.TX

type Transaction

type Transaction struct {
	mock.Mock
}

Transaction is an autogenerated mock type for the Transaction type

func NewTransaction

func NewTransaction(t interface {
	mock.TestingT
	Cleanup(func())
}) *Transaction

NewTransaction creates a new instance of Transaction. 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 (*Transaction) Commit

func (_m *Transaction) Commit(ctx context.Context) error

Commit provides a mock function with given fields: ctx

func (*Transaction) EXPECT

func (_m *Transaction) EXPECT() *Transaction_Expecter

func (*Transaction) Rollback

func (_m *Transaction) Rollback(ctx context.Context) error

Rollback provides a mock function with given fields: ctx

type Transaction_Commit_Call

type Transaction_Commit_Call struct {
	*mock.Call
}

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

func (*Transaction_Commit_Call) Return

func (*Transaction_Commit_Call) Run

func (*Transaction_Commit_Call) RunAndReturn

type Transaction_Expecter

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

func (*Transaction_Expecter) Commit

func (_e *Transaction_Expecter) Commit(ctx interface{}) *Transaction_Commit_Call

Commit is a helper method to define mock.On call

  • ctx context.Context

func (*Transaction_Expecter) Rollback

func (_e *Transaction_Expecter) Rollback(ctx interface{}) *Transaction_Rollback_Call

Rollback is a helper method to define mock.On call

  • ctx context.Context

type Transaction_Rollback_Call

type Transaction_Rollback_Call struct {
	*mock.Call
}

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

func (*Transaction_Rollback_Call) Return

func (*Transaction_Rollback_Call) Run

func (*Transaction_Rollback_Call) RunAndReturn

type Transactor

type Transactor struct {
	mock.Mock
}

Transactor is an autogenerated mock type for the Transactor type

func NewTransactor

func NewTransactor(t interface {
	mock.TestingT
	Cleanup(func())
}) *Transactor

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

func (_m *Transactor) EXPECT() *Transactor_Expecter

func (*Transactor) WithTransaction

func (_m *Transactor) WithTransaction(ctx context.Context, f func(context.Context) error) error

WithTransaction provides a mock function with given fields: ctx, f

type Transactor_Expecter

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

func (*Transactor_Expecter) WithTransaction

func (_e *Transactor_Expecter) WithTransaction(ctx interface{}, f interface{}) *Transactor_WithTransaction_Call

WithTransaction is a helper method to define mock.On call

  • ctx context.Context
  • f func(context.Context) error

type Transactor_WithTransaction_Call

type Transactor_WithTransaction_Call struct {
	*mock.Call
}

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

func (*Transactor_WithTransaction_Call) Return

func (*Transactor_WithTransaction_Call) Run

func (*Transactor_WithTransaction_Call) RunAndReturn

Jump to

Keyboard shortcuts

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