mocks

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Querier

type Querier struct {
	QueryRowFn func(ctx context.Context, query string, args ...any) postgres.Row
	QueryFn    func(ctx context.Context, query string, args ...any) (postgres.Rows, error)
	ExecFn     func(context.Context, string, ...any) (postgres.CommandTag, error)
	CloseFn    func(context.Context) error
}

func (*Querier) Close

func (m *Querier) Close(ctx context.Context) error

func (*Querier) Exec

func (m *Querier) Exec(ctx context.Context, query string, args ...any) (postgres.CommandTag, error)

func (*Querier) Query

func (m *Querier) Query(ctx context.Context, query string, args ...any) (postgres.Rows, error)

func (*Querier) QueryRow

func (m *Querier) QueryRow(ctx context.Context, query string, args ...any) postgres.Row

type ReplicationConn

type ReplicationConn struct {
	IdentifySystemFn          func(ctx context.Context) (postgres.IdentifySystemResult, error)
	StartReplicationFn        func(ctx context.Context, cfg postgres.ReplicationConfig) error
	SendStandbyStatusUpdateFn func(ctx context.Context, lsn uint64) error
	ReceiveMessageFn          func(ctx context.Context) (*postgres.ReplicationMessage, error)
	CloseFn                   func(ctx context.Context) error
}

func (*ReplicationConn) Close

func (m *ReplicationConn) Close(ctx context.Context) error

func (*ReplicationConn) IdentifySystem

func (*ReplicationConn) ReceiveMessage

func (m *ReplicationConn) ReceiveMessage(ctx context.Context) (*postgres.ReplicationMessage, error)

func (*ReplicationConn) SendStandbyStatusUpdate

func (m *ReplicationConn) SendStandbyStatusUpdate(ctx context.Context, lsn uint64) error

func (*ReplicationConn) StartReplication

func (m *ReplicationConn) StartReplication(ctx context.Context, cfg postgres.ReplicationConfig) error

Jump to

Keyboard shortcuts

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