mocks

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbTxMock

type DbTxMock struct {
	mock.Mock
}

DbTxMock is an autogenerated mock type for the Tx type

func NewDbTxMock

func NewDbTxMock(t interface {
	mock.TestingT
	Cleanup(func())
}) *DbTxMock

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) Begin

func (_m *DbTxMock) Begin(ctx context.Context) (pgx.Tx, error)

Begin provides a mock function with given fields: ctx

func (*DbTxMock) BeginFunc

func (_m *DbTxMock) BeginFunc(ctx context.Context, f func(pgx.Tx) error) error

BeginFunc provides a mock function with given fields: ctx, f

func (*DbTxMock) Commit

func (_m *DbTxMock) Commit(ctx context.Context) error

Commit provides a mock function with given fields: ctx

func (*DbTxMock) Conn

func (_m *DbTxMock) Conn() *pgx.Conn

Conn provides a mock function with given fields:

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) Query

func (_m *DbTxMock) Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error)

Query provides a mock function with given fields: ctx, sql, args

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

func (*DbTxMock) QueryRow

func (_m *DbTxMock) QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row

QueryRow provides a mock function with given fields: ctx, sql, args

func (*DbTxMock) Rollback

func (_m *DbTxMock) Rollback(ctx context.Context) error

Rollback provides a mock function with given fields: ctx

func (*DbTxMock) SendBatch

func (_m *DbTxMock) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults

SendBatch provides a mock function with given fields: ctx, b

type DbTxMock_BeginFunc_Call added in v0.6.3

type DbTxMock_BeginFunc_Call struct {
	*mock.Call
}

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 (*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

type DbTxMock_Begin_Call struct {
	*mock.Call
}

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

type DbTxMock_Commit_Call struct {
	*mock.Call
}

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 (*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

type DbTxMock_Conn_Call struct {
	*mock.Call
}

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

type DbTxMock_CopyFrom_Call struct {
	*mock.Call
}

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 (*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

type DbTxMock_Exec_Call added in v0.6.3

type DbTxMock_Exec_Call struct {
	*mock.Call
}

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

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

type DbTxMock_LargeObjects_Call struct {
	*mock.Call
}

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 (*DbTxMock_LargeObjects_Call) Run added in v0.6.3

func (*DbTxMock_LargeObjects_Call) RunAndReturn added in v0.6.3

type DbTxMock_Prepare_Call added in v0.6.3

type DbTxMock_Prepare_Call struct {
	*mock.Call
}

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 (*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

type DbTxMock_QueryFunc_Call added in v0.6.3

type DbTxMock_QueryFunc_Call struct {
	*mock.Call
}

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 (*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

type DbTxMock_QueryRow_Call struct {
	*mock.Call
}

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 (*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

type DbTxMock_Query_Call struct {
	*mock.Call
}

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

type DbTxMock_Rollback_Call struct {
	*mock.Call
}

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 (*DbTxMock_Rollback_Call) Run added in v0.6.3

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

type DbTxMock_SendBatch_Call struct {
	*mock.Call
}

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 (*DbTxMock_SendBatch_Call) Run added in v0.6.3

func (*DbTxMock_SendBatch_Call) RunAndReturn added in v0.6.3

Jump to

Keyboard shortcuts

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