Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseClient ¶
type BaseClient struct { BaseURL *url.URL Client *http.Client // Reuse a single struct instead of allocating one for each service on the heap. Common Service }
func (*BaseClient) Do ¶
func (c *BaseClient) Do(ctx context.Context, req *http.Request, v interface{}) (*http.Response, error)
Do sends an API request and returns the API response
func (*BaseClient) NewRequest ¶
func (c *BaseClient) NewRequest(method, urlStr string, opt interface{}, body interface{}) (*http.Request, error)
type Service ¶
type Service struct {
Client *BaseClient
}
Click to show internal directories.
Click to hide internal directories.