utils

package
v0.0.0-...-bbf805e Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticateApps

func AuthenticateApps(apps []string) gin.HandlerFunc

func ErrorHandler

func ErrorHandler(context *gin.Context, errorObject Error)

func HandleValidationErrors

func HandleValidationErrors(context *gin.Context, err error, placeOfFailure string) bool

func MapSlice

func MapSlice[Input any, Output any](input []Input, transformer func(Input) Output) []Output

func PascalToSnakeCase

func PascalToSnakeCase(term string) string

func UnwrapEnvironment

func UnwrapEnvironment(key string) (string, error)

Types

type Error

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

Jump to

Keyboard shortcuts

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