testutil

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenWord

func GenWord() string

GenWord generates a random word of arbitrary length

func GenWordn

func GenWordn(n int) string

GenWordWithLen generates a random world of N length

Types

type FakeDB

type FakeDB struct{}

func (*FakeDB) Begin

func (d *FakeDB) Begin() (*sql.Tx, error)

func (*FakeDB) Close

func (d *FakeDB) Close() error

func (*FakeDB) Driver

func (d *FakeDB) Driver() driver.Driver

func (*FakeDB) Exec

func (d *FakeDB) Exec(string, ...interface{}) (sql.Result, error)

func (*FakeDB) Ping

func (d *FakeDB) Ping() error

func (*FakeDB) Prepare

func (d *FakeDB) Prepare(string) (*sql.Stmt, error)

func (*FakeDB) Query

func (d *FakeDB) Query(string, ...interface{}) (*sql.Rows, error)

func (*FakeDB) QueryRow

func (d *FakeDB) QueryRow(string, ...interface{}) *sql.Row

func (*FakeDB) SetMaxIdleConns

func (d *FakeDB) SetMaxIdleConns(int)

Jump to

Keyboard shortcuts

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