Documentation
¶
Index ¶
- type A8client
- func (c *A8client) BuildRequest(method, apiURL string, body io.Reader, headers http.Header) (*http.Request, error)
- func (c *A8client) DELETE(apiURL string, debug bool, headers http.Header, result interface{}) error
- func (c *A8client) Do(req *http.Request, result interface{}) error
- func (c *A8client) GET(apiURL string, debug bool, headers http.Header, result interface{}) error
- func (c *A8client) NewHeader() http.Header
- func (c *A8client) POST(apiURL string, body io.Reader, debug bool, headers http.Header, ...) error
- func (c *A8client) PUT(apiURL string, body io.Reader, debug bool, headers http.Header, ...) error
- func (c *A8client) SetHTTPClient(client *http.Client)
- func (c *A8client) SetToken(token string)
- func (c *A8client) SetURL(baseURL string)
- type Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type A8client ¶
type A8client struct {
// contains filtered or unexported fields
}
A8client .
func (*A8client) BuildRequest ¶
func (c *A8client) BuildRequest(method, apiURL string, body io.Reader, headers http.Header) (*http.Request, error)
BuildRequest builds a http request
func (*A8client) POST ¶
func (c *A8client) POST(apiURL string, body io.Reader, debug bool, headers http.Header, result interface{}) error
POST .
func (*A8client) PUT ¶
func (c *A8client) PUT(apiURL string, body io.Reader, debug bool, headers http.Header, result interface{}) error
PUT .
func (*A8client) SetHTTPClient ¶
SetHTTPClient .
type Client ¶
type Client interface { GET(apiURL string, debug bool, extraHeaders http.Header, result interface{}) error POST(apiURL string, body io.Reader, debug bool, headers http.Header, result interface{}) error PUT(apiURL string, body io.Reader, debug bool, headers http.Header, result interface{}) error DELETE(apiURL string, debug bool, extraHeaders http.Header, result interface{}) error NewHeader() http.Header SetHTTPClient(client *http.Client) SetURL(baseURL string) SetToken(token string) }
Client .
Click to show internal directories.
Click to hide internal directories.