Versions in this module Expand all Collapse all v1 v1.1.2 Apr 2, 2020 Changes in this version + func NewJar() http.CookieJar + type Array struct + func NewArray(reporter Reporter, value []interface{}) *Array + func (a *Array) Contains(values ...interface{}) *Array + func (a *Array) ContainsOnly(values ...interface{}) *Array + func (a *Array) Element(index int) *Value + func (a *Array) Elements(values ...interface{}) *Array + func (a *Array) Empty() *Array + func (a *Array) Equal(value interface{}) *Array + func (a *Array) First() *Value + func (a *Array) Iter() []Value + func (a *Array) Last() *Value + func (a *Array) Length() *Number + func (a *Array) NotContains(values ...interface{}) *Array + func (a *Array) NotEmpty() *Array + func (a *Array) NotEqual(value interface{}) *Array + func (a *Array) Path(path string) *Value + func (a *Array) Raw() []interface{} + func (a *Array) Schema(schema interface{}) *Array + type AssertReporter struct + func NewAssertReporter(t assert.TestingT) *AssertReporter + func (r *AssertReporter) Errorf(message string, args ...interface{}) + type Binder struct + Handler http.Handler + TLS *tls.ConnectionState + func NewBinder(handler http.Handler) Binder + func (binder Binder) RoundTrip(req *http.Request) (*http.Response, error) + type Boolean struct + func NewBoolean(reporter Reporter, value bool) *Boolean + func (b *Boolean) Equal(value bool) *Boolean + func (b *Boolean) False() *Boolean + func (b *Boolean) NotEqual(value bool) *Boolean + func (b *Boolean) Path(path string) *Value + func (b *Boolean) Raw() bool + func (b *Boolean) Schema(schema interface{}) *Boolean + func (b *Boolean) True() *Boolean + type Client interface + Do func(*http.Request) (*http.Response, error) + type CompactPrinter struct + func NewCompactPrinter(logger Logger) CompactPrinter + func (CompactPrinter) Response(*http.Response, time.Duration) + func (p CompactPrinter) Request(req *http.Request) + type Config struct + BaseURL string + Client Client + Printers []Printer + Reporter Reporter + RequestFactory RequestFactory + type Cookie struct + func NewCookie(reporter Reporter, value *http.Cookie) *Cookie + func (c *Cookie) Domain() *String + func (c *Cookie) Expires() *DateTime + func (c *Cookie) MaxAge() *Duration + func (c *Cookie) Name() *String + func (c *Cookie) Path() *String + func (c *Cookie) Raw() *http.Cookie + func (c *Cookie) Value() *String + type CurlPrinter struct + func NewCurlPrinter(logger Logger) CurlPrinter + func (CurlPrinter) Response(*http.Response, time.Duration) + func (p CurlPrinter) Request(req *http.Request) + type DateTime struct + func NewDateTime(reporter Reporter, value time.Time) *DateTime + func (dt *DateTime) Equal(value time.Time) *DateTime + func (dt *DateTime) Ge(value time.Time) *DateTime + func (dt *DateTime) Gt(value time.Time) *DateTime + func (dt *DateTime) InRange(min, max time.Time) *DateTime + func (dt *DateTime) Le(value time.Time) *DateTime + func (dt *DateTime) Lt(value time.Time) *DateTime + func (dt *DateTime) NotEqual(value time.Time) *DateTime + func (dt *DateTime) Raw() time.Time + type DebugPrinter struct + func NewDebugPrinter(logger Logger, body bool) DebugPrinter + func (p DebugPrinter) Request(req *http.Request) + func (p DebugPrinter) Response(resp *http.Response, duration time.Duration) + type DefaultRequestFactory struct + func (DefaultRequestFactory) NewRequest(method, urlStr string, body io.Reader) (*http.Request, error) + type Duration struct + func NewDuration(reporter Reporter, value time.Duration) *Duration + func (d *Duration) Equal(value time.Duration) *Duration + func (d *Duration) Ge(value time.Duration) *Duration + func (d *Duration) Gt(value time.Duration) *Duration + func (d *Duration) InRange(min, max time.Duration) *Duration + func (d *Duration) IsSet() *Duration + func (d *Duration) Le(value time.Duration) *Duration + func (d *Duration) Lt(value time.Duration) *Duration + func (d *Duration) NotEqual(value time.Duration) *Duration + func (d *Duration) NotSet() *Duration + func (d *Duration) Raw() time.Duration + type Expect struct + func New(t LoggerReporter, baseURL string) *Expect + func WithConfig(config Config) *Expect + func (e *Expect) Array(value []interface{}) *Array + func (e *Expect) Boolean(value bool) *Boolean + func (e *Expect) Builder(builder func(*Request)) *Expect + func (e *Expect) DELETE(path string, pathargs ...interface{}) *Request + func (e *Expect) GET(path string, pathargs ...interface{}) *Request + func (e *Expect) HEAD(path string, pathargs ...interface{}) *Request + func (e *Expect) Number(value float64) *Number + func (e *Expect) OPTIONS(path string, pathargs ...interface{}) *Request + func (e *Expect) Object(value map[string]interface{}) *Object + func (e *Expect) PATCH(path string, pathargs ...interface{}) *Request + func (e *Expect) POST(path string, pathargs ...interface{}) *Request + func (e *Expect) PUT(path string, pathargs ...interface{}) *Request + func (e *Expect) Request(method, path string, pathargs ...interface{}) *Request + func (e *Expect) String(value string) *String + func (e *Expect) Value(value interface{}) *Value + type FastBinder struct + Handler fasthttp.RequestHandler + TLS *tls.ConnectionState + func NewFastBinder(handler fasthttp.RequestHandler) FastBinder + func (binder FastBinder) RoundTrip(stdreq *http.Request) (*http.Response, error) + type Logger interface + Logf func(fmt string, args ...interface{}) + type LoggerReporter interface + type Match struct + func NewMatch(reporter Reporter, submatches []string, names []string) *Match + func (m *Match) Empty() *Match + func (m *Match) Index(index int) *String + func (m *Match) Length() *Number + func (m *Match) Name(name string) *String + func (m *Match) NotEmpty() *Match + func (m *Match) NotValues(values ...string) *Match + func (m *Match) Raw() []string + func (m *Match) Values(values ...string) *Match + type Number struct + func NewNumber(reporter Reporter, value float64) *Number + func (n *Number) Equal(value interface{}) *Number + func (n *Number) EqualDelta(value, delta float64) *Number + func (n *Number) Ge(value interface{}) *Number + func (n *Number) Gt(value interface{}) *Number + func (n *Number) InRange(min, max interface{}) *Number + func (n *Number) Le(value interface{}) *Number + func (n *Number) Lt(value interface{}) *Number + func (n *Number) NotEqual(value interface{}) *Number + func (n *Number) NotEqualDelta(value, delta float64) *Number + func (n *Number) Path(path string) *Value + func (n *Number) Raw() float64 + func (n *Number) Schema(schema interface{}) *Number + type Object struct + func NewObject(reporter Reporter, value map[string]interface{}) *Object + func (o *Object) ContainsKey(key string) *Object + func (o *Object) ContainsMap(value interface{}) *Object + func (o *Object) Empty() *Object + func (o *Object) Equal(value interface{}) *Object + func (o *Object) Keys() *Array + func (o *Object) NotContainsKey(key string) *Object + func (o *Object) NotContainsMap(value interface{}) *Object + func (o *Object) NotEmpty() *Object + func (o *Object) NotEqual(v interface{}) *Object + func (o *Object) Path(path string) *Value + func (o *Object) Raw() map[string]interface{} + func (o *Object) Schema(schema interface{}) *Object + func (o *Object) Value(key string) *Value + func (o *Object) ValueEqual(key string, value interface{}) *Object + func (o *Object) ValueNotEqual(key string, value interface{}) *Object + func (o *Object) Values() *Array + type Printer interface + Request func(*http.Request) + Response func(*http.Response, time.Duration) + type Reporter interface + Errorf func(message string, args ...interface{}) + type Request struct + func NewRequest(config Config, method, path string, pathargs ...interface{}) *Request + func (r *Request) Expect() *Response + func (r *Request) WithBasicAuth(username, password string) *Request + func (r *Request) WithBytes(b []byte) *Request + func (r *Request) WithChunked(reader io.Reader) *Request + func (r *Request) WithClient(client Client) *Request + func (r *Request) WithCookie(k, v string) *Request + func (r *Request) WithCookies(cookies map[string]string) *Request + func (r *Request) WithFile(key, path string, reader ...io.Reader) *Request + func (r *Request) WithFileBytes(key, path string, data []byte) *Request + func (r *Request) WithForm(object interface{}) *Request + func (r *Request) WithFormField(key string, value interface{}) *Request + func (r *Request) WithHandler(handler http.Handler) *Request + func (r *Request) WithHeader(k, v string) *Request + func (r *Request) WithHeaders(headers map[string]string) *Request + func (r *Request) WithJSON(object interface{}) *Request + func (r *Request) WithMultipart() *Request + func (r *Request) WithPath(key string, value interface{}) *Request + func (r *Request) WithPathObject(object interface{}) *Request + func (r *Request) WithProto(proto string) *Request + func (r *Request) WithQuery(key string, value interface{}) *Request + func (r *Request) WithQueryObject(object interface{}) *Request + func (r *Request) WithQueryString(query string) *Request + func (r *Request) WithText(s string) *Request + func (r *Request) WithURL(urlStr string) *Request + type RequestFactory interface + NewRequest func(method, urlStr string, body io.Reader) (*http.Request, error) + type RequireReporter struct + func NewRequireReporter(t require.TestingT) *RequireReporter + func (r *RequireReporter) Errorf(message string, args ...interface{}) + type Response struct + func NewResponse(reporter Reporter, response *http.Response, rtt ...time.Duration) *Response + func (r *Response) Body() *String + func (r *Response) ContentEncoding(encoding ...string) *Response + func (r *Response) ContentType(mediaType string, charset ...string) *Response + func (r *Response) Cookie(name string) *Cookie + func (r *Response) Cookies() *Array + func (r *Response) Duration() *Number + func (r *Response) Form() *Object + func (r *Response) Header(header string) *String + func (r *Response) Headers() *Object + func (r *Response) JSON() *Value + func (r *Response) JSONP(callback string) *Value + func (r *Response) NoContent() *Response + func (r *Response) Raw() *http.Response + func (r *Response) RoundTripTime() *Duration + func (r *Response) Status(status int) *Response + func (r *Response) StatusRange(rn StatusRange) *Response + func (r *Response) Text() *String + func (r *Response) TransferEncoding(encoding ...string) *Response + type StatusRange int + const Status1xx + const Status2xx + const Status3xx + const Status4xx + const Status5xx + type String struct + func NewString(reporter Reporter, value string) *String + func (s *String) Contains(value string) *String + func (s *String) ContainsFold(value string) *String + func (s *String) DateTime(layout ...string) *DateTime + func (s *String) Empty() *String + func (s *String) Equal(value string) *String + func (s *String) EqualFold(value string) *String + func (s *String) Length() *Number + func (s *String) Match(re string) *Match + func (s *String) MatchAll(re string) []Match + func (s *String) NotContains(value string) *String + func (s *String) NotContainsFold(value string) *String + func (s *String) NotEmpty() *String + func (s *String) NotEqual(value string) *String + func (s *String) NotEqualFold(value string) *String + func (s *String) NotMatch(re string) *String + func (s *String) Path(path string) *Value + func (s *String) Raw() string + func (s *String) Schema(schema interface{}) *String + type Value struct + func NewValue(reporter Reporter, value interface{}) *Value + func (v *Value) Array() *Array + func (v *Value) Boolean() *Boolean + func (v *Value) Equal(value interface{}) *Value + func (v *Value) NotEqual(value interface{}) *Value + func (v *Value) NotNull() *Value + func (v *Value) Null() *Value + func (v *Value) Number() *Number + func (v *Value) Object() *Object + func (v *Value) Path(path string) *Value + func (v *Value) Raw() interface{} + func (v *Value) Schema(schema interface{}) *Value + func (v *Value) String() *String Incompatible versions in this module v2.0.0+incompatible May 23, 2019