utils

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomString

func GenerateRandomString(length int) string

func GetExecutablePath added in v1.0.5

func GetExecutablePath() (string, error)

func GetImageFromFilePath added in v1.0.3

func GetImageFromFilePath(filePath string) (image.Image, error)

func GetMediaType added in v1.0.5

func GetMediaType(fileType string) mediatypes.MediaType

func GetThumbnailFileAddedExtension added in v1.0.5

func GetThumbnailFileAddedExtension(filePath string) (string, error)

func GetToolPath added in v1.0.5

func GetToolPath(toolName string) (string, error)

func ImageToRGBA added in v1.0.3

func ImageToRGBA(src image.Image) *image.RGBA

func IsAllowedFileType

func IsAllowedFileType(fileType string, w http.ResponseWriter) bool

func JsonReaderFactory added in v1.0.2

func JsonReaderFactory(in interface{}) (io.Reader, error)

func RenderError

func RenderError(w http.ResponseWriter, err error, statusCode int)

func RenderIfError

func RenderIfError(err error, w http.ResponseWriter, statusCode int) bool

func ResizeImage added in v1.0.3

func ResizeImage(img *image.RGBA, height int) *image.RGBA

Types

This section is empty.

Jump to

Keyboard shortcuts

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