Documentation
¶
Index ¶
- func NewAPI(client *HttpClient, logger Log) *api
- func ToString(o interface{}) string
- type Error
- type HTTPError
- type HttpClient
- func (c *HttpClient) Delete(ctx context.Context, name, path string, responseBody interface{}) error
- func (c *HttpClient) Get(ctx context.Context, name, path string, responseBody interface{}) error
- func (c *HttpClient) GetWithQuery(ctx context.Context, name, path string, query url.Values, ...) error
- func (c *HttpClient) Post(ctx context.Context, name, path string, requestBody interface{}, ...) error
- func (c *HttpClient) Put(ctx context.Context, name, path string, requestBody interface{}, ...) error
- type Log
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAPI ¶
func NewAPI(client *HttpClient, logger Log) *api
Types ¶
type Error ¶
type Error struct { Type *string `json:"type,omitempty"` Description *string `json:"description,omitempty"` Status *string `json:"status,omitempty"` }
func (*Error) StatusCode ¶
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
func NewHttpClient ¶
func NewHttpClient(client *http.Client, baseUrl string) (*HttpClient, error)
func (*HttpClient) Delete ¶
func (c *HttpClient) Delete(ctx context.Context, name, path string, responseBody interface{}) error
func (*HttpClient) Get ¶
func (c *HttpClient) Get(ctx context.Context, name, path string, responseBody interface{}) error
func (*HttpClient) GetWithQuery ¶
Click to show internal directories.
Click to hide internal directories.