Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodecOnlyNote ¶
CodecOnlyNote is referenced only via DecodeJSON/EncodeJSON in tests.
type CreateUserRequest ¶
type CreateUserRequest struct {
Name string
Email string
OrgID string `path:"org_id"`
Token string `header:"Authorization"`
}
CreateUserRequest exercises default input, path, and header sources.
type CreateUserResponse ¶
type CreateUserResponse struct {
ID string `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
}
CreateUserResponse is a normal JSON response.
type NestedCustomer ¶
NestedCustomer is a nested object in NestedOrderRequest.
type NestedLineItem ¶
NestedLineItem is an element of NestedOrderRequest.Items.
type NestedOrderRequest ¶
type NestedOrderRequest struct {
Customer NestedCustomer `payload:"customer"`
Items []NestedLineItem `payload:"items"`
Labels map[string]string `payload:"labels"`
}
NestedOrderRequest exercises nested struct, slice of structs, and map[string]string.
type PatchWithExtrasRawRequest ¶
type PatchWithExtrasRawRequest struct {
Name string `payload:"name"`
Extra map[string]json.RawMessage `payload:"*"`
}
PatchWithExtrasRawRequest exercises rest as map[string]json.RawMessage.
type PatchWithExtrasRequest ¶
type PatchWithExtrasRequest struct {
Name string `payload:"name"`
Email string `payload:"email"`
Extra map[string]any `payload:"*"`
}
PatchWithExtrasRequest exercises payload:"*" rest map for leftover body keys.
type SearchRequest ¶
type SearchRequest struct {
Keyword string `query:"keyword"`
Page int `query:"page"`
Filter string `payload:"filter"`
}
SearchRequest restricts sources with query/payload tags.
type SearchResponse ¶
type SearchResponse struct {
Keyword string `json:"keyword"`
Page int `json:"page"`
Filter string `json:"filter"`
}
SearchResponse is returned from search.
type UploadAvatarRequest ¶
type UploadAvatarRequest struct {
UserID string `path:"user_id"`
Title string `payload:"title"`
Image httpbind.File `payload:"image"`
}
UploadAvatarRequest exercises multipart File + scalar form fields + path.