pool

package
v0.0.0-...-ff538be Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	mock.Mock
}

DB is an autogenerated mock type for the DB type

func NewDB

func NewDB(t interface {
	mock.TestingT
	Cleanup(func())
}) *DB

NewDB creates a new instance of DB. 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 (*DB) BeginTx

func (_m *DB) BeginTx(ctx context.Context, txOptions pgx.TxOptions) (pgx.Tx, error)

BeginTx provides a mock function with given fields: ctx, txOptions

func (*DB) CopyFrom

func (_m *DB) 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 (*DB) EXPECT

func (_m *DB) EXPECT() *DB_Expecter

func (*DB) Exec

func (_m *DB) Exec(_a0 context.Context, _a1 string, _a2 ...interface{}) (pgconn.CommandTag, error)

Exec provides a mock function with given fields: _a0, _a1, _a2

func (*DB) Query

func (_m *DB) Query(_a0 context.Context, _a1 string, _a2 ...interface{}) (pgx.Rows, error)

Query provides a mock function with given fields: _a0, _a1, _a2

func (*DB) QueryRow

func (_m *DB) QueryRow(_a0 context.Context, _a1 string, _a2 ...interface{}) pgx.Row

QueryRow provides a mock function with given fields: _a0, _a1, _a2

type DB_BeginTx_Call

type DB_BeginTx_Call struct {
	*mock.Call
}

DB_BeginTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeginTx'

func (*DB_BeginTx_Call) Return

func (_c *DB_BeginTx_Call) Return(_a0 pgx.Tx, _a1 error) *DB_BeginTx_Call

func (*DB_BeginTx_Call) Run

func (_c *DB_BeginTx_Call) Run(run func(ctx context.Context, txOptions pgx.TxOptions)) *DB_BeginTx_Call

func (*DB_BeginTx_Call) RunAndReturn

func (_c *DB_BeginTx_Call) RunAndReturn(run func(context.Context, pgx.TxOptions) (pgx.Tx, error)) *DB_BeginTx_Call

type DB_CopyFrom_Call

type DB_CopyFrom_Call struct {
	*mock.Call
}

DB_CopyFrom_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CopyFrom'

func (*DB_CopyFrom_Call) Return

func (_c *DB_CopyFrom_Call) Return(_a0 int64, _a1 error) *DB_CopyFrom_Call

func (*DB_CopyFrom_Call) Run

func (_c *DB_CopyFrom_Call) Run(run func(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource)) *DB_CopyFrom_Call

func (*DB_CopyFrom_Call) RunAndReturn

type DB_Exec_Call

type DB_Exec_Call struct {
	*mock.Call
}

DB_Exec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exec'

func (*DB_Exec_Call) Return

func (_c *DB_Exec_Call) Return(_a0 pgconn.CommandTag, _a1 error) *DB_Exec_Call

func (*DB_Exec_Call) Run

func (_c *DB_Exec_Call) Run(run func(_a0 context.Context, _a1 string, _a2 ...interface{})) *DB_Exec_Call

func (*DB_Exec_Call) RunAndReturn

func (_c *DB_Exec_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (pgconn.CommandTag, error)) *DB_Exec_Call

type DB_Expecter

type DB_Expecter struct {
	// contains filtered or unexported fields
}

func (*DB_Expecter) BeginTx

func (_e *DB_Expecter) BeginTx(ctx interface{}, txOptions interface{}) *DB_BeginTx_Call

BeginTx is a helper method to define mock.On call

  • ctx context.Context
  • txOptions pgx.TxOptions

func (*DB_Expecter) CopyFrom

func (_e *DB_Expecter) CopyFrom(ctx interface{}, tableName interface{}, columnNames interface{}, rowSrc interface{}) *DB_CopyFrom_Call

CopyFrom is a helper method to define mock.On call

  • ctx context.Context
  • tableName pgx.Identifier
  • columnNames []string
  • rowSrc pgx.CopyFromSource

func (*DB_Expecter) Exec

func (_e *DB_Expecter) Exec(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *DB_Exec_Call

Exec is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 string
  • _a2 ...interface{}

func (*DB_Expecter) Query

func (_e *DB_Expecter) Query(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *DB_Query_Call

Query is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 string
  • _a2 ...interface{}

func (*DB_Expecter) QueryRow

func (_e *DB_Expecter) QueryRow(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *DB_QueryRow_Call

QueryRow is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 string
  • _a2 ...interface{}

type DB_QueryRow_Call

type DB_QueryRow_Call struct {
	*mock.Call
}

DB_QueryRow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryRow'

func (*DB_QueryRow_Call) Return

func (_c *DB_QueryRow_Call) Return(_a0 pgx.Row) *DB_QueryRow_Call

func (*DB_QueryRow_Call) Run

func (_c *DB_QueryRow_Call) Run(run func(_a0 context.Context, _a1 string, _a2 ...interface{})) *DB_QueryRow_Call

func (*DB_QueryRow_Call) RunAndReturn

func (_c *DB_QueryRow_Call) RunAndReturn(run func(context.Context, string, ...interface{}) pgx.Row) *DB_QueryRow_Call

type DB_Query_Call

type DB_Query_Call struct {
	*mock.Call
}

DB_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'

func (*DB_Query_Call) Return

func (_c *DB_Query_Call) Return(_a0 pgx.Rows, _a1 error) *DB_Query_Call

func (*DB_Query_Call) Run

func (_c *DB_Query_Call) Run(run func(_a0 context.Context, _a1 string, _a2 ...interface{})) *DB_Query_Call

func (*DB_Query_Call) RunAndReturn

func (_c *DB_Query_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (pgx.Rows, error)) *DB_Query_Call

type Transaction

type Transaction struct {
	mock.Mock
}

Transaction is an autogenerated mock type for the Transaction type

func NewTransaction

func NewTransaction(t interface {
	mock.TestingT
	Cleanup(func())
}) *Transaction

NewTransaction creates a new instance of Transaction. 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 (*Transaction) Begin

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

Begin provides a mock function with given fields: ctx

func (*Transaction) Commit

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

Commit provides a mock function with given fields: ctx

func (*Transaction) Conn

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

Conn provides a mock function with given fields:

func (*Transaction) CopyFrom

func (_m *Transaction) 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 (*Transaction) EXPECT

func (_m *Transaction) EXPECT() *Transaction_Expecter

func (*Transaction) Exec

func (_m *Transaction) Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error)

Exec provides a mock function with given fields: ctx, sql, arguments

func (*Transaction) LargeObjects

func (_m *Transaction) LargeObjects() pgx.LargeObjects

LargeObjects provides a mock function with given fields:

func (*Transaction) Prepare

func (_m *Transaction) Prepare(ctx context.Context, name string, sql string) (*pgconn.StatementDescription, error)

Prepare provides a mock function with given fields: ctx, name, sql

func (*Transaction) Query

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

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

func (*Transaction) QueryRow

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

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

func (*Transaction) Rollback

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

Rollback provides a mock function with given fields: ctx

func (*Transaction) SendBatch

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

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

type Transaction_Begin_Call

type Transaction_Begin_Call struct {
	*mock.Call
}

Transaction_Begin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Begin'

func (*Transaction_Begin_Call) Return

func (*Transaction_Begin_Call) Run

func (*Transaction_Begin_Call) RunAndReturn

func (_c *Transaction_Begin_Call) RunAndReturn(run func(context.Context) (pgx.Tx, error)) *Transaction_Begin_Call

type Transaction_Commit_Call

type Transaction_Commit_Call struct {
	*mock.Call
}

Transaction_Commit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Commit'

func (*Transaction_Commit_Call) Return

func (*Transaction_Commit_Call) Run

func (*Transaction_Commit_Call) RunAndReturn

type Transaction_Conn_Call

type Transaction_Conn_Call struct {
	*mock.Call
}

Transaction_Conn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Conn'

func (*Transaction_Conn_Call) Return

func (*Transaction_Conn_Call) Run

func (_c *Transaction_Conn_Call) Run(run func()) *Transaction_Conn_Call

func (*Transaction_Conn_Call) RunAndReturn

func (_c *Transaction_Conn_Call) RunAndReturn(run func() *pgx.Conn) *Transaction_Conn_Call

type Transaction_CopyFrom_Call

type Transaction_CopyFrom_Call struct {
	*mock.Call
}

Transaction_CopyFrom_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CopyFrom'

func (*Transaction_CopyFrom_Call) Return

func (*Transaction_CopyFrom_Call) Run

func (_c *Transaction_CopyFrom_Call) Run(run func(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource)) *Transaction_CopyFrom_Call

func (*Transaction_CopyFrom_Call) RunAndReturn

type Transaction_Exec_Call

type Transaction_Exec_Call struct {
	*mock.Call
}

Transaction_Exec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exec'

func (*Transaction_Exec_Call) Return

func (_c *Transaction_Exec_Call) Return(commandTag pgconn.CommandTag, err error) *Transaction_Exec_Call

func (*Transaction_Exec_Call) Run

func (_c *Transaction_Exec_Call) Run(run func(ctx context.Context, sql string, arguments ...interface{})) *Transaction_Exec_Call

func (*Transaction_Exec_Call) RunAndReturn

func (_c *Transaction_Exec_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (pgconn.CommandTag, error)) *Transaction_Exec_Call

type Transaction_Expecter

type Transaction_Expecter struct {
	// contains filtered or unexported fields
}

func (*Transaction_Expecter) Begin

func (_e *Transaction_Expecter) Begin(ctx interface{}) *Transaction_Begin_Call

Begin is a helper method to define mock.On call

  • ctx context.Context

func (*Transaction_Expecter) Commit

func (_e *Transaction_Expecter) Commit(ctx interface{}) *Transaction_Commit_Call

Commit is a helper method to define mock.On call

  • ctx context.Context

func (*Transaction_Expecter) Conn

Conn is a helper method to define mock.On call

func (*Transaction_Expecter) CopyFrom

func (_e *Transaction_Expecter) CopyFrom(ctx interface{}, tableName interface{}, columnNames interface{}, rowSrc interface{}) *Transaction_CopyFrom_Call

CopyFrom is a helper method to define mock.On call

  • ctx context.Context
  • tableName pgx.Identifier
  • columnNames []string
  • rowSrc pgx.CopyFromSource

func (*Transaction_Expecter) Exec

func (_e *Transaction_Expecter) Exec(ctx interface{}, sql interface{}, arguments ...interface{}) *Transaction_Exec_Call

Exec is a helper method to define mock.On call

  • ctx context.Context
  • sql string
  • arguments ...interface{}

func (*Transaction_Expecter) LargeObjects

LargeObjects is a helper method to define mock.On call

func (*Transaction_Expecter) Prepare

func (_e *Transaction_Expecter) Prepare(ctx interface{}, name interface{}, sql interface{}) *Transaction_Prepare_Call

Prepare is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • sql string

func (*Transaction_Expecter) Query

func (_e *Transaction_Expecter) Query(ctx interface{}, sql interface{}, args ...interface{}) *Transaction_Query_Call

Query is a helper method to define mock.On call

  • ctx context.Context
  • sql string
  • args ...interface{}

func (*Transaction_Expecter) QueryRow

func (_e *Transaction_Expecter) QueryRow(ctx interface{}, sql interface{}, args ...interface{}) *Transaction_QueryRow_Call

QueryRow is a helper method to define mock.On call

  • ctx context.Context
  • sql string
  • args ...interface{}

func (*Transaction_Expecter) Rollback

func (_e *Transaction_Expecter) Rollback(ctx interface{}) *Transaction_Rollback_Call

Rollback is a helper method to define mock.On call

  • ctx context.Context

func (*Transaction_Expecter) SendBatch

func (_e *Transaction_Expecter) SendBatch(ctx interface{}, b interface{}) *Transaction_SendBatch_Call

SendBatch is a helper method to define mock.On call

  • ctx context.Context
  • b *pgx.Batch

type Transaction_LargeObjects_Call

type Transaction_LargeObjects_Call struct {
	*mock.Call
}

Transaction_LargeObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LargeObjects'

func (*Transaction_LargeObjects_Call) Return

func (*Transaction_LargeObjects_Call) Run

func (*Transaction_LargeObjects_Call) RunAndReturn

type Transaction_Prepare_Call

type Transaction_Prepare_Call struct {
	*mock.Call
}

Transaction_Prepare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Prepare'

func (*Transaction_Prepare_Call) Return

func (*Transaction_Prepare_Call) Run

func (*Transaction_Prepare_Call) RunAndReturn

type Transaction_QueryRow_Call

type Transaction_QueryRow_Call struct {
	*mock.Call
}

Transaction_QueryRow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryRow'

func (*Transaction_QueryRow_Call) Return

func (*Transaction_QueryRow_Call) Run

func (_c *Transaction_QueryRow_Call) Run(run func(ctx context.Context, sql string, args ...interface{})) *Transaction_QueryRow_Call

func (*Transaction_QueryRow_Call) RunAndReturn

func (_c *Transaction_QueryRow_Call) RunAndReturn(run func(context.Context, string, ...interface{}) pgx.Row) *Transaction_QueryRow_Call

type Transaction_Query_Call

type Transaction_Query_Call struct {
	*mock.Call
}

Transaction_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'

func (*Transaction_Query_Call) Return

func (*Transaction_Query_Call) Run

func (_c *Transaction_Query_Call) Run(run func(ctx context.Context, sql string, args ...interface{})) *Transaction_Query_Call

func (*Transaction_Query_Call) RunAndReturn

func (_c *Transaction_Query_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (pgx.Rows, error)) *Transaction_Query_Call

type Transaction_Rollback_Call

type Transaction_Rollback_Call struct {
	*mock.Call
}

Transaction_Rollback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Rollback'

func (*Transaction_Rollback_Call) Return

func (*Transaction_Rollback_Call) Run

func (*Transaction_Rollback_Call) RunAndReturn

type Transaction_SendBatch_Call

type Transaction_SendBatch_Call struct {
	*mock.Call
}

Transaction_SendBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendBatch'

func (*Transaction_SendBatch_Call) Return

func (*Transaction_SendBatch_Call) Run

func (*Transaction_SendBatch_Call) RunAndReturn

Jump to

Keyboard shortcuts

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