utils

package
v0.0.0-...-dd12c3e Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(hashedPassword, password string) bool

CheckPassword compare un mot de passe en clair avec un mot de passe haché

func HashPassword

func HashPassword(password string) (string, error)

HashPassword hache un mot de passe en utilisant bcrypt

func RespondWithError

func RespondWithError(c *gin.Context, code int, message string)

RespondWithError envoie une réponse JSON avec un message d'erreur

func RespondWithJSON

func RespondWithJSON(c *gin.Context, status int, payload interface{})

RespondWithJSON envoie une réponse JSON avec un code HTTP

func RespondWithSuccess

func RespondWithSuccess(c *gin.Context, message string)

RespondWithSuccess envoie une réponse JSON de succès avec un message

Types

This section is empty.

Jump to

Keyboard shortcuts

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