Documentation
¶
Index ¶
- func ExitCodeForError(err error) int
- type APIError
- type Client
- func (c *Client) Delete(path string, target interface{}) error
- func (c *Client) Get(path string, target interface{}) error
- func (c *Client) Post(path string, body io.Reader, target interface{}) error
- func (c *Client) PostRaw(path string, body io.Reader) ([]byte, int, error)
- func (c *Client) Put(path string, body io.Reader, target interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExitCodeForError ¶
ExitCodeForError maps an API error to a CLI exit code.
Types ¶
type Client ¶
type Client struct {
BaseURL string
APIKey string
HeaderName string // Header name for API key (e.g. "Authorization", "X-API-KEY")
HTTPClient *http.Client
}
Click to show internal directories.
Click to hide internal directories.