Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateHandler ¶
CreateHandler : Create a user with given name. Return created user
func SearchHandler ¶
SearchHandler : Search users by name. If query param name is empty, all users are returned
func UpdateHandler ¶
UpdateHandler : Update user by ID and return the updated user. If user doesn't exist a new entry is created.
Types ¶
type User ¶
User model Tag description is used by openapi spec generation to add explanations about the field
type UserBody ¶
type UserBody struct {
Name string `json:"name" description:"User name: can be updated" required:"true"`
}
UserBody model used as body by CreateHandler & UpdateHandler
- Tag description is used by openapi spec generation to add explanations about the field - Tag required is used by middleware.Body for body validation & openapi spec generation to flag the field as required
Click to show internal directories.
Click to hide internal directories.