testing

package
v0.0.0-...-96c2995 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2018 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotImplemented = errors.New("not implemented")
	ErrMockClosed     = errors.New("mock connection closed")
)

Functions

This section is empty.

Types

type MockConnection

type MockConnection struct {
	ExecReq    chan *QueryRequest
	ExecResp   chan *SQLResultErrorPair
	GetReq     chan *QueryRequest
	GetResp    chan error
	SelectReq  chan *QueryRequest
	SelectResp chan error
}

func (*MockConnection) Exec

func (m *MockConnection) Exec(query string, args ...interface{}) (sql.Result, error)

func (*MockConnection) Get

func (m *MockConnection) Get(dest interface{}, query string, args ...interface{}) error

func (*MockConnection) Select

func (m *MockConnection) Select(dest interface{}, query string, args ...interface{}) error

type QueryRequest

type QueryRequest struct {
	Dest  interface{}
	Query string
	Args  []interface{}
}

type SQLResultErrorPair

type SQLResultErrorPair struct {
	Result sql.Result
	Error  error
}

Jump to

Keyboard shortcuts

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