bounce

package module
v0.0.0-...-2604e9e Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

README

Bounce

Fun little api testing tool in the making.

Describe in yaml what you want to hit and the responses you expect back.

Work in progress

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type URL

type URL struct {
	ArgMap     map[string]string
	HeadersMap map[string]string
	PayloadMap map[string]string
	// contains filtered or unexported fields
}

func DefaultURL

func DefaultURL() *URL

func (*URL) Args

func (u *URL) Args(args map[string]string) *URL

Args sets the query string arguments for a request

func (*URL) ConsumeAPI

func (u *URL) ConsumeAPI(dest interface{}) error

ConsumeAPI is the default method for firing the HTTP request

func (*URL) Domain

func (u *URL) Domain(d string) *URL

Domain adds the domain to the request

func (*URL) Full

func (u *URL) Full() (string, string, io.Reader)

Full drops out the appropriate pars for you to run http.NewRequest

func (*URL) Method

func (u *URL) Method(m string) *URL

Method sets the HTTP method

func (*URL) Pagination

func (u *URL) Pagination(page interface{}, per interface{}) *URL

Pagination sets the pagination variables

func (*URL) Path

func (u *URL) Path(pp ...string) *URL

Path accepts a number of strings and adjoins them by "/" in the order they are given and uses them as the path of a the request URL

func (*URL) Payload

func (u *URL) Payload(pl map[string]string) *URL

Payload sets the json payload for the API

func (*URL) Secure

func (u *URL) Secure() *URL

Secure changes the http method to https

func (*URL) SetPaginationArgNames

func (u *URL) SetPaginationArgNames(pageNo string, numberPerPage string) *URL

SetPaginationArgNames changes the pagination name of the request

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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