Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Get(endpoint string) (*http.Request, error) GetWith(endpoint string, params interface{}) (*http.Request, error) Post(endpoint string) (*http.Request, error) PostWith(endpoint string, params interface{}) (*http.Request, error) Put(endpoint string) (*http.Request, error) PutWith(endpoint string, params interface{}) (*http.Request, error) Patch(endpoint string) (*http.Request, error) PatchWith(endpoint string, params interface{}) (*http.Request, error) Delete(endpoint string) (*http.Request, error) DeleteWith(endpoint string, params interface{}) (*http.Request, error) Do(request *http.Request) (Response, error) }
Client is a interface who calls the methods
type Response ¶
type Response interface { Get() ResponseStruct To(value interface{}) }
Response is an interface of ResponseStruct struct
type ResponseStruct ¶
type ResponseStruct struct { Status string StatusCode int Header http.Header ContentLength int64 Body []byte }
ResponseStruct is a struct who returns after requests
func (ResponseStruct) Get ¶
func (r ResponseStruct) Get() ResponseStruct
Get func returns ResponseStruct struct of request
func (ResponseStruct) To ¶
func (r ResponseStruct) To(value interface{})
To func returns converts string to struct
Click to show internal directories.
Click to hide internal directories.