Documentation
¶
Index ¶
- type Config
- type IDB
- type MockIDB
- func (_m *MockIDB) Begin(ctx context.Context) (Tx, error)
- func (_m *MockIDB) Close()
- func (_m *MockIDB) EXPECT() *MockIDB_Expecter
- func (_m *MockIDB) Exec(ctx context.Context, query string, args ...any) error
- func (_m *MockIDB) Ping(ctx context.Context) error
- func (_m *MockIDB) Query(ctx context.Context, query string, args ...any) (Rows, error)
- func (_m *MockIDB) QueryRow(ctx context.Context, query string, args ...any) Row
- func (_m *MockIDB) Raw() any
- type MockIDB_Begin_Call
- type MockIDB_Close_Call
- type MockIDB_Exec_Call
- type MockIDB_Expecter
- func (_e *MockIDB_Expecter) Begin(ctx interface{}) *MockIDB_Begin_Call
- func (_e *MockIDB_Expecter) Close() *MockIDB_Close_Call
- func (_e *MockIDB_Expecter) Exec(ctx interface{}, query interface{}, args ...interface{}) *MockIDB_Exec_Call
- func (_e *MockIDB_Expecter) Ping(ctx interface{}) *MockIDB_Ping_Call
- func (_e *MockIDB_Expecter) Query(ctx interface{}, query interface{}, args ...interface{}) *MockIDB_Query_Call
- func (_e *MockIDB_Expecter) QueryRow(ctx interface{}, query interface{}, args ...interface{}) *MockIDB_QueryRow_Call
- func (_e *MockIDB_Expecter) Raw() *MockIDB_Raw_Call
- type MockIDB_Ping_Call
- type MockIDB_QueryRow_Call
- func (_c *MockIDB_QueryRow_Call) Return(_a0 Row) *MockIDB_QueryRow_Call
- func (_c *MockIDB_QueryRow_Call) Run(run func(ctx context.Context, query string, args ...any)) *MockIDB_QueryRow_Call
- func (_c *MockIDB_QueryRow_Call) RunAndReturn(run func(context.Context, string, ...any) Row) *MockIDB_QueryRow_Call
- type MockIDB_Query_Call
- func (_c *MockIDB_Query_Call) Return(_a0 Rows, _a1 error) *MockIDB_Query_Call
- func (_c *MockIDB_Query_Call) Run(run func(ctx context.Context, query string, args ...any)) *MockIDB_Query_Call
- func (_c *MockIDB_Query_Call) RunAndReturn(run func(context.Context, string, ...any) (Rows, error)) *MockIDB_Query_Call
- type MockIDB_Raw_Call
- type Row
- type Rows
- type Tx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IDB ¶
type MockIDB ¶
MockIDB is an autogenerated mock type for the IDB type
func NewMockIDB ¶
NewMockIDB creates a new instance of MockIDB. 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 (*MockIDB) EXPECT ¶
func (_m *MockIDB) EXPECT() *MockIDB_Expecter
type MockIDB_Begin_Call ¶
MockIDB_Begin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Begin'
func (*MockIDB_Begin_Call) Return ¶
func (_c *MockIDB_Begin_Call) Return(_a0 Tx, _a1 error) *MockIDB_Begin_Call
func (*MockIDB_Begin_Call) Run ¶
func (_c *MockIDB_Begin_Call) Run(run func(ctx context.Context)) *MockIDB_Begin_Call
func (*MockIDB_Begin_Call) RunAndReturn ¶
func (_c *MockIDB_Begin_Call) RunAndReturn(run func(context.Context) (Tx, error)) *MockIDB_Begin_Call
type MockIDB_Close_Call ¶
MockIDB_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
func (*MockIDB_Close_Call) Return ¶
func (_c *MockIDB_Close_Call) Return() *MockIDB_Close_Call
func (*MockIDB_Close_Call) Run ¶
func (_c *MockIDB_Close_Call) Run(run func()) *MockIDB_Close_Call
func (*MockIDB_Close_Call) RunAndReturn ¶
func (_c *MockIDB_Close_Call) RunAndReturn(run func()) *MockIDB_Close_Call
type MockIDB_Exec_Call ¶
MockIDB_Exec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exec'
func (*MockIDB_Exec_Call) Return ¶
func (_c *MockIDB_Exec_Call) Return(_a0 error) *MockIDB_Exec_Call
func (*MockIDB_Exec_Call) Run ¶
func (_c *MockIDB_Exec_Call) Run(run func(ctx context.Context, query string, args ...any)) *MockIDB_Exec_Call
func (*MockIDB_Exec_Call) RunAndReturn ¶
func (_c *MockIDB_Exec_Call) RunAndReturn(run func(context.Context, string, ...any) error) *MockIDB_Exec_Call
type MockIDB_Expecter ¶
type MockIDB_Expecter struct {
// contains filtered or unexported fields
}
func (*MockIDB_Expecter) Begin ¶
func (_e *MockIDB_Expecter) Begin(ctx interface{}) *MockIDB_Begin_Call
Begin is a helper method to define mock.On call
- ctx context.Context
func (*MockIDB_Expecter) Close ¶
func (_e *MockIDB_Expecter) Close() *MockIDB_Close_Call
Close is a helper method to define mock.On call
func (*MockIDB_Expecter) Exec ¶
func (_e *MockIDB_Expecter) Exec(ctx interface{}, query interface{}, args ...interface{}) *MockIDB_Exec_Call
Exec is a helper method to define mock.On call
- ctx context.Context
- query string
- args ...any
func (*MockIDB_Expecter) Ping ¶
func (_e *MockIDB_Expecter) Ping(ctx interface{}) *MockIDB_Ping_Call
Ping is a helper method to define mock.On call
- ctx context.Context
func (*MockIDB_Expecter) Query ¶
func (_e *MockIDB_Expecter) Query(ctx interface{}, query interface{}, args ...interface{}) *MockIDB_Query_Call
Query is a helper method to define mock.On call
- ctx context.Context
- query string
- args ...any
func (*MockIDB_Expecter) QueryRow ¶
func (_e *MockIDB_Expecter) QueryRow(ctx interface{}, query interface{}, args ...interface{}) *MockIDB_QueryRow_Call
QueryRow is a helper method to define mock.On call
- ctx context.Context
- query string
- args ...any
func (*MockIDB_Expecter) Raw ¶ added in v0.2.5
func (_e *MockIDB_Expecter) Raw() *MockIDB_Raw_Call
Raw is a helper method to define mock.On call
type MockIDB_Ping_Call ¶
MockIDB_Ping_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ping'
func (*MockIDB_Ping_Call) Return ¶
func (_c *MockIDB_Ping_Call) Return(_a0 error) *MockIDB_Ping_Call
func (*MockIDB_Ping_Call) Run ¶
func (_c *MockIDB_Ping_Call) Run(run func(ctx context.Context)) *MockIDB_Ping_Call
func (*MockIDB_Ping_Call) RunAndReturn ¶
func (_c *MockIDB_Ping_Call) RunAndReturn(run func(context.Context) error) *MockIDB_Ping_Call
type MockIDB_QueryRow_Call ¶
MockIDB_QueryRow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryRow'
func (*MockIDB_QueryRow_Call) Return ¶
func (_c *MockIDB_QueryRow_Call) Return(_a0 Row) *MockIDB_QueryRow_Call
func (*MockIDB_QueryRow_Call) Run ¶
func (_c *MockIDB_QueryRow_Call) Run(run func(ctx context.Context, query string, args ...any)) *MockIDB_QueryRow_Call
func (*MockIDB_QueryRow_Call) RunAndReturn ¶
func (_c *MockIDB_QueryRow_Call) RunAndReturn(run func(context.Context, string, ...any) Row) *MockIDB_QueryRow_Call
type MockIDB_Query_Call ¶
MockIDB_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'
func (*MockIDB_Query_Call) Return ¶
func (_c *MockIDB_Query_Call) Return(_a0 Rows, _a1 error) *MockIDB_Query_Call
func (*MockIDB_Query_Call) Run ¶
func (_c *MockIDB_Query_Call) Run(run func(ctx context.Context, query string, args ...any)) *MockIDB_Query_Call
func (*MockIDB_Query_Call) RunAndReturn ¶
func (_c *MockIDB_Query_Call) RunAndReturn(run func(context.Context, string, ...any) (Rows, error)) *MockIDB_Query_Call
type MockIDB_Raw_Call ¶ added in v0.2.5
MockIDB_Raw_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Raw'
func (*MockIDB_Raw_Call) Return ¶ added in v0.2.5
func (_c *MockIDB_Raw_Call) Return(_a0 any) *MockIDB_Raw_Call
func (*MockIDB_Raw_Call) Run ¶ added in v0.2.5
func (_c *MockIDB_Raw_Call) Run(run func()) *MockIDB_Raw_Call
func (*MockIDB_Raw_Call) RunAndReturn ¶ added in v0.2.5
func (_c *MockIDB_Raw_Call) RunAndReturn(run func() any) *MockIDB_Raw_Call