Documentation
¶
Index ¶
- type MockDB
- type MockDB_Close_Call
- type MockDB_Exec_Call
- type MockDB_Expecter
- func (_e *MockDB_Expecter) Close() *MockDB_Close_Call
- func (_e *MockDB_Expecter) Exec(sql interface{}, args ...interface{}) *MockDB_Exec_Call
- func (_e *MockDB_Expecter) Prepare(sql interface{}) *MockDB_Prepare_Call
- func (_e *MockDB_Expecter) Query(sql interface{}, args ...interface{}) *MockDB_Query_Call
- type MockDB_Prepare_Call
- type MockDB_Query_Call
- type MockResult
- type MockResult_Expecter
- type MockResult_LastInsertId_Call
- type MockResult_RowsAffected_Call
- type MockRows
- type MockRows_Close_Call
- type MockRows_Columns_Call
- type MockRows_Err_Call
- type MockRows_Expecter
- func (_e *MockRows_Expecter) Close() *MockRows_Close_Call
- func (_e *MockRows_Expecter) Columns() *MockRows_Columns_Call
- func (_e *MockRows_Expecter) Err() *MockRows_Err_Call
- func (_e *MockRows_Expecter) Next() *MockRows_Next_Call
- func (_e *MockRows_Expecter) Scan(dest ...interface{}) *MockRows_Scan_Call
- type MockRows_Next_Call
- type MockRows_Scan_Call
- type MockStmt
- type MockStmt_Close_Call
- type MockStmt_Exec_Call
- type MockStmt_Expecter
- type MockStmt_NumInput_Call
- type MockStmt_Query_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockDB ¶
MockDB is an autogenerated mock type for the DB type
func NewMockDB ¶
NewMockDB creates a new instance of MockDB. 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 (*MockDB) EXPECT ¶
func (_m *MockDB) EXPECT() *MockDB_Expecter
type MockDB_Close_Call ¶
MockDB_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
func (*MockDB_Close_Call) Return ¶
func (_c *MockDB_Close_Call) Return(err error) *MockDB_Close_Call
func (*MockDB_Close_Call) Run ¶
func (_c *MockDB_Close_Call) Run(run func()) *MockDB_Close_Call
func (*MockDB_Close_Call) RunAndReturn ¶
func (_c *MockDB_Close_Call) RunAndReturn(run func() error) *MockDB_Close_Call
type MockDB_Exec_Call ¶
MockDB_Exec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exec'
func (*MockDB_Exec_Call) Return ¶
func (_c *MockDB_Exec_Call) Return(result in.Result, err error) *MockDB_Exec_Call
func (*MockDB_Exec_Call) Run ¶
func (_c *MockDB_Exec_Call) Run(run func(sql string, args ...any)) *MockDB_Exec_Call
func (*MockDB_Exec_Call) RunAndReturn ¶
func (_c *MockDB_Exec_Call) RunAndReturn(run func(sql string, args ...any) (in.Result, error)) *MockDB_Exec_Call
type MockDB_Expecter ¶
type MockDB_Expecter struct {
// contains filtered or unexported fields
}
func (*MockDB_Expecter) Close ¶
func (_e *MockDB_Expecter) Close() *MockDB_Close_Call
Close is a helper method to define mock.On call
func (*MockDB_Expecter) Exec ¶
func (_e *MockDB_Expecter) Exec(sql interface{}, args ...interface{}) *MockDB_Exec_Call
Exec is a helper method to define mock.On call
- sql string
- args ...any
func (*MockDB_Expecter) Prepare ¶
func (_e *MockDB_Expecter) Prepare(sql interface{}) *MockDB_Prepare_Call
Prepare is a helper method to define mock.On call
- sql string
func (*MockDB_Expecter) Query ¶
func (_e *MockDB_Expecter) Query(sql interface{}, args ...interface{}) *MockDB_Query_Call
Query is a helper method to define mock.On call
- sql string
- args ...any
type MockDB_Prepare_Call ¶
MockDB_Prepare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Prepare'
func (*MockDB_Prepare_Call) Return ¶
func (_c *MockDB_Prepare_Call) Return(stmt in.Stmt, err error) *MockDB_Prepare_Call
func (*MockDB_Prepare_Call) Run ¶
func (_c *MockDB_Prepare_Call) Run(run func(sql string)) *MockDB_Prepare_Call
func (*MockDB_Prepare_Call) RunAndReturn ¶
func (_c *MockDB_Prepare_Call) RunAndReturn(run func(sql string) (in.Stmt, error)) *MockDB_Prepare_Call
type MockDB_Query_Call ¶
MockDB_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'
func (*MockDB_Query_Call) Return ¶
func (_c *MockDB_Query_Call) Return(rows in.Rows, err error) *MockDB_Query_Call
func (*MockDB_Query_Call) Run ¶
func (_c *MockDB_Query_Call) Run(run func(sql string, args ...any)) *MockDB_Query_Call
func (*MockDB_Query_Call) RunAndReturn ¶
func (_c *MockDB_Query_Call) RunAndReturn(run func(sql string, args ...any) (in.Rows, error)) *MockDB_Query_Call
type MockResult ¶
MockResult is an autogenerated mock type for the Result type
func NewMockResult ¶
func NewMockResult(t interface {
mock.TestingT
Cleanup(func())
}) *MockResult
NewMockResult creates a new instance of MockResult. 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 (*MockResult) EXPECT ¶
func (_m *MockResult) EXPECT() *MockResult_Expecter
func (*MockResult) LastInsertId ¶
func (_mock *MockResult) LastInsertId() (int64, error)
LastInsertId provides a mock function for the type MockResult
func (*MockResult) RowsAffected ¶
func (_mock *MockResult) RowsAffected() (int64, error)
RowsAffected provides a mock function for the type MockResult
type MockResult_Expecter ¶
type MockResult_Expecter struct {
// contains filtered or unexported fields
}
func (*MockResult_Expecter) LastInsertId ¶
func (_e *MockResult_Expecter) LastInsertId() *MockResult_LastInsertId_Call
LastInsertId is a helper method to define mock.On call
func (*MockResult_Expecter) RowsAffected ¶
func (_e *MockResult_Expecter) RowsAffected() *MockResult_RowsAffected_Call
RowsAffected is a helper method to define mock.On call
type MockResult_LastInsertId_Call ¶
MockResult_LastInsertId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LastInsertId'
func (*MockResult_LastInsertId_Call) Return ¶
func (_c *MockResult_LastInsertId_Call) Return(n int64, err error) *MockResult_LastInsertId_Call
func (*MockResult_LastInsertId_Call) Run ¶
func (_c *MockResult_LastInsertId_Call) Run(run func()) *MockResult_LastInsertId_Call
func (*MockResult_LastInsertId_Call) RunAndReturn ¶
func (_c *MockResult_LastInsertId_Call) RunAndReturn(run func() (int64, error)) *MockResult_LastInsertId_Call
type MockResult_RowsAffected_Call ¶
MockResult_RowsAffected_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RowsAffected'
func (*MockResult_RowsAffected_Call) Return ¶
func (_c *MockResult_RowsAffected_Call) Return(n int64, err error) *MockResult_RowsAffected_Call
func (*MockResult_RowsAffected_Call) Run ¶
func (_c *MockResult_RowsAffected_Call) Run(run func()) *MockResult_RowsAffected_Call
func (*MockResult_RowsAffected_Call) RunAndReturn ¶
func (_c *MockResult_RowsAffected_Call) RunAndReturn(run func() (int64, error)) *MockResult_RowsAffected_Call
type MockRows ¶
MockRows is an autogenerated mock type for the Rows type
func NewMockRows ¶
NewMockRows creates a new instance of MockRows. 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 (*MockRows) EXPECT ¶
func (_m *MockRows) EXPECT() *MockRows_Expecter
type MockRows_Close_Call ¶
MockRows_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
func (*MockRows_Close_Call) Return ¶
func (_c *MockRows_Close_Call) Return(err error) *MockRows_Close_Call
func (*MockRows_Close_Call) Run ¶
func (_c *MockRows_Close_Call) Run(run func()) *MockRows_Close_Call
func (*MockRows_Close_Call) RunAndReturn ¶
func (_c *MockRows_Close_Call) RunAndReturn(run func() error) *MockRows_Close_Call
type MockRows_Columns_Call ¶
MockRows_Columns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Columns'
func (*MockRows_Columns_Call) Return ¶
func (_c *MockRows_Columns_Call) Return(strings []string, err error) *MockRows_Columns_Call
func (*MockRows_Columns_Call) Run ¶
func (_c *MockRows_Columns_Call) Run(run func()) *MockRows_Columns_Call
func (*MockRows_Columns_Call) RunAndReturn ¶
func (_c *MockRows_Columns_Call) RunAndReturn(run func() ([]string, error)) *MockRows_Columns_Call
type MockRows_Err_Call ¶
MockRows_Err_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Err'
func (*MockRows_Err_Call) Return ¶
func (_c *MockRows_Err_Call) Return(err error) *MockRows_Err_Call
func (*MockRows_Err_Call) Run ¶
func (_c *MockRows_Err_Call) Run(run func()) *MockRows_Err_Call
func (*MockRows_Err_Call) RunAndReturn ¶
func (_c *MockRows_Err_Call) RunAndReturn(run func() error) *MockRows_Err_Call
type MockRows_Expecter ¶
type MockRows_Expecter struct {
// contains filtered or unexported fields
}
func (*MockRows_Expecter) Close ¶
func (_e *MockRows_Expecter) Close() *MockRows_Close_Call
Close is a helper method to define mock.On call
func (*MockRows_Expecter) Columns ¶
func (_e *MockRows_Expecter) Columns() *MockRows_Columns_Call
Columns is a helper method to define mock.On call
func (*MockRows_Expecter) Err ¶
func (_e *MockRows_Expecter) Err() *MockRows_Err_Call
Err is a helper method to define mock.On call
func (*MockRows_Expecter) Next ¶
func (_e *MockRows_Expecter) Next() *MockRows_Next_Call
Next is a helper method to define mock.On call
func (*MockRows_Expecter) Scan ¶
func (_e *MockRows_Expecter) Scan(dest ...interface{}) *MockRows_Scan_Call
Scan is a helper method to define mock.On call
- dest ...any
type MockRows_Next_Call ¶
MockRows_Next_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Next'
func (*MockRows_Next_Call) Return ¶
func (_c *MockRows_Next_Call) Return(b bool) *MockRows_Next_Call
func (*MockRows_Next_Call) Run ¶
func (_c *MockRows_Next_Call) Run(run func()) *MockRows_Next_Call
func (*MockRows_Next_Call) RunAndReturn ¶
func (_c *MockRows_Next_Call) RunAndReturn(run func() bool) *MockRows_Next_Call
type MockRows_Scan_Call ¶
MockRows_Scan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Scan'
func (*MockRows_Scan_Call) Return ¶
func (_c *MockRows_Scan_Call) Return(err error) *MockRows_Scan_Call
func (*MockRows_Scan_Call) Run ¶
func (_c *MockRows_Scan_Call) Run(run func(dest ...any)) *MockRows_Scan_Call
func (*MockRows_Scan_Call) RunAndReturn ¶
func (_c *MockRows_Scan_Call) RunAndReturn(run func(dest ...any) error) *MockRows_Scan_Call
type MockStmt ¶
MockStmt is an autogenerated mock type for the Stmt type
func NewMockStmt ¶
NewMockStmt creates a new instance of MockStmt. 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 (*MockStmt) EXPECT ¶
func (_m *MockStmt) EXPECT() *MockStmt_Expecter
type MockStmt_Close_Call ¶
MockStmt_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
func (*MockStmt_Close_Call) Return ¶
func (_c *MockStmt_Close_Call) Return(err error) *MockStmt_Close_Call
func (*MockStmt_Close_Call) Run ¶
func (_c *MockStmt_Close_Call) Run(run func()) *MockStmt_Close_Call
func (*MockStmt_Close_Call) RunAndReturn ¶
func (_c *MockStmt_Close_Call) RunAndReturn(run func() error) *MockStmt_Close_Call
type MockStmt_Exec_Call ¶
MockStmt_Exec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exec'
func (*MockStmt_Exec_Call) Return ¶
func (_c *MockStmt_Exec_Call) Return(result in.Result, err error) *MockStmt_Exec_Call
func (*MockStmt_Exec_Call) Run ¶
func (_c *MockStmt_Exec_Call) Run(run func(args ...any)) *MockStmt_Exec_Call
func (*MockStmt_Exec_Call) RunAndReturn ¶
func (_c *MockStmt_Exec_Call) RunAndReturn(run func(args ...any) (in.Result, error)) *MockStmt_Exec_Call
type MockStmt_Expecter ¶
type MockStmt_Expecter struct {
// contains filtered or unexported fields
}
func (*MockStmt_Expecter) Close ¶
func (_e *MockStmt_Expecter) Close() *MockStmt_Close_Call
Close is a helper method to define mock.On call
func (*MockStmt_Expecter) Exec ¶
func (_e *MockStmt_Expecter) Exec(args ...interface{}) *MockStmt_Exec_Call
Exec is a helper method to define mock.On call
- args ...any
func (*MockStmt_Expecter) NumInput ¶
func (_e *MockStmt_Expecter) NumInput() *MockStmt_NumInput_Call
NumInput is a helper method to define mock.On call
func (*MockStmt_Expecter) Query ¶
func (_e *MockStmt_Expecter) Query(args ...interface{}) *MockStmt_Query_Call
Query is a helper method to define mock.On call
- args ...any
type MockStmt_NumInput_Call ¶
MockStmt_NumInput_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NumInput'
func (*MockStmt_NumInput_Call) Return ¶
func (_c *MockStmt_NumInput_Call) Return(n int) *MockStmt_NumInput_Call
func (*MockStmt_NumInput_Call) Run ¶
func (_c *MockStmt_NumInput_Call) Run(run func()) *MockStmt_NumInput_Call
func (*MockStmt_NumInput_Call) RunAndReturn ¶
func (_c *MockStmt_NumInput_Call) RunAndReturn(run func() int) *MockStmt_NumInput_Call
type MockStmt_Query_Call ¶
MockStmt_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'
func (*MockStmt_Query_Call) Return ¶
func (_c *MockStmt_Query_Call) Return(rows in.Rows, err error) *MockStmt_Query_Call
func (*MockStmt_Query_Call) Run ¶
func (_c *MockStmt_Query_Call) Run(run func(args ...any)) *MockStmt_Query_Call
func (*MockStmt_Query_Call) RunAndReturn ¶
func (_c *MockStmt_Query_Call) RunAndReturn(run func(args ...any) (in.Rows, error)) *MockStmt_Query_Call