Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUser ¶
func CreateUser(w http.ResponseWriter, r *http.Request)
CreateUser func for creates a new user. @Description Create a new user. @Summary create a new user @Tags User @Accept json @Produce json @Param email body string true "E-mail" @Success 200 {object} models.User @Security ApiKeyAuth @Router /v1/user [post]
func DeleteUser ¶
func DeleteUser(w http.ResponseWriter, r *http.Request)
DeleteUser func for deletes user by given ID. @Description Delete user by given ID. @Summary delete user by given ID @Tags User @Accept json @Produce json @Param id body string true "User ID" @Success 200 {string} string "ok" @Security ApiKeyAuth @Router /v1/user [delete]
func GetUser ¶
func GetUser(w http.ResponseWriter, r *http.Request)
GetUser func gets one user by given ID or 404 error. @Description Get user by given ID. @Summary get user by given ID @Tags User @Accept json @Produce json @Param id path string true "User ID" @Success 200 {object} models.User @Router /v1/user/{id} [get]
func GetUsers ¶
func GetUsers(w http.ResponseWriter, r *http.Request)
GetUsers func gets all exists users. @Description Get all exists users. @Summary get all exists users @Tags Users @Accept json @Produce json @Success 200 {array} models.User @Router /v1/users [get]
func UpdateUser ¶
func UpdateUser(w http.ResponseWriter, r *http.Request)
UpdateUser func for updates user by given ID. @Description Update user. @Summary update user @Tags User @Accept json @Produce json @Param id body string true "User ID" @Param user_status body integer true "User status" @Param user_attrs body models.UserAttrs true "User attributes" @Success 200 {object} models.User @Security ApiKeyAuth @Router /v1/user [put]
Types ¶
This section is empty.