Documentation ¶
Index ¶
- type DbTxMock
- func (_m *DbTxMock) Begin(ctx context.Context) (pgx.Tx, error)
- func (_m *DbTxMock) BeginFunc(ctx context.Context, f func(pgx.Tx) error) error
- func (_m *DbTxMock) Commit(ctx context.Context) error
- func (_m *DbTxMock) Conn() *pgx.Conn
- func (_m *DbTxMock) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, ...) (int64, error)
- func (_m *DbTxMock) EXPECT() *DbTxMock_Expecter
- func (_m *DbTxMock) Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error)
- func (_m *DbTxMock) LargeObjects() pgx.LargeObjects
- func (_m *DbTxMock) Prepare(ctx context.Context, name string, sql string) (*pgconn.StatementDescription, error)
- func (_m *DbTxMock) Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error)
- func (_m *DbTxMock) QueryFunc(ctx context.Context, sql string, args []interface{}, scans []interface{}, ...) (pgconn.CommandTag, error)
- func (_m *DbTxMock) QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row
- func (_m *DbTxMock) Rollback(ctx context.Context) error
- func (_m *DbTxMock) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults
- type DbTxMock_BeginFunc_Call
- func (_c *DbTxMock_BeginFunc_Call) Return(err error) *DbTxMock_BeginFunc_Call
- func (_c *DbTxMock_BeginFunc_Call) Run(run func(ctx context.Context, f func(pgx.Tx) error)) *DbTxMock_BeginFunc_Call
- func (_c *DbTxMock_BeginFunc_Call) RunAndReturn(run func(context.Context, func(pgx.Tx) error) error) *DbTxMock_BeginFunc_Call
- type DbTxMock_Begin_Call
- type DbTxMock_Commit_Call
- type DbTxMock_Conn_Call
- type DbTxMock_CopyFrom_Call
- type DbTxMock_Exec_Call
- func (_c *DbTxMock_Exec_Call) Return(commandTag pgconn.CommandTag, err error) *DbTxMock_Exec_Call
- func (_c *DbTxMock_Exec_Call) Run(run func(ctx context.Context, sql string, arguments ...interface{})) *DbTxMock_Exec_Call
- func (_c *DbTxMock_Exec_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (pgconn.CommandTag, error)) *DbTxMock_Exec_Call
- type DbTxMock_Expecter
- func (_e *DbTxMock_Expecter) Begin(ctx interface{}) *DbTxMock_Begin_Call
- func (_e *DbTxMock_Expecter) BeginFunc(ctx interface{}, f interface{}) *DbTxMock_BeginFunc_Call
- func (_e *DbTxMock_Expecter) Commit(ctx interface{}) *DbTxMock_Commit_Call
- func (_e *DbTxMock_Expecter) Conn() *DbTxMock_Conn_Call
- func (_e *DbTxMock_Expecter) CopyFrom(ctx interface{}, tableName interface{}, columnNames interface{}, ...) *DbTxMock_CopyFrom_Call
- func (_e *DbTxMock_Expecter) Exec(ctx interface{}, sql interface{}, arguments ...interface{}) *DbTxMock_Exec_Call
- func (_e *DbTxMock_Expecter) LargeObjects() *DbTxMock_LargeObjects_Call
- func (_e *DbTxMock_Expecter) Prepare(ctx interface{}, name interface{}, sql interface{}) *DbTxMock_Prepare_Call
- func (_e *DbTxMock_Expecter) Query(ctx interface{}, sql interface{}, args ...interface{}) *DbTxMock_Query_Call
- func (_e *DbTxMock_Expecter) QueryFunc(ctx interface{}, sql interface{}, args interface{}, scans interface{}, ...) *DbTxMock_QueryFunc_Call
- func (_e *DbTxMock_Expecter) QueryRow(ctx interface{}, sql interface{}, args ...interface{}) *DbTxMock_QueryRow_Call
- func (_e *DbTxMock_Expecter) Rollback(ctx interface{}) *DbTxMock_Rollback_Call
- func (_e *DbTxMock_Expecter) SendBatch(ctx interface{}, b interface{}) *DbTxMock_SendBatch_Call
- type DbTxMock_LargeObjects_Call
- type DbTxMock_Prepare_Call
- type DbTxMock_QueryFunc_Call
- type DbTxMock_QueryRow_Call
- func (_c *DbTxMock_QueryRow_Call) Return(_a0 pgx.Row) *DbTxMock_QueryRow_Call
- func (_c *DbTxMock_QueryRow_Call) Run(run func(ctx context.Context, sql string, args ...interface{})) *DbTxMock_QueryRow_Call
- func (_c *DbTxMock_QueryRow_Call) RunAndReturn(run func(context.Context, string, ...interface{}) pgx.Row) *DbTxMock_QueryRow_Call
- type DbTxMock_Query_Call
- func (_c *DbTxMock_Query_Call) Return(_a0 pgx.Rows, _a1 error) *DbTxMock_Query_Call
- func (_c *DbTxMock_Query_Call) Run(run func(ctx context.Context, sql string, args ...interface{})) *DbTxMock_Query_Call
- func (_c *DbTxMock_Query_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (pgx.Rows, error)) *DbTxMock_Query_Call
- type DbTxMock_Rollback_Call
- type DbTxMock_SendBatch_Call
- func (_c *DbTxMock_SendBatch_Call) Return(_a0 pgx.BatchResults) *DbTxMock_SendBatch_Call
- func (_c *DbTxMock_SendBatch_Call) Run(run func(ctx context.Context, b *pgx.Batch)) *DbTxMock_SendBatch_Call
- func (_c *DbTxMock_SendBatch_Call) RunAndReturn(run func(context.Context, *pgx.Batch) pgx.BatchResults) *DbTxMock_SendBatch_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbTxMock ¶
DbTxMock is an autogenerated mock type for the Tx type
func NewDbTxMock ¶
NewDbTxMock creates a new instance of DbTxMock. 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 (*DbTxMock) CopyFrom ¶
func (_m *DbTxMock) 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 (*DbTxMock) EXPECT ¶ added in v0.6.3
func (_m *DbTxMock) EXPECT() *DbTxMock_Expecter
func (*DbTxMock) Exec ¶
func (_m *DbTxMock) Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error)
Exec provides a mock function with given fields: ctx, sql, arguments
func (*DbTxMock) LargeObjects ¶
func (_m *DbTxMock) LargeObjects() pgx.LargeObjects
LargeObjects provides a mock function with given fields:
func (*DbTxMock) Prepare ¶
func (_m *DbTxMock) Prepare(ctx context.Context, name string, sql string) (*pgconn.StatementDescription, error)
Prepare provides a mock function with given fields: ctx, name, sql
func (*DbTxMock) QueryFunc ¶
func (_m *DbTxMock) QueryFunc(ctx context.Context, sql string, args []interface{}, scans []interface{}, f func(pgx.QueryFuncRow) error) (pgconn.CommandTag, error)
QueryFunc provides a mock function with given fields: ctx, sql, args, scans, f
type DbTxMock_BeginFunc_Call ¶ added in v0.6.3
DbTxMock_BeginFunc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeginFunc'
func (*DbTxMock_BeginFunc_Call) Return ¶ added in v0.6.3
func (_c *DbTxMock_BeginFunc_Call) Return(err error) *DbTxMock_BeginFunc_Call
func (*DbTxMock_BeginFunc_Call) Run ¶ added in v0.6.3
func (_c *DbTxMock_BeginFunc_Call) Run(run func(ctx context.Context, f func(pgx.Tx) error)) *DbTxMock_BeginFunc_Call
func (*DbTxMock_BeginFunc_Call) RunAndReturn ¶ added in v0.6.3
func (_c *DbTxMock_BeginFunc_Call) RunAndReturn(run func(context.Context, func(pgx.Tx) error) error) *DbTxMock_BeginFunc_Call
type DbTxMock_Begin_Call ¶ added in v0.6.3
DbTxMock_Begin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Begin'
func (*DbTxMock_Begin_Call) Return ¶ added in v0.6.3
func (_c *DbTxMock_Begin_Call) Return(_a0 pgx.Tx, _a1 error) *DbTxMock_Begin_Call
func (*DbTxMock_Begin_Call) Run ¶ added in v0.6.3
func (_c *DbTxMock_Begin_Call) Run(run func(ctx context.Context)) *DbTxMock_Begin_Call
func (*DbTxMock_Begin_Call) RunAndReturn ¶ added in v0.6.3
func (_c *DbTxMock_Begin_Call) RunAndReturn(run func(context.Context) (pgx.Tx, error)) *DbTxMock_Begin_Call
type DbTxMock_Commit_Call ¶ added in v0.6.3
DbTxMock_Commit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Commit'
func (*DbTxMock_Commit_Call) Return ¶ added in v0.6.3
func (_c *DbTxMock_Commit_Call) Return(_a0 error) *DbTxMock_Commit_Call
func (*DbTxMock_Commit_Call) Run ¶ added in v0.6.3
func (_c *DbTxMock_Commit_Call) Run(run func(ctx context.Context)) *DbTxMock_Commit_Call
func (*DbTxMock_Commit_Call) RunAndReturn ¶ added in v0.6.3
func (_c *DbTxMock_Commit_Call) RunAndReturn(run func(context.Context) error) *DbTxMock_Commit_Call
type DbTxMock_Conn_Call ¶ added in v0.6.3
DbTxMock_Conn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Conn'
func (*DbTxMock_Conn_Call) Return ¶ added in v0.6.3
func (_c *DbTxMock_Conn_Call) Return(_a0 *pgx.Conn) *DbTxMock_Conn_Call
func (*DbTxMock_Conn_Call) Run ¶ added in v0.6.3
func (_c *DbTxMock_Conn_Call) Run(run func()) *DbTxMock_Conn_Call
func (*DbTxMock_Conn_Call) RunAndReturn ¶ added in v0.6.3
func (_c *DbTxMock_Conn_Call) RunAndReturn(run func() *pgx.Conn) *DbTxMock_Conn_Call
type DbTxMock_CopyFrom_Call ¶ added in v0.6.3
DbTxMock_CopyFrom_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CopyFrom'
func (*DbTxMock_CopyFrom_Call) Return ¶ added in v0.6.3
func (_c *DbTxMock_CopyFrom_Call) Return(_a0 int64, _a1 error) *DbTxMock_CopyFrom_Call
func (*DbTxMock_CopyFrom_Call) Run ¶ added in v0.6.3
func (_c *DbTxMock_CopyFrom_Call) Run(run func(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource)) *DbTxMock_CopyFrom_Call
func (*DbTxMock_CopyFrom_Call) RunAndReturn ¶ added in v0.6.3
func (_c *DbTxMock_CopyFrom_Call) RunAndReturn(run func(context.Context, pgx.Identifier, []string, pgx.CopyFromSource) (int64, error)) *DbTxMock_CopyFrom_Call
type DbTxMock_Exec_Call ¶ added in v0.6.3
DbTxMock_Exec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exec'
func (*DbTxMock_Exec_Call) Return ¶ added in v0.6.3
func (_c *DbTxMock_Exec_Call) Return(commandTag pgconn.CommandTag, err error) *DbTxMock_Exec_Call
func (*DbTxMock_Exec_Call) Run ¶ added in v0.6.3
func (_c *DbTxMock_Exec_Call) Run(run func(ctx context.Context, sql string, arguments ...interface{})) *DbTxMock_Exec_Call
func (*DbTxMock_Exec_Call) RunAndReturn ¶ added in v0.6.3
func (_c *DbTxMock_Exec_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (pgconn.CommandTag, error)) *DbTxMock_Exec_Call
type DbTxMock_Expecter ¶ added in v0.6.3
type DbTxMock_Expecter struct {
// contains filtered or unexported fields
}
func (*DbTxMock_Expecter) Begin ¶ added in v0.6.3
func (_e *DbTxMock_Expecter) Begin(ctx interface{}) *DbTxMock_Begin_Call
Begin is a helper method to define mock.On call
- ctx context.Context
func (*DbTxMock_Expecter) BeginFunc ¶ added in v0.6.3
func (_e *DbTxMock_Expecter) BeginFunc(ctx interface{}, f interface{}) *DbTxMock_BeginFunc_Call
BeginFunc is a helper method to define mock.On call
- ctx context.Context
- f func(pgx.Tx) error
func (*DbTxMock_Expecter) Commit ¶ added in v0.6.3
func (_e *DbTxMock_Expecter) Commit(ctx interface{}) *DbTxMock_Commit_Call
Commit is a helper method to define mock.On call
- ctx context.Context
func (*DbTxMock_Expecter) Conn ¶ added in v0.6.3
func (_e *DbTxMock_Expecter) Conn() *DbTxMock_Conn_Call
Conn is a helper method to define mock.On call
func (*DbTxMock_Expecter) CopyFrom ¶ added in v0.6.3
func (_e *DbTxMock_Expecter) CopyFrom(ctx interface{}, tableName interface{}, columnNames interface{}, rowSrc interface{}) *DbTxMock_CopyFrom_Call
CopyFrom is a helper method to define mock.On call
- ctx context.Context
- tableName pgx.Identifier
- columnNames []string
- rowSrc pgx.CopyFromSource
func (*DbTxMock_Expecter) Exec ¶ added in v0.6.3
func (_e *DbTxMock_Expecter) Exec(ctx interface{}, sql interface{}, arguments ...interface{}) *DbTxMock_Exec_Call
Exec is a helper method to define mock.On call
- ctx context.Context
- sql string
- arguments ...interface{}
func (*DbTxMock_Expecter) LargeObjects ¶ added in v0.6.3
func (_e *DbTxMock_Expecter) LargeObjects() *DbTxMock_LargeObjects_Call
LargeObjects is a helper method to define mock.On call
func (*DbTxMock_Expecter) Prepare ¶ added in v0.6.3
func (_e *DbTxMock_Expecter) Prepare(ctx interface{}, name interface{}, sql interface{}) *DbTxMock_Prepare_Call
Prepare is a helper method to define mock.On call
- ctx context.Context
- name string
- sql string
func (*DbTxMock_Expecter) Query ¶ added in v0.6.3
func (_e *DbTxMock_Expecter) Query(ctx interface{}, sql interface{}, args ...interface{}) *DbTxMock_Query_Call
Query is a helper method to define mock.On call
- ctx context.Context
- sql string
- args ...interface{}
func (*DbTxMock_Expecter) QueryFunc ¶ added in v0.6.3
func (_e *DbTxMock_Expecter) QueryFunc(ctx interface{}, sql interface{}, args interface{}, scans interface{}, f interface{}) *DbTxMock_QueryFunc_Call
QueryFunc is a helper method to define mock.On call
- ctx context.Context
- sql string
- args []interface{}
- scans []interface{}
- f func(pgx.QueryFuncRow) error
func (*DbTxMock_Expecter) QueryRow ¶ added in v0.6.3
func (_e *DbTxMock_Expecter) QueryRow(ctx interface{}, sql interface{}, args ...interface{}) *DbTxMock_QueryRow_Call
QueryRow is a helper method to define mock.On call
- ctx context.Context
- sql string
- args ...interface{}
func (*DbTxMock_Expecter) Rollback ¶ added in v0.6.3
func (_e *DbTxMock_Expecter) Rollback(ctx interface{}) *DbTxMock_Rollback_Call
Rollback is a helper method to define mock.On call
- ctx context.Context
func (*DbTxMock_Expecter) SendBatch ¶ added in v0.6.3
func (_e *DbTxMock_Expecter) SendBatch(ctx interface{}, b interface{}) *DbTxMock_SendBatch_Call
SendBatch is a helper method to define mock.On call
- ctx context.Context
- b *pgx.Batch
type DbTxMock_LargeObjects_Call ¶ added in v0.6.3
DbTxMock_LargeObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LargeObjects'
func (*DbTxMock_LargeObjects_Call) Return ¶ added in v0.6.3
func (_c *DbTxMock_LargeObjects_Call) Return(_a0 pgx.LargeObjects) *DbTxMock_LargeObjects_Call
func (*DbTxMock_LargeObjects_Call) Run ¶ added in v0.6.3
func (_c *DbTxMock_LargeObjects_Call) Run(run func()) *DbTxMock_LargeObjects_Call
func (*DbTxMock_LargeObjects_Call) RunAndReturn ¶ added in v0.6.3
func (_c *DbTxMock_LargeObjects_Call) RunAndReturn(run func() pgx.LargeObjects) *DbTxMock_LargeObjects_Call
type DbTxMock_Prepare_Call ¶ added in v0.6.3
DbTxMock_Prepare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Prepare'
func (*DbTxMock_Prepare_Call) Return ¶ added in v0.6.3
func (_c *DbTxMock_Prepare_Call) Return(_a0 *pgconn.StatementDescription, _a1 error) *DbTxMock_Prepare_Call
func (*DbTxMock_Prepare_Call) Run ¶ added in v0.6.3
func (_c *DbTxMock_Prepare_Call) Run(run func(ctx context.Context, name string, sql string)) *DbTxMock_Prepare_Call
func (*DbTxMock_Prepare_Call) RunAndReturn ¶ added in v0.6.3
func (_c *DbTxMock_Prepare_Call) RunAndReturn(run func(context.Context, string, string) (*pgconn.StatementDescription, error)) *DbTxMock_Prepare_Call
type DbTxMock_QueryFunc_Call ¶ added in v0.6.3
DbTxMock_QueryFunc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryFunc'
func (*DbTxMock_QueryFunc_Call) Return ¶ added in v0.6.3
func (_c *DbTxMock_QueryFunc_Call) Return(_a0 pgconn.CommandTag, _a1 error) *DbTxMock_QueryFunc_Call
func (*DbTxMock_QueryFunc_Call) Run ¶ added in v0.6.3
func (_c *DbTxMock_QueryFunc_Call) Run(run func(ctx context.Context, sql string, args []interface{}, scans []interface{}, f func(pgx.QueryFuncRow) error)) *DbTxMock_QueryFunc_Call
func (*DbTxMock_QueryFunc_Call) RunAndReturn ¶ added in v0.6.3
func (_c *DbTxMock_QueryFunc_Call) RunAndReturn(run func(context.Context, string, []interface{}, []interface{}, func(pgx.QueryFuncRow) error) (pgconn.CommandTag, error)) *DbTxMock_QueryFunc_Call
type DbTxMock_QueryRow_Call ¶ added in v0.6.3
DbTxMock_QueryRow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryRow'
func (*DbTxMock_QueryRow_Call) Return ¶ added in v0.6.3
func (_c *DbTxMock_QueryRow_Call) Return(_a0 pgx.Row) *DbTxMock_QueryRow_Call
func (*DbTxMock_QueryRow_Call) Run ¶ added in v0.6.3
func (_c *DbTxMock_QueryRow_Call) Run(run func(ctx context.Context, sql string, args ...interface{})) *DbTxMock_QueryRow_Call
func (*DbTxMock_QueryRow_Call) RunAndReturn ¶ added in v0.6.3
func (_c *DbTxMock_QueryRow_Call) RunAndReturn(run func(context.Context, string, ...interface{}) pgx.Row) *DbTxMock_QueryRow_Call
type DbTxMock_Query_Call ¶ added in v0.6.3
DbTxMock_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'
func (*DbTxMock_Query_Call) Return ¶ added in v0.6.3
func (_c *DbTxMock_Query_Call) Return(_a0 pgx.Rows, _a1 error) *DbTxMock_Query_Call
func (*DbTxMock_Query_Call) Run ¶ added in v0.6.3
func (_c *DbTxMock_Query_Call) Run(run func(ctx context.Context, sql string, args ...interface{})) *DbTxMock_Query_Call
func (*DbTxMock_Query_Call) RunAndReturn ¶ added in v0.6.3
func (_c *DbTxMock_Query_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (pgx.Rows, error)) *DbTxMock_Query_Call
type DbTxMock_Rollback_Call ¶ added in v0.6.3
DbTxMock_Rollback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Rollback'
func (*DbTxMock_Rollback_Call) Return ¶ added in v0.6.3
func (_c *DbTxMock_Rollback_Call) Return(_a0 error) *DbTxMock_Rollback_Call
func (*DbTxMock_Rollback_Call) Run ¶ added in v0.6.3
func (_c *DbTxMock_Rollback_Call) Run(run func(ctx context.Context)) *DbTxMock_Rollback_Call
func (*DbTxMock_Rollback_Call) RunAndReturn ¶ added in v0.6.3
func (_c *DbTxMock_Rollback_Call) RunAndReturn(run func(context.Context) error) *DbTxMock_Rollback_Call
type DbTxMock_SendBatch_Call ¶ added in v0.6.3
DbTxMock_SendBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendBatch'
func (*DbTxMock_SendBatch_Call) Return ¶ added in v0.6.3
func (_c *DbTxMock_SendBatch_Call) Return(_a0 pgx.BatchResults) *DbTxMock_SendBatch_Call
func (*DbTxMock_SendBatch_Call) Run ¶ added in v0.6.3
func (_c *DbTxMock_SendBatch_Call) Run(run func(ctx context.Context, b *pgx.Batch)) *DbTxMock_SendBatch_Call
func (*DbTxMock_SendBatch_Call) RunAndReturn ¶ added in v0.6.3
func (_c *DbTxMock_SendBatch_Call) RunAndReturn(run func(context.Context, *pgx.Batch) pgx.BatchResults) *DbTxMock_SendBatch_Call