Documentation
¶
Index ¶
- func NewBadStatusCodeError(body []byte, resp *http.Response, expectedStatusCode int, operationID string) error
- func NewHTTPError(body []byte, resp *http.Response, message string, wrapped error) error
- type Client
- type ClientInterface
- type ClientOption
- type HTTPRequestError
- type HttpRequestDoer
- type MiscHealthResponse
- type MiscVersionResponse
- type RequestEditorFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBadStatusCodeError ¶
Types ¶
type Client ¶
type Client struct {
Endpoint *url.URL
Client HttpRequestDoer
RequestEditors []RequestEditorFn
}
func NewClientWithURL ¶
func NewClientWithURL(endpoint *url.URL, opts ...ClientOption) (*Client, error)
func (*Client) MiscHealth ¶
func (c *Client) MiscHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*MiscHealthResponse, error)
func (*Client) MiscVersion ¶
func (c *Client) MiscVersion(ctx context.Context, reqEditors ...RequestEditorFn) (*MiscVersionResponse, error)
type ClientInterface ¶
type ClientInterface interface {
MiscVersion(context.Context) (*MiscVersionResponse, error)
MiscHealth(context.Context) (*MiscHealthResponse, error)
}
type ClientOption ¶
func WithHTTPClient ¶
func WithHTTPClient(client HttpRequestDoer) ClientOption
func WithRequestEditor ¶
func WithRequestEditor(editor RequestEditorFn) ClientOption
func WithUserAgent ¶
func WithUserAgent(userAgent string) ClientOption
type HTTPRequestError ¶
type HTTPRequestError struct {
Body []byte
HTTPResponse *http.Response
Message string
Wrapped error
}
func (*HTTPRequestError) Error ¶
func (e *HTTPRequestError) Error() string
func (*HTTPRequestError) Unwrap ¶
func (e *HTTPRequestError) Unwrap() error
type MiscHealthResponse ¶
type MiscHealthResponse struct {
Status string `json:"status"`
}
type MiscVersionResponse ¶
Click to show internal directories.
Click to hide internal directories.