Documentation
¶
Overview ¶
Package catalog demonstrates a small REST integration built on httpclient. Copy the pattern into internal/modules/<module>/integrations/<provider> as needed. This is an example API, not a client for a real catalog provider.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct{ *httpclient.Client }
Client embeds the framework client so Do, Build and Configure need no wrappers. Construct it with New and reuse it across requests.
type CreateProductBody ¶
type CreateProductBody struct {
Name string `json:"name"`
}
type CreateProductRequest ¶
type CreateProductRequest struct {
httpclient.Request `method:"POST" path:"products"`
Body CreateProductBody `body:"json"`
}
CreateProductRequest sends only Body as JSON.
type GetProductRequest ¶
type GetProductRequest struct {
httpclient.Request `method:"GET" path:"products/{id}"`
ID string `path:"id"`
Fields []string `query:"fields,omitempty"`
}
GetProductRequest fetches a product, optionally selecting response fields.
type ProductResponse ¶
ProductResponse is the provider's JSON payload; status and headers remain on httpclient.Response. Both the get and create operations return this shape.