mocks

package
v0.0.0-...-7544f7c Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool struct {
	mock.Mock
}

Pool is an autogenerated mock type for the Pool type

func NewPool

func NewPool(t interface {
	mock.TestingT
	Cleanup(func())
}) *Pool

NewPool creates a new instance of Pool. 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 (*Pool) Acquire

func (_m *Pool) Acquire(ctx context.Context) (*pgxpool.Conn, error)

Acquire provides a mock function with given fields: ctx

func (*Pool) AcquireAllIdle

func (_m *Pool) AcquireAllIdle(ctx context.Context) []*pgxpool.Conn

AcquireAllIdle provides a mock function with given fields: ctx

func (*Pool) AcquireFunc

func (_m *Pool) AcquireFunc(ctx context.Context, f func(*pgxpool.Conn) error) error

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

func (*Pool) Begin

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

Begin provides a mock function with given fields: ctx

func (*Pool) BeginFunc

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

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

func (*Pool) BeginTx

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

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

func (*Pool) BeginTxFunc

func (_m *Pool) BeginTxFunc(ctx context.Context, txOptions pgx.TxOptions, f func(pgx.Tx) error) error

BeginTxFunc provides a mock function with given fields: ctx, txOptions, f

func (*Pool) Close

func (_m *Pool) Close()

Close provides a mock function with given fields:

func (*Pool) Config

func (_m *Pool) Config() *pgxpool.Config

Config provides a mock function with given fields:

func (*Pool) CopyFrom

func (_m *Pool) 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 (*Pool) Exec

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

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

func (*Pool) Ping

func (_m *Pool) Ping(ctx context.Context) error

Ping provides a mock function with given fields: ctx

func (*Pool) Query

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

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

func (*Pool) QueryFunc

func (_m *Pool) 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 (*Pool) QueryRow

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

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

func (*Pool) SendBatch

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

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

Jump to

Keyboard shortcuts

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