Documentation ¶
Index ¶
- type MockPostgreser
- func (_m *MockPostgreser) Begin(ctx context.Context) (pgx.Tx, error)
- func (_m *MockPostgreser) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, ...) (int64, error)
- func (_m *MockPostgreser) EXPECT() *MockPostgreser_Expecter
- func (_m *MockPostgreser) Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error)
- func (_m *MockPostgreser) Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error)
- type MockPostgreser_Begin_Call
- func (_c *MockPostgreser_Begin_Call) Return(_a0 pgx.Tx, _a1 error) *MockPostgreser_Begin_Call
- func (_c *MockPostgreser_Begin_Call) Run(run func(ctx context.Context)) *MockPostgreser_Begin_Call
- func (_c *MockPostgreser_Begin_Call) RunAndReturn(run func(context.Context) (pgx.Tx, error)) *MockPostgreser_Begin_Call
- type MockPostgreser_CopyFrom_Call
- type MockPostgreser_Exec_Call
- func (_c *MockPostgreser_Exec_Call) Return(_a0 pgconn.CommandTag, _a1 error) *MockPostgreser_Exec_Call
- func (_c *MockPostgreser_Exec_Call) Run(run func(ctx context.Context, sql string, arguments ...interface{})) *MockPostgreser_Exec_Call
- func (_c *MockPostgreser_Exec_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (pgconn.CommandTag, error)) *MockPostgreser_Exec_Call
- type MockPostgreser_Expecter
- func (_e *MockPostgreser_Expecter) Begin(ctx interface{}) *MockPostgreser_Begin_Call
- func (_e *MockPostgreser_Expecter) CopyFrom(ctx interface{}, tableName interface{}, columnNames interface{}, ...) *MockPostgreser_CopyFrom_Call
- func (_e *MockPostgreser_Expecter) Exec(ctx interface{}, sql interface{}, arguments ...interface{}) *MockPostgreser_Exec_Call
- func (_e *MockPostgreser_Expecter) Query(ctx interface{}, sql interface{}, args ...interface{}) *MockPostgreser_Query_Call
- type MockPostgreser_Query_Call
- func (_c *MockPostgreser_Query_Call) Return(_a0 pgx.Rows, _a1 error) *MockPostgreser_Query_Call
- func (_c *MockPostgreser_Query_Call) Run(run func(ctx context.Context, sql string, args ...interface{})) *MockPostgreser_Query_Call
- func (_c *MockPostgreser_Query_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (pgx.Rows, error)) *MockPostgreser_Query_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockPostgreser ¶
MockPostgreser is an autogenerated mock type for the Postgreser type
func NewMockPostgreser ¶
func NewMockPostgreser(t interface { mock.TestingT Cleanup(func()) }) *MockPostgreser
NewMockPostgreser creates a new instance of MockPostgreser. 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 (*MockPostgreser) CopyFrom ¶
func (_m *MockPostgreser) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
CopyFrom provides a mock function with given fields: ctx, tableName, columnNames, rowSrc
func (*MockPostgreser) EXPECT ¶
func (_m *MockPostgreser) EXPECT() *MockPostgreser_Expecter
func (*MockPostgreser) Exec ¶
func (_m *MockPostgreser) Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error)
Exec provides a mock function with given fields: ctx, sql, arguments
type MockPostgreser_Begin_Call ¶
MockPostgreser_Begin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Begin'
func (*MockPostgreser_Begin_Call) Return ¶
func (_c *MockPostgreser_Begin_Call) Return(_a0 pgx.Tx, _a1 error) *MockPostgreser_Begin_Call
func (*MockPostgreser_Begin_Call) Run ¶
func (_c *MockPostgreser_Begin_Call) Run(run func(ctx context.Context)) *MockPostgreser_Begin_Call
func (*MockPostgreser_Begin_Call) RunAndReturn ¶
func (_c *MockPostgreser_Begin_Call) RunAndReturn(run func(context.Context) (pgx.Tx, error)) *MockPostgreser_Begin_Call
type MockPostgreser_CopyFrom_Call ¶
MockPostgreser_CopyFrom_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CopyFrom'
func (*MockPostgreser_CopyFrom_Call) Return ¶
func (_c *MockPostgreser_CopyFrom_Call) Return(_a0 int64, _a1 error) *MockPostgreser_CopyFrom_Call
func (*MockPostgreser_CopyFrom_Call) Run ¶
func (_c *MockPostgreser_CopyFrom_Call) Run(run func(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource)) *MockPostgreser_CopyFrom_Call
func (*MockPostgreser_CopyFrom_Call) RunAndReturn ¶
func (_c *MockPostgreser_CopyFrom_Call) RunAndReturn(run func(context.Context, pgx.Identifier, []string, pgx.CopyFromSource) (int64, error)) *MockPostgreser_CopyFrom_Call
type MockPostgreser_Exec_Call ¶
MockPostgreser_Exec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exec'
func (*MockPostgreser_Exec_Call) Return ¶
func (_c *MockPostgreser_Exec_Call) Return(_a0 pgconn.CommandTag, _a1 error) *MockPostgreser_Exec_Call
func (*MockPostgreser_Exec_Call) Run ¶
func (_c *MockPostgreser_Exec_Call) Run(run func(ctx context.Context, sql string, arguments ...interface{})) *MockPostgreser_Exec_Call
func (*MockPostgreser_Exec_Call) RunAndReturn ¶
func (_c *MockPostgreser_Exec_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (pgconn.CommandTag, error)) *MockPostgreser_Exec_Call
type MockPostgreser_Expecter ¶
type MockPostgreser_Expecter struct {
// contains filtered or unexported fields
}
func (*MockPostgreser_Expecter) Begin ¶
func (_e *MockPostgreser_Expecter) Begin(ctx interface{}) *MockPostgreser_Begin_Call
Begin is a helper method to define mock.On call
- ctx context.Context
func (*MockPostgreser_Expecter) CopyFrom ¶
func (_e *MockPostgreser_Expecter) CopyFrom(ctx interface{}, tableName interface{}, columnNames interface{}, rowSrc interface{}) *MockPostgreser_CopyFrom_Call
CopyFrom is a helper method to define mock.On call
- ctx context.Context
- tableName pgx.Identifier
- columnNames []string
- rowSrc pgx.CopyFromSource
func (*MockPostgreser_Expecter) Exec ¶
func (_e *MockPostgreser_Expecter) Exec(ctx interface{}, sql interface{}, arguments ...interface{}) *MockPostgreser_Exec_Call
Exec is a helper method to define mock.On call
- ctx context.Context
- sql string
- arguments ...interface{}
func (*MockPostgreser_Expecter) Query ¶
func (_e *MockPostgreser_Expecter) Query(ctx interface{}, sql interface{}, args ...interface{}) *MockPostgreser_Query_Call
Query is a helper method to define mock.On call
- ctx context.Context
- sql string
- args ...interface{}
type MockPostgreser_Query_Call ¶
MockPostgreser_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'
func (*MockPostgreser_Query_Call) Return ¶
func (_c *MockPostgreser_Query_Call) Return(_a0 pgx.Rows, _a1 error) *MockPostgreser_Query_Call
func (*MockPostgreser_Query_Call) Run ¶
func (_c *MockPostgreser_Query_Call) Run(run func(ctx context.Context, sql string, args ...interface{})) *MockPostgreser_Query_Call
func (*MockPostgreser_Query_Call) RunAndReturn ¶
func (_c *MockPostgreser_Query_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (pgx.Rows, error)) *MockPostgreser_Query_Call