Documentation ¶
Index ¶
- func CreateUser(c echo.Context) error
- func DeleteUser(c echo.Context) error
- func GetUser(c echo.Context) error
- func GetUsers(c echo.Context) error
- func PatchUser(c echo.Context) error
- func RestGetHealth(c echo.Context) error
- func UpdateUser(c echo.Context) error
- type CreateUserRequest
- type CreateUserResponse
- type GetUserResponse
- type GetUsersResponse
- type PatchUserRequest
- type PatchUserResponse
- type UpdateUserRequest
- type UpdateUserResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUser ¶
func CreateUser(c echo.Context) error
CreateUser godoc @Summary Create a new user @Description Create a new user with the given information. @Tags [Sample] Users @Accept json @Produce json @Param User body CreateUserRequest true "User information" @Success 201 {object} GetUserResponse "(Sample) This is a sample description for success response in Swagger UI" @Failure 400 {object} object "Invalid Request" @Router /sample/users [post]
func DeleteUser ¶
func DeleteUser(c echo.Context) error
DeleteUser godoc @Summary Delete a user @Description Delete a user with the given information. @Tags [Sample] Users @Accept json @Produce json @Param id path int true "User ID" @Success 200 {string} string "User deletion successful" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} object "User Not Found" @Router /sample/users/{id} [delete]
func GetUser ¶
func GetUser(c echo.Context) error
GetUser godoc @Summary Get specific user information @Description Get information of a user with a specific ID. @Tags [Sample] Users @Accept json @Produce json @Param id path int true "User ID" @Success 200 {object} GetUserResponse "(Sample) This is a sample description for success response in Swagger UI" @Failure 404 {object} object "User Not Found" @Router /sample/users/{id} [get]
func GetUsers ¶
func GetUsers(c echo.Context) error
GetUsers godoc @Summary Get a list of users @Description Get information of all users. @Tags [Sample] Users @Accept json @Produce json @Success 200 {object} GetUsersResponse "(sample) This is a sample description for success response in Swagger UI" @Failure 404 {object} object "User Not Found" @Router /sample/users [get]
func PatchUser ¶
func PatchUser(c echo.Context) error
PatchUser godoc @Summary Patch a user @Description Patch a user with the given information. @Tags [Sample] Users @Accept json @Produce json @Param id path int true "User ID" @Param User body PatchUserRequest true "User information to update" @Success 200 {object} PatchUserResponse "(Sample) This is a sample description for success response in Swagger UI" @Failure 400 {object} object "Invalid Request" @Failure 404 {object} object "User Not Found" @Router /sample/users/{id} [patch]
func RestGetHealth ¶
func RestGetHealth(c echo.Context) error
RestGetHealth func is for checking Beetle server health. RestGetHealth godoc @Summary Check Beetle is alive @Description Check Beetle is alive @Tags [Admin] System management @Accept json @Produce json @Success 200 {object} model.BasicResponse @Failure 404 {object} model.BasicResponse @Failure 500 {object} model.BasicResponse @Router /health [get]
func UpdateUser ¶
func UpdateUser(c echo.Context) error
UpdateUser godoc @Summary Update a user @Description Update a user with the given information. @Tags [Sample] Users @Accept json @Produce json @Param id path int true "User ID" @Param User body UpdateUserRequest true "User information to update" @Success 201 {object} UpdateUserResponse "(Sample) This is a sample description for success response in Swagger UI" @Failure 400 {object} object "Invalid Request" @Router /sample/users/{id} [put]
Types ¶
type CreateUserRequest ¶
[Note] Struct Embedding is used to inherit the fields of MyUser
type CreateUserResponse ¶
[Note] Struct Embedding is used to inherit the fields of MyUser
type GetUserResponse ¶
[Note] Struct Embedding is used to inherit the fields of MyUser
type GetUsersResponse ¶
type PatchUserRequest ¶
[Note] Struct Embedding is used to inherit the fields of MyUser
type PatchUserResponse ¶
[Note] Struct Embedding is used to inherit the fields of MyUser
type UpdateUserRequest ¶
[Note] Struct Embedding is used to inherit the fields of MyUser
type UpdateUserResponse ¶
[Note] Struct Embedding is used to inherit the fields of MyUser