Documentation ¶
Index ¶
- Variables
- func Annotate(t *openapi3.T)
- func GetParams[T interface{}](c *gin.Context) *T
- func GetPayload[T interface{}](c *gin.Context) *T
- func GetQuery[T interface{}](c *gin.Context) *T
- func Handle_CreateNewUserRequest(c *gin.Context)
- func Handle_GetUserRequest(c *gin.Context)
- func Handle_GetUsersRequest(c *gin.Context)
- func Handle_UpdateUserRequest(c *gin.Context)
- func Mount(r *gin.Engine)
- type CreateNewUserRequest
- type CreateNewUserResponse
- type DetailedURLParameters
- type GetUserResponse
- type GetUsersQueryParameters
- type GetUsersResponse
- type UpdateUserRequest
- type UpdateUserResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // URLParamsRegex is a regular expression to match URL parameters in the openapi spec format (e.g. {id}). // It allows to replace the parameters with the gin-gonic format (e.g. :id). URLParamsRegex = regexp.MustCompile(`\{([a-zA-Z0-9]+)\}`) )
Functions ¶
func GetPayload ¶
func Handle_GetUserRequest ¶
func Handle_GetUsersRequest ¶
Types ¶
type CreateNewUserRequest ¶
type CreateNewUserRequest struct {
Name string `json:"name" validate:"required"`
}
type CreateNewUserResponse ¶
type DetailedURLParameters ¶
type DetailedURLParameters struct {
UserID string `json:"id" validate:"required"`
}
type GetUserResponse ¶
type GetUsersQueryParameters ¶
type GetUsersResponse ¶
type GetUsersResponse struct { Total int `json:"total"` Docs []GetUserResponse `json:"items"` }
type UpdateUserRequest ¶
type UpdateUserRequest struct {
Name string `json:"name"`
}
type UpdateUserResponse ¶
Click to show internal directories.
Click to hide internal directories.