Documentation
¶
Index ¶
- func JSONEncode(s interface{}) []byte
- type Client
- func (c Client) Delete(url URL, handler echo.HandlerFunc, data []byte, headers DictString) *httptest.ResponseRecorder
- func (c Client) Get(url URL, handler echo.HandlerFunc, data []byte, headers DictString) *httptest.ResponseRecorder
- func (c Client) Patch(url URL, handler echo.HandlerFunc, data []byte, headers DictString) *httptest.ResponseRecorder
- func (c Client) Post(url URL, handler echo.HandlerFunc, data []byte, headers DictString) *httptest.ResponseRecorder
- func (c Client) Put(url URL, handler echo.HandlerFunc, data []byte, headers DictString) *httptest.ResponseRecorder
- func (c Client) Request(method string, url URL, handler echo.HandlerFunc, data []byte, ...) *httptest.ResponseRecorder
- func (c *Client) SetHeaders(headers DictString)
- type Dict
- type DictString
- type MultiPartForm
- type URL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONEncode ¶
func JSONEncode(s interface{}) []byte
JSONEncode transforms interface into a []byte
Types ¶
type Client ¶
type Client struct { E *echo.Echo H DictString }
Client represents the client instance
func (Client) Delete ¶
func (c Client) Delete(url URL, handler echo.HandlerFunc, data []byte, headers DictString) *httptest.ResponseRecorder
Delete represents a Delete Request
func (Client) Get ¶
func (c Client) Get(url URL, handler echo.HandlerFunc, data []byte, headers DictString) *httptest.ResponseRecorder
Get represents a Get Request
func (Client) Patch ¶
func (c Client) Patch(url URL, handler echo.HandlerFunc, data []byte, headers DictString) *httptest.ResponseRecorder
Patch represents a Patch Request
func (Client) Post ¶
func (c Client) Post(url URL, handler echo.HandlerFunc, data []byte, headers DictString) *httptest.ResponseRecorder
Post represents a Post Request
func (Client) Put ¶
func (c Client) Put(url URL, handler echo.HandlerFunc, data []byte, headers DictString) *httptest.ResponseRecorder
Put represents a Put Request
func (Client) Request ¶
func (c Client) Request(method string, url URL, handler echo.HandlerFunc, data []byte, headers DictString) *httptest.ResponseRecorder
Request is the method performing the request
func (*Client) SetHeaders ¶
func (c *Client) SetHeaders(headers DictString)
SetHeaders allow you define some headers
type Dict ¶
type Dict map[string]interface{}
Dict represents a dict object
func JSONDecode ¶
JSONDecode returns an interface from a json formatted http.ResponseRecorder.Body
type DictString ¶
DictString represents a dict of string key and values
type MultiPartForm ¶
MultiPartForm is the struct returned by FormData func
func FormData ¶
func FormData(fields DictString, files DictString) (MultiPartForm, error)
FormData helps create a form data payload
type URL ¶
URL is a type representing an URL with : * Path * Params * Values
func NewURL ¶
func NewURL(p string, uv DictString, qs DictString) (u URL)
NewURL is a function returning an URL struct p as Path uv as Url Values ( e.g /:username/ ) qs as Url Query String ( e.g /?debug=true)