Documentation
¶
Index ¶
- type APIError
- type Client
- func (c *Client) CreateItem(ctx context.Context, idempotencyKey string, body CreateItemBody) (*Item, error)
- func (c *Client) DeleteItem(ctx context.Context, id int64, idempotencyKey string, ifMatch string) error
- func (c *Client) GetItem(ctx context.Context, id int64) (*Item, error)
- func (c *Client) Healthz(ctx context.Context) (*Health, error)
- func (c *Client) ListItems(ctx context.Context, cursor *string, limit *int64) (*ItemList, error)
- type CreateItemBody
- type Health
- type Item
- type ItemList
- type Problem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
APIError is returned for non-2xx responses. It captures the HTTP status, the raw response body, and any decoded JSON payload.
type Client ¶
type Client struct {
// BaseURL is prepended to every request path (no trailing slash).
BaseURL string
// HTTP is the underlying HTTP client. nil falls back to http.DefaultClient.
HTTP *http.Client
// DefaultHeaders are merged onto every request before per-call headers.
DefaultHeaders http.Header
}
Client is the typed HTTP client for the generated API.
func (*Client) CreateItem ¶
func (c *Client) CreateItem(ctx context.Context, idempotencyKey string, body CreateItemBody) (*Item, error)
Create an item
func (*Client) DeleteItem ¶
func (c *Client) DeleteItem(ctx context.Context, id int64, idempotencyKey string, ifMatch string) error
Delete an item
type CreateItemBody ¶
type CreateItemBody struct {
Name string `json:"name"`
}
Click to show internal directories.
Click to hide internal directories.