Documentation ¶
Index ¶
Constants ¶
View Source
const BasePath = "/users"
View Source
const LoginUserPath = v1.Version + BasePath + "/login"
View Source
const RegisterUserPath = v1.Version + BasePath + "/register"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) LoginUser ¶
@Summary Login a user @Description Login a user with email and password @Tags users @Accept json @Produce json @Param credentials body user.UserCredentials true "User Credentials" @Success 200 {object} user.User @Failure 400 {object} v1.ErrorResponse @Failure 404 {object} v1.ErrorResponse @Router /v1/users/login [post]
func (*Handler) RegisterUser ¶
@Summary Register a new user @Description Register a new user with email and password @Tags users @Accept json @Produce json @Param newUser body user.NewUser true "New User" @Success 201 {object} user.User @Failure 400 {object} v1.ErrorResponse @Router /v1/users/register [post]
Click to show internal directories.
Click to hide internal directories.