controllers

package
v0.0.0-...-8554a42 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeEmail

func ChangeEmail(ctx *fiber.Ctx, validator *validate.Validate) error

@Summary Cambiar email @Description Ruta para cambiar el correo del usuario @Tags Auth @Accept json @Produce json @Param Body body controllers.BodyChangeEmail true "Body peticion" @Success 200 {string} string @Failure 400 {string} string @Failure 401 {string} string @Failure 500 {string} string @Router /change-email [post]

func ChangePassword

func ChangePassword(ctx *fiber.Ctx, validator *validate.Validate) error

@Summary Cambiar contraseña @Description Ruta para cambiar la contraseña del usuario @Tags Auth @Accept json @Produce json @Param Body body controllers.BodyChangePassword true "Body peticion" @Success 200 {string} string @Failure 400 {string} string @Failure 401 {string} string @Failure 500 {string} string @Router /change-password [post]

func Delete

func Delete(ctx *fiber.Ctx) error

@Summary Metodo Delete del molde @Description Ruta Delete para solicitar datos @Tags books @Accept json @Produce json @Param id path int true "User ID" @Param Body body controllers.BodyRegister true "Body peticion" @Success 200 {object} models.User @Failure 400 {string} string "Titulo del estado" @Failure 500 {array} string @Router /v1/books/{id} [delete]

func EmailConfirmation

func EmailConfirmation(ctx *fiber.Ctx, validator *validate.Validate) error

@Summary Confirmar email del usuario @Description Ruta para confirmar el correo electronico @Tags Auth @Accept json @Produce json @Param id path string true "code" @Success 200 {string} string @Failure 400 {string} string @Router /email-confirmation/{id} [get]

func Get

func Get(ctx *fiber.Ctx) error

@Summary Metodo Get del molde @Description Ruta Get para solicitar datos @Tags books @Accept json @Produce json @Param id path int true "User ID" @Param Body body controllers.BodyRegister true "Body peticion" @Success 200 {object} models.User @Failure 400 {string} string "Titulo del estado" @Failure 500 {array} string @Router /v1/books/{id} [get]

func Login

func Login(ctx *fiber.Ctx, validator *validate.Validate) error

@Summary Login de usuarios @Description Ruta para ingresar al sistema @Tags Auth @Accept json @Produce json @Param Body body controllers.BodyLogin true "Body peticion" @Success 200 {string} string @Failure 400 {string} string @Failure 500 {string} string @Router /login [post]

func Post

func Post(ctx *fiber.Ctx) error

@Summary Metodo Post del molde @Description Ruta Post para crear datos @Tags books @Accept json @Produce json @Param id path int true "User ID" @Param Body body controllers.BodyRegister true "Body peticion" @Success 200 {object} models.User @Failure 400 {string} string "Titulo del estado" @Failure 500 {array} string @Router /v1/books/{id} [post]

func Put

func Put(ctx *fiber.Ctx) error

@Summary Metodo Put del molde @Description Ruta Put para solicitar datos @Tags books @Accept json @Produce json @Param id path int true "User ID" @Param Body body controllers.BodyRegister true "Body peticion" @Success 200 {object} models.User @Failure 400 {string} string "Titulo del estado" @Failure 500 {array} string @Router /v1/books/{id} [put]

func RegisterModerator

func RegisterModerator(ctx *fiber.Ctx, validator *validate.Validate) error

@Summary Registrar Usuario Moderador @Description Ruta para creación de usuarios moderadores @Tags Auth @Accept json @Produce json @Param Body body controllers.BodyRegister true "Body peticion" @Success 200 {string} string @Failure 400 {string} string @Failure 500 {string} string @Router /register-moderator [post]

func RegisterUser

func RegisterUser(ctx *fiber.Ctx, validator *validate.Validate) error

@Summary Registrar Usuario @Description Ruta para creación de usuarios normales @Tags Auth @Accept json @Produce json @Param Body body controllers.BodyRegister true "Body peticion" @Success 200 {string} string @Failure 400 {string} string @Failure 500 {string} string @Router /register-user [post]

func SendEmailRecoverPassword

func SendEmailRecoverPassword(ctx *fiber.Ctx, validator *validate.Validate) error

@Summary Enviar correo para recuperar contraseña @Description Ruta para enviar el correo de recuperación de contraseña del usuario @Tags Auth @Accept json @Produce json @Param Body body controllers.BodyRecoverPassword true "Body peticion" @Success 200 {string} string @Failure 400 {string} string @Failure 500 {string} string @Router /recover-password [post]

Types

type BodyChangeEmail

type BodyChangeEmail struct {
	NewEmail       string `json:"newEmail" validate:"required,min=8"`
	RepeatNewEmail string `json:"repeatNewEmail" validate:"required,min=8"`
}

type BodyChangePassword

type BodyChangePassword struct {
	Newpassword       string `json:"newPassword" validate:"required,min=8"`
	RepeatNewPassword string `json:"repeatNewPassword" validate:"required,min=8"`
}

type BodyLogin

type BodyLogin struct {
	Email    string `json:"email" validate:"required,min=5"`
	Password string `json:"password" validate:"required,min=8"`
}

type BodyRecoverPassword

type BodyRecoverPassword struct {
	Email string `json:"email" validate:"required,min=5"`
}

type BodyRegister

type BodyRegister struct {
	Name           string `json:"name" validate:"required,min=5"`
	LastName       string `json:"lastName" validate:"required,min=5"`
	Email          string `json:"email" validate:"required,min=5"`
	Password       string `json:"password" validate:"required,min=8"`
	RepeatPassword string `json:"repeatPassword" validate:"required,min=8"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL