utils

package
v0.0.0-...-15e17f2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateHashedPassword

func GenerateHashedPassword(password string) (string, error)

GenerateHashedPassword generates a hashed password from the given password. It returns an error if there's a failure generating the password.

func RespondError

func RespondError(c *fiber.Ctx, status int, message string) error

RespondError creates an HTTPError and responds with the given error status and message.

Types

type HTTPError

type HTTPError struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

HTTPError is a struct that represents an error response.

Jump to

Keyboard shortcuts

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