Documentation ¶
Overview ¶
Package client is a low-level implementation of a mailgun REST client.
This package is generally not intended for package consumers.
Index ¶
- Variables
- type Caller
- type Error
- type Pager
- type Request
- func (r *Request) AddForm(k, v string) *Request
- func (r *Request) AddHeader(k, v string) *Request
- func (r *Request) AddQuery(k, v string) *Request
- func (r *Request) Decode(i interface{}) error
- func (r *Request) Do() (*http.Response, error)
- func (r *Request) Err() error
- func (r *Request) Form() url.Values
- func (r *Request) Header() http.Header
- func (r *Request) Payload(reader io.Reader) *Request
- func (r *Request) Query() url.Values
- func (r *Request) SetForm(k, v string) *Request
- func (r *Request) SetHeader(k, v string) *Request
- func (r *Request) SetQuery(k, v string) *Request
- type Requester
- func (r *Requester) Delete(uri ...string) *Request
- func (r *Requester) Domain() string
- func (r *Requester) Get(uri ...string) *Request
- func (r *Requester) HTTPClient() *http.Client
- func (r *Requester) Key() string
- func (r *Requester) Post(uri ...string) *Request
- func (r *Requester) Put(uri ...string) *Request
Constants ¶
This section is empty.
Variables ¶
View Source
var DEBUG = false
DEBUG enables debugging - requests logged, response copied to stderr.
Functions ¶
This section is empty.
Types ¶
type Caller ¶
type Caller interface { HTTPClient() *http.Client Get(uri ...string) *Request Post(uri ...string) *Request Put(uri ...string) *Request Delete(uri ...string) *Request Domain() string Key() string }
Caller is the interface to a Requester.
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request is a client request.
Click to show internal directories.
Click to hide internal directories.