helpers

package
v0.0.0-...-d20b489 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequestResponse

func BadRequestResponse(c *fiber.Ctx, message string)

func CheckAndConvertId

func CheckAndConvertId(numberString string, idName string, modelType interface{}) (int64, bool, int, models.GenericResponse)

func DeleteFile

func DeleteFile(file models.File) error

func GetFileExtension

func GetFileExtension(s string) (string, error)

func IsStringInSlice

func IsStringInSlice(a string, list []string) bool

func MimeTypeToFileExt

func MimeTypeToFileExt(mimeType string) (string, error)

func NotFoundResponse

func NotFoundResponse(c *fiber.Ctx, message string)

Premade HTTP responses

func RandomHex

func RandomHex(n int) (string, error)

func RotateImage

func RotateImage(imgPath string) error

func SaveBytesToDisk

func SaveBytesToDisk(path string, content []byte) error

func SelectiveUpdate

func SelectiveUpdate(old string, new string) string

func UnauthorisedResponse

func UnauthorisedResponse(c *fiber.Ctx, message string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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