mockconnection

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBExecutor

type DBExecutor struct {
	mock.Mock
}

DBExecutor is an autogenerated mock type for the DBExecutor type

func NewDBExecutor

func NewDBExecutor(t interface {
	mock.TestingT
	Cleanup(func())
}) *DBExecutor

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

func (_m *DBExecutor) EXPECT() *DBExecutor_Expecter

func (*DBExecutor) ExecContext

func (_m *DBExecutor) ExecContext(ctx context.Context, query string, args ...any) (sqlex.Result, error)

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

type DBExecutor_ExecContext_Call

type DBExecutor_ExecContext_Call struct {
	*mock.Call
}

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

func (*DBExecutor_ExecContext_Call) Return

func (*DBExecutor_ExecContext_Call) Run

func (_c *DBExecutor_ExecContext_Call) Run(run func(ctx context.Context, query string, args ...any)) *DBExecutor_ExecContext_Call

func (*DBExecutor_ExecContext_Call) RunAndReturn

type DBExecutor_Expecter

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

func (*DBExecutor_Expecter) ExecContext

func (_e *DBExecutor_Expecter) ExecContext(ctx interface{}, query interface{}, args ...interface{}) *DBExecutor_ExecContext_Call

ExecContext is a helper method to define mock.On call

  • ctx context.Context
  • query string
  • args ...any

type DBPinger

type DBPinger struct {
	mock.Mock
}

DBPinger is an autogenerated mock type for the DBPinger type

func NewDBPinger

func NewDBPinger(t interface {
	mock.TestingT
	Cleanup(func())
}) *DBPinger

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

func (_m *DBPinger) EXPECT() *DBPinger_Expecter

func (*DBPinger) Ping

func (_m *DBPinger) Ping() error

Ping provides a mock function with no fields

type DBPinger_Expecter

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

func (*DBPinger_Expecter) Ping

Ping is a helper method to define mock.On call

type DBPinger_Ping_Call

type DBPinger_Ping_Call struct {
	*mock.Call
}

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

func (*DBPinger_Ping_Call) Return

func (_c *DBPinger_Ping_Call) Return(_a0 error) *DBPinger_Ping_Call

func (*DBPinger_Ping_Call) Run

func (_c *DBPinger_Ping_Call) Run(run func()) *DBPinger_Ping_Call

func (*DBPinger_Ping_Call) RunAndReturn

func (_c *DBPinger_Ping_Call) RunAndReturn(run func() error) *DBPinger_Ping_Call

type DBQuerier

type DBQuerier struct {
	mock.Mock
}

DBQuerier is an autogenerated mock type for the DBQuerier type

func NewDBQuerier

func NewDBQuerier(t interface {
	mock.TestingT
	Cleanup(func())
}) *DBQuerier

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

func (_m *DBQuerier) EXPECT() *DBQuerier_Expecter

func (*DBQuerier) QueryContext

func (_m *DBQuerier) QueryContext(ctx context.Context, query string, args ...any) (sqlex.Rows, error)

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

type DBQuerier_Expecter

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

func (*DBQuerier_Expecter) QueryContext

func (_e *DBQuerier_Expecter) QueryContext(ctx interface{}, query interface{}, args ...interface{}) *DBQuerier_QueryContext_Call

QueryContext is a helper method to define mock.On call

  • ctx context.Context
  • query string
  • args ...any

type DBQuerier_QueryContext_Call

type DBQuerier_QueryContext_Call struct {
	*mock.Call
}

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

func (*DBQuerier_QueryContext_Call) Return

func (*DBQuerier_QueryContext_Call) Run

func (_c *DBQuerier_QueryContext_Call) Run(run func(ctx context.Context, query string, args ...any)) *DBQuerier_QueryContext_Call

func (*DBQuerier_QueryContext_Call) RunAndReturn

type DBTransactor

type DBTransactor struct {
	mock.Mock
}

DBTransactor is an autogenerated mock type for the DBTransactor type

func NewDBTransactor

func NewDBTransactor(t interface {
	mock.TestingT
	Cleanup(func())
}) *DBTransactor

NewDBTransactor creates a new instance of DBTransactor. 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 (*DBTransactor) BeginTx

func (_m *DBTransactor) BeginTx(ctx context.Context, opts *sql.TxOptions) (sqlex.Tx, error)

BeginTx provides a mock function with given fields: ctx, opts

func (*DBTransactor) EXPECT

func (_m *DBTransactor) EXPECT() *DBTransactor_Expecter

type DBTransactor_BeginTx_Call

type DBTransactor_BeginTx_Call struct {
	*mock.Call
}

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

func (*DBTransactor_BeginTx_Call) Return

func (*DBTransactor_BeginTx_Call) Run

func (*DBTransactor_BeginTx_Call) RunAndReturn

type DBTransactor_Expecter

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

func (*DBTransactor_Expecter) BeginTx

func (_e *DBTransactor_Expecter) BeginTx(ctx interface{}, opts interface{}) *DBTransactor_BeginTx_Call

BeginTx is a helper method to define mock.On call

  • ctx context.Context
  • opts *sql.TxOptions

type SQLDB

type SQLDB struct {
	mock.Mock
}

SQLDB is an autogenerated mock type for the SQLDB type

func NewSQLDB

func NewSQLDB(t interface {
	mock.TestingT
	Cleanup(func())
}) *SQLDB

NewSQLDB creates a new instance of SQLDB. 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 (*SQLDB) BeginTx

func (_m *SQLDB) BeginTx(ctx context.Context, opts *sql.TxOptions) (sqlex.Tx, error)

BeginTx provides a mock function with given fields: ctx, opts

func (*SQLDB) Close

func (_m *SQLDB) Close() error

Close provides a mock function with no fields

func (*SQLDB) EXPECT

func (_m *SQLDB) EXPECT() *SQLDB_Expecter

func (*SQLDB) ExecContext

func (_m *SQLDB) ExecContext(ctx context.Context, query string, args ...any) (sqlex.Result, error)

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

func (*SQLDB) Ping

func (_m *SQLDB) Ping() error

Ping provides a mock function with no fields

func (*SQLDB) QueryContext

func (_m *SQLDB) QueryContext(ctx context.Context, query string, args ...any) (sqlex.Rows, error)

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

type SQLDB_BeginTx_Call

type SQLDB_BeginTx_Call struct {
	*mock.Call
}

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

func (*SQLDB_BeginTx_Call) Return

func (_c *SQLDB_BeginTx_Call) Return(_a0 sqlex.Tx, _a1 error) *SQLDB_BeginTx_Call

func (*SQLDB_BeginTx_Call) Run

func (_c *SQLDB_BeginTx_Call) Run(run func(ctx context.Context, opts *sql.TxOptions)) *SQLDB_BeginTx_Call

func (*SQLDB_BeginTx_Call) RunAndReturn

func (_c *SQLDB_BeginTx_Call) RunAndReturn(run func(context.Context, *sql.TxOptions) (sqlex.Tx, error)) *SQLDB_BeginTx_Call

type SQLDB_Close_Call

type SQLDB_Close_Call struct {
	*mock.Call
}

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

func (*SQLDB_Close_Call) Return

func (_c *SQLDB_Close_Call) Return(_a0 error) *SQLDB_Close_Call

func (*SQLDB_Close_Call) Run

func (_c *SQLDB_Close_Call) Run(run func()) *SQLDB_Close_Call

func (*SQLDB_Close_Call) RunAndReturn

func (_c *SQLDB_Close_Call) RunAndReturn(run func() error) *SQLDB_Close_Call

type SQLDB_ExecContext_Call

type SQLDB_ExecContext_Call struct {
	*mock.Call
}

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

func (*SQLDB_ExecContext_Call) Return

func (*SQLDB_ExecContext_Call) Run

func (_c *SQLDB_ExecContext_Call) Run(run func(ctx context.Context, query string, args ...any)) *SQLDB_ExecContext_Call

func (*SQLDB_ExecContext_Call) RunAndReturn

type SQLDB_Expecter

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

func (*SQLDB_Expecter) BeginTx

func (_e *SQLDB_Expecter) BeginTx(ctx interface{}, opts interface{}) *SQLDB_BeginTx_Call

BeginTx is a helper method to define mock.On call

  • ctx context.Context
  • opts *sql.TxOptions

func (*SQLDB_Expecter) Close

func (_e *SQLDB_Expecter) Close() *SQLDB_Close_Call

Close is a helper method to define mock.On call

func (*SQLDB_Expecter) ExecContext

func (_e *SQLDB_Expecter) ExecContext(ctx interface{}, query interface{}, args ...interface{}) *SQLDB_ExecContext_Call

ExecContext is a helper method to define mock.On call

  • ctx context.Context
  • query string
  • args ...any

func (*SQLDB_Expecter) Ping

func (_e *SQLDB_Expecter) Ping() *SQLDB_Ping_Call

Ping is a helper method to define mock.On call

func (*SQLDB_Expecter) QueryContext

func (_e *SQLDB_Expecter) QueryContext(ctx interface{}, query interface{}, args ...interface{}) *SQLDB_QueryContext_Call

QueryContext is a helper method to define mock.On call

  • ctx context.Context
  • query string
  • args ...any

type SQLDB_Ping_Call

type SQLDB_Ping_Call struct {
	*mock.Call
}

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

func (*SQLDB_Ping_Call) Return

func (_c *SQLDB_Ping_Call) Return(_a0 error) *SQLDB_Ping_Call

func (*SQLDB_Ping_Call) Run

func (_c *SQLDB_Ping_Call) Run(run func()) *SQLDB_Ping_Call

func (*SQLDB_Ping_Call) RunAndReturn

func (_c *SQLDB_Ping_Call) RunAndReturn(run func() error) *SQLDB_Ping_Call

type SQLDB_QueryContext_Call

type SQLDB_QueryContext_Call struct {
	*mock.Call
}

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

func (*SQLDB_QueryContext_Call) Return

func (*SQLDB_QueryContext_Call) Run

func (_c *SQLDB_QueryContext_Call) Run(run func(ctx context.Context, query string, args ...any)) *SQLDB_QueryContext_Call

func (*SQLDB_QueryContext_Call) RunAndReturn

Jump to

Keyboard shortcuts

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