package
0.0.0-20230531114929-2082a21b6e56
Repository: https://github.com/davidsonq/user-go.git
Documentation: pkg.go.dev

# Functions

@Summary Create user @Description Create new user @Tags users @Accept json @Produce json @Param request body models.ExampleInputUser true "Request body" @Success 201 {object} models.UserResponse @Failure 400 {object} models.ErrosNoBody "The body of the request is empty or lack of Nickname, Email, Password in the body of the request, the email has to be a valid email and nickname has to have at least 3 characters and password at least 6." @Failure 401 {object} models.ErrosNoBody "This error is generated when trying to register a nickname or email already registered" @Router /users [post].
@Summary Delete User @Description Deleted User @Tags users @Security ApiKeyAuth @Accept json @Produce json @Param Authorization header string true "Bearer token" @Param id path string true "User ID" @Success 204 "No Content" @Failure 400 {object} models.ErrosNoBody "User not exist" @Failure 401 {object} models.ErrosNoBody "When you pass an invalid token in the request header or it was not sent for authentication." @Router /users/:id [delete].
@Summary Get Profile @Description Seach profile user @Tags users @Security ApiKeyAuth @Accept json @Produce json @Param Authorization header string true "Bearer token" @Success 200 {object} models.UserResponse @Failure 401 {object} models.ErrosNoBody "When you pass an invalid token in the request header or it was not sent for authentication." @Router /users/profile [get].
@Summary Login User @Description Create new session login @Tags login @Accept json @Produce json @Param request body models.LoginUser true "Request body" @Success 200 {object} models.LoginResponse @Failure 400 {object} models.ErrosNoBody "The request body is empty or missing Email, Password in the request body, the email has to be a valid email and the password has at least 6 characters." @Failure 403 {object} models.ErrosNoBody "This error is generated when trying to login with an invalid email or password." @Router /users/login [post].
@Summary Update User @Description Update info user @Tags users @Security ApiKeyAuth @Accept json @Produce json @Param Authorization header string true "Bearer token" @Param id path string true "User ID" @Success 200 {object} models.UserResponse @Failure 400 {object} models.ErrosNoBody "The body of the request is empty or lack of Nickname, Email, Password in the body of the request, the email has to be a valid email and nickname has to have at least 3 characters and password at least 6." @Failure 409 {object} models.ErrosNoBody "User not exist" @Failure 401 {object} models.ErrosNoBody "When you pass an invalid token in the request header or it was not sent for authentication." @Router /users/:id [patch].