Documentation ¶
Index ¶
- func HTTPBodyFragment(body map[string]interface{}, key string, val interface{})
- func HTTPFetch(model interface{}, opts ...func(*httpFetchConfigs)) error
- func HTTPNewRequest(method, url string, encoder Encoder) (*http.Request, error)
- func HTTPQueryEncodeBool(req *http.Request, key string, val *bool)
- func HTTPQueryEncodeInt(req *http.Request, key string, val *int)
- func HTTPQueryEncodeInt32(req *http.Request, key string, val *int32)
- func HTTPQueryEncodeString(req *http.Request, key string, val *string)
- func HTTPQueryEncodeStringer(req *http.Request, key string, val stringer)
- func HTTPQueryEncodeStrings(req *http.Request, key string, val []string)
- func HTTPQueryEncodeTime(req *http.Request, key string, val *time.Time)
- func HTTPQueryEncodeUint8(req *http.Request, key string, val *uint8)
- func HTTPWithCallback(clbk func(uint8, http.Response) error) func(*httpFetchConfigs)
- func HTTPWithClient(client http.Client) func(*httpFetchConfigs)
- func HTTPWithEncoder(enc Encoder) func(*httpFetchConfigs)
- func HTTPWithEndpoint(ep endpoint) func(*httpFetchConfigs)
- func HTTPWithParams(params map[string]string) func(*httpFetchConfigs)
- func HTTPWithRatelimiter(rl *rate.Limiter) func(*httpFetchConfigs)
- func HTTPWithRequest(req *http.Request) func(*httpFetchConfigs)
- type Client
- type Encoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPBodyFragment ¶
HTTPBodyFragment will add a new fragment to the HTTP request body.
func HTTPFetch ¶
func HTTPFetch(model interface{}, opts ...func(*httpFetchConfigs)) error
HTTPFetch will make an HTTP request given a http.Client and a partially formatted http.Request, it will then try to edecode the model.
func HTTPNewRequest ¶
HTTPNewRequest will return a new request. If the options are set, this function will encode a body if possible.
func HTTPQueryEncodeBool ¶
HTTPQueryEncodeBool will convert a bool pointer into a string and then add it to the query parameters of an HTTP request's URL.
func HTTPQueryEncodeInt ¶
HTTPQueryEncodeInt will convert an Int pointer into a string and then add it to the query parameters of an HTTP request's URL.
func HTTPQueryEncodeInt32 ¶
HTTPQueryEncodeInt32 will convert an Int32 pointer into a string and then add it to the query parameters of an HTTP request's URL.
func HTTPQueryEncodeString ¶
HTTPQueryEncodeString will convert an String pointer into a string and then add it to the query parameters of an HTTP request's URL.
func HTTPQueryEncodeStringer ¶
HTTPQueryEncodeStringer will convert a stringer type into a string and then add it to the query parameters of an HTTP request's URL.
func HTTPQueryEncodeStrings ¶
HTTPQueryEncodeStringSlice will convert a slice of strings into a string and then add it to the query parameters of an HTTP request's URL.
func HTTPQueryEncodeTime ¶
HTTPQueryEncodeTime will convert a time.Time type into a string and then add it to the query parameters of an HTTP request's URL.
func HTTPQueryEncodeUint8 ¶
HTTPQueryEncodeUint8 will convert auint type into a string and then add it to the query parameters of an HTTP request's URL.
func HTTPWithCallback ¶
HTTPWithCallback will set a callback function that takes a uint8 argument and returns an error.
func HTTPWithClient ¶
HTTPWithClient will set the http client on the fetch configurations.
func HTTPWithEncoder ¶
func HTTPWithEncoder(enc Encoder) func(*httpFetchConfigs)
HTTPWithEncoder will set the encoder for the http request body and query params.
func HTTPWithEndpoint ¶
func HTTPWithEndpoint(ep endpoint) func(*httpFetchConfigs)
HTTPWithEndpoint will set the endpoint data for the request on the configurations.
func HTTPWithParams ¶
HTTPWithParams will set the query parameters for the request on the configurations.
func HTTPWithRatelimiter ¶
HTTPWithRatelimiter will set the rate limiting mechanism on the fetch configurations.
func HTTPWithRequest ¶
HTTPWithRequest will set the http request on the fetch configurations.