controllers

package
v0.0.0-...-1d69984 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthController

type AuthController struct{}

func (*AuthController) Activate

func (a *AuthController) Activate(c *fiber.Ctx) error

func (*AuthController) ForgotPassword

func (a *AuthController) ForgotPassword(c *fiber.Ctx) error

func (*AuthController) Login

func (a *AuthController) Login(c *fiber.Ctx) error

func (*AuthController) Register

func (a *AuthController) Register(c *fiber.Ctx) error

type ChangePasswordDTO

type ChangePasswordDTO struct {
	OldPassword string `json:"old_password" validate:"required,min=8,max=255"`
	NewPassword string `json:"new_password" validate:"required,min=8,max=255"`
}

type ForgotPasswordDTO

type ForgotPasswordDTO struct {
	Email string `json:"email" validate:"required,email,min=4,max=255"`
}

type JsonResponse

type JsonResponse struct {
	Status  string      `json:"status"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

func (*JsonResponse) BadRequestResponse

func (r *JsonResponse) BadRequestResponse() JsonResponse

func (*JsonResponse) CustomErrorResponse

func (r *JsonResponse) CustomErrorResponse(message string) JsonResponse

func (*JsonResponse) CustomSuccessResponse

func (r *JsonResponse) CustomSuccessResponse(message string, data interface{}) JsonResponse

func (*JsonResponse) ErrorResponse

func (r *JsonResponse) ErrorResponse(message string) JsonResponse

func (*JsonResponse) InternalServerErrorResponse

func (r *JsonResponse) InternalServerErrorResponse() JsonResponse

func (*JsonResponse) NotFoundResponse

func (r *JsonResponse) NotFoundResponse() JsonResponse

func (*JsonResponse) SuccessResponse

func (r *JsonResponse) SuccessResponse(message string, data interface{}) JsonResponse

func (*JsonResponse) UnauthorizedResponse

func (r *JsonResponse) UnauthorizedResponse() JsonResponse

func (*JsonResponse) ValidationErrorResponse

func (r *JsonResponse) ValidationErrorResponse(err error) JsonResponse

type LoginDTO

type LoginDTO struct {
	Email    string `json:"email" validate:"required,email,min=4,max=255"`
	Password string `json:"password" validate:"required,min=8,max=255"`
}

type RegisterDTO

type RegisterDTO struct {
	Email           string `json:"email" validate:"required,email,min=4,max=255"`
	Password        string `json:"password" validate:"required,min=8,max=255,eqfield=PasswordConfirm"`
	PasswordConfirm string `json:"password_confirm" validate:"required,min=8,max=255"`
}

type UserController

type UserController struct{}

func (*UserController) ChangePassword

func (u *UserController) ChangePassword(c *fiber.Ctx) error

func (*UserController) Me

func (u *UserController) Me(c *fiber.Ctx) error

func (*UserController) RefreshToken

func (u *UserController) RefreshToken(c *fiber.Ctx) error

Jump to

Keyboard shortcuts

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