pgx: github.com/jackc/pgx/pgmock Index | Files

package pgmock

import "github.com/jackc/pgx/pgmock"

Index

Package Files

pgmock.go

type Controller Uses

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

type Script Uses

type Script struct {
    Steps []Step
}

func (*Script) Run Uses

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

func (*Script) Serve Uses

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

func (*Script) Step Uses

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

type Server Uses

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

func NewServer Uses

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

func (*Server) Addr Uses

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

func (*Server) Close Uses

func (s *Server) Close() error

func (*Server) ServeOne Uses

func (s *Server) ServeOne() error

type Step Uses

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

func AcceptUnauthenticatedConnRequestSteps Uses

func AcceptUnauthenticatedConnRequestSteps() []Step

func ExpectAnyMessage Uses

func ExpectAnyMessage(want pgproto3.FrontendMessage) Step

func ExpectMessage Uses

func ExpectMessage(want pgproto3.FrontendMessage) Step

func PgxInitSteps Uses

func PgxInitSteps() []Step

func SendMessage Uses

func SendMessage(msg pgproto3.BackendMessage) Step

func WaitForClose Uses

func WaitForClose() Step

Package pgmock imports 6 packages (graph). Updated 2019-08-23. Refresh now. Tools for package owners.