pgmock

package
v3.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 3, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	Serve(backend *pgproto3.Backend) error
}

type Script

type Script struct {
	Steps []Step
}

func (*Script) Run

func (s *Script) Run(backend *pgproto3.Backend) error

func (*Script) Serve

func (s *Script) Serve(backend *pgproto3.Backend) error

func (*Script) Step

func (s *Script) Step(backend *pgproto3.Backend) error

type Server

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

func NewServer

func NewServer(controller Controller) (*Server, error)

func (*Server) Addr

func (s *Server) Addr() net.Addr

func (*Server) Close

func (s *Server) Close() error

func (*Server) ServeOne

func (s *Server) ServeOne() error

type Step

type Step interface {
	Step(*pgproto3.Backend) error
}

func AcceptUnauthenticatedConnRequestSteps

func AcceptUnauthenticatedConnRequestSteps() []Step

func ExpectAnyMessage

func ExpectAnyMessage(want pgproto3.FrontendMessage) Step

func ExpectMessage

func ExpectMessage(want pgproto3.FrontendMessage) Step

func PgxInitSteps

func PgxInitSteps() []Step

func SendMessage

func SendMessage(msg pgproto3.BackendMessage) Step

func WaitForClose

func WaitForClose() Step

Jump to

Keyboard shortcuts

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