controllers

package
v0.0.0-...-4b14bc7 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PingAPI

func PingAPI(c *fiber.Ctx) error

PingAPI controll the endpoint for make an ping it is usefull for know if the api its working

func ResponseError

func ResponseError(err error, c *fiber.Ctx) error

Types

type ClientControllers

type ClientControllers struct {
	UserService *services.UsersService
}

func NewClientControllers

func NewClientControllers(service *services.UsersService) *ClientControllers

func (*ClientControllers) CreateUser

func (clientC *ClientControllers) CreateUser(c *fiber.Ctx) error

CreateUser handle the endpoint for create and user validate the information and use the service to create and save in the database de information.

func (*ClientControllers) DeleteUser

func (clientC *ClientControllers) DeleteUser(c *fiber.Ctx) error

DeleteUser handle the enpoint for update the state of isActive to false if its any error it will return error

func (*ClientControllers) GetAllUsers

func (clientC *ClientControllers) GetAllUsers(c *fiber.Ctx) error

GetAllUsers handle the endpoint for get some users with the specifications of the user

func (*ClientControllers) GetUserbyID

func (clientC *ClientControllers) GetUserbyID(c *fiber.Ctx) error

GetUserbyID hanlde the endpoint for get all the information of an specific user, it mus be have and jwt

func (*ClientControllers) LogInUser

func (clientC *ClientControllers) LogInUser(c *fiber.Ctx) error

LogInUser handle the endpoint for login an user returning in a json a JWT

func (*ClientControllers) PatchUser

func (clientC *ClientControllers) PatchUser(c *fiber.Ctx) error

PatchUser handle the endpoint for update some information of the user the user must have a JWT, and the information to update must be in the body

func (*ClientControllers) UpdateUser

func (clientC *ClientControllers) UpdateUser(c *fiber.Ctx) error

UpdateUser handle the nedpoint for update all the information of the user, the user must be have an JWT

Jump to

Keyboard shortcuts

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