diptest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueueEmpty

func QueueEmpty(name string) (bool, error)

func String

func String(s string) string

func WaitForEmptyQueue

func WaitForEmptyQueue(name string)

Types

type Env

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

func NewEnv

func NewEnv() *Env

func (*Env) GetRoute

func (e *Env) GetRoute(route string) *Req

func (*Env) GetUID

func (e *Env) GetUID() string

func (*Env) GetURL

func (e *Env) GetURL(u string) *Req

func (*Env) PutRoute

func (e *Env) PutRoute(route string) *Req

func (*Env) SetEmail

func (e *Env) SetEmail(m string) *Env

func (*Env) SetUID

func (e *Env) SetUID(uid string) *Env

type Req

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

func (*Req) Body

func (r *Req) Body(i interface{}) *Req

func (*Req) Failure

func (r *Req) Failure() *Result

func (*Req) QueryParams

func (r *Req) QueryParams(queryParams url.Values) *Req

func (*Req) RouteParams

func (r *Req) RouteParams(routeParams ...string) *Req

func (*Req) Status

func (r *Req) Status(i int) *Result

func (*Req) Success

func (r *Req) Success() *Result

type Result

type Result struct {
	Env       *Env
	URL       *url.URL
	Body      interface{}
	BodyBytes []byte
	Status    int
}

func (*Result) AssertBoolEq

func (r *Result) AssertBoolEq(val bool, path ...string) *Result

func (*Result) AssertEmpty

func (r *Result) AssertEmpty(path ...string) *Result

func (*Result) AssertEq

func (r *Result) AssertEq(val interface{}, path ...string) *Result

func (*Result) AssertLen

func (r *Result) AssertLen(l int, path ...string) *Result

func (*Result) AssertNil

func (r *Result) AssertNil(path ...string) *Result

func (*Result) AssertNotFind

func (r *Result) AssertNotFind(subMatch interface{}, paths ...[]string) *Result

func (*Result) AssertNotRel

func (r *Result) AssertNotRel(rel string, path ...string) *Result

func (*Result) AssertRel

func (r *Result) AssertRel(rel string, path ...string) *Result

func (*Result) Find

func (r *Result) Find(subMatch interface{}, paths ...[]string) *Result

func (*Result) Follow

func (r *Result) Follow(rel string, path ...string) *Req
func (r *Result) FollowLink() *Req

func (*Result) GetValue

func (r *Result) GetValue(path ...string) interface{}

type Transport

type Transport interface {
	Request(method string, url string, body io.Reader) (*http.Request, error)
	Execute(req *http.Request) (status int, header http.Header, body io.Reader, err error)
}
var (
	T Transport
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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