Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct {
Next string `json:"next"`
Previous string `json:"previous"`
URI string `json:"uri"`
}
Collection is the model for returning a Collection of objects in the API
type Widget ¶
type Widget struct {
ID string `json:"id"`
SerialNumber string `json:"serial_number"`
Description string `json:"description"`
CreatedOn time.Time `json:"created_on"`
UpdatedOn time.Time `json:"updated_on"`
}
Widget represent simple Widget for the example
type WidgetCollection ¶
type WidgetCollection struct {
Collection
Items []*Widget `json:"items"`
}
WidgetCollection is a paginated collection of Widget models
type WidgetPatch ¶
type WidgetPatch struct {
Description string `json:"description"`
}
WidgetPatch is the allowed input for a Widget (PATCH)
func (*WidgetPatch) Valid ¶
func (req *WidgetPatch) Valid() errors.TracerError
Valid indicates if the request is complete
type WidgetRequest ¶
type WidgetRequest struct {
SerialNumber string `json:"serial_number"`
Description string `json:"description"`
}
WidgetRequest is the allowed input for a Widget (POST, PUT)
func (*WidgetRequest) Valid ¶
func (req *WidgetRequest) Valid() errors.TracerError
Valid indicates if the request is complete
Click to show internal directories.
Click to hide internal directories.