tools

package
v0.0.0-...-3cfe61e Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package tools is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockPGXClient

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

MockPGXClient is a mock of PGXClient interface

func NewMockPGXClient

func NewMockPGXClient(ctrl *gomock.Controller) *MockPGXClient

NewMockPGXClient creates a new mock instance

func (*MockPGXClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockPGXClient) GetMaster

func (m *MockPGXClient) GetMaster(ctx context.Context) (PGXPool, error)

GetMaster mocks base method

func (*MockPGXClient) GetSlave

func (m *MockPGXClient) GetSlave(ctx context.Context) (PGXPool, error)

GetSlave mocks base method

type MockPGXClientMockRecorder

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

MockPGXClientMockRecorder is the mock recorder for MockPGXClient

func (*MockPGXClientMockRecorder) GetMaster

func (mr *MockPGXClientMockRecorder) GetMaster(ctx interface{}) *gomock.Call

GetMaster indicates an expected call of GetMaster

func (*MockPGXClientMockRecorder) GetSlave

func (mr *MockPGXClientMockRecorder) GetSlave(ctx interface{}) *gomock.Call

GetSlave indicates an expected call of GetSlave

type MockPGXPool

type MockPGXPool struct {
	QueryRowFunc func(ctx context.Context, sql string, args ...any) pgx.Row
}

MockPGXPool represents a mock implementation of *pgxpool.Pool

func (*MockPGXPool) QueryRow

func (m *MockPGXPool) QueryRow(ctx context.Context, sql string, args ...any) pgx.Row

type MockPGXRow

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

MockPGXRow represents a mock implementation of pgx.Row

func NewMockPGXRow

func NewMockPGXRow(columns []string, values []interface{}) *MockPGXRow

func (*MockPGXRow) Scan

func (m *MockPGXRow) Scan(dest ...interface{}) error

type MockPGXRows

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

MockPGXRows represents a mock implementation of pgx.Rows

func NewMockPGXRows

func NewMockPGXRows(columns []string, data [][]interface{}) *MockPGXRows

func (*MockPGXRows) Close

func (m *MockPGXRows) Close()

func (*MockPGXRows) CommandTag

func (m *MockPGXRows) CommandTag() pgconn.CommandTag

func (*MockPGXRows) Err

func (m *MockPGXRows) Err() error

func (*MockPGXRows) FieldDescriptions

func (m *MockPGXRows) FieldDescriptions() []pgconn.FieldDescription

func (*MockPGXRows) Next

func (m *MockPGXRows) Next() bool

func (*MockPGXRows) RawValues

func (m *MockPGXRows) RawValues() [][]byte

func (*MockPGXRows) Scan

func (m *MockPGXRows) Scan(dest ...interface{}) error

func (*MockPGXRows) Values

func (m *MockPGXRows) Values() ([]interface{}, error)

type PGXClient

type PGXClient interface {
	GetMaster(ctx context.Context) (PGXPool, error)
	GetSlave(ctx context.Context) (PGXPool, error)
}

type PGXPool

type PGXPool interface {
	QueryRow(ctx context.Context, sql string, args ...any) pgx.Row
}

Directories

Path Synopsis
ecxo

Jump to

Keyboard shortcuts

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