tools

package
v0.0.0-...-1419b38 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindRequestData

func BindRequestData(ctx *gin.Context, dstObj interface{}) (string, error)

Bind request data on interface object

func MakeRange

func MakeRange(min, max int) []int

Helper function to create a range of indices

func SendError

func SendError(ctx *gin.Context, response interface{}, err interface{}, statusCode int, messages ...string)

Output an error message

func SendResponse

func SendResponse(ctx *gin.Context, statusCode int, data any, headers map[string]string, ginRespType GinResponseType) (err error)

func ValidateEmail

func ValidateEmail(email string) bool

Types

type GinResponseType

type GinResponseType int32
const (
	GinResponseTypes_UNKNOWN GinResponseType = iota
	GinResponseTypes_JSON
	GinResponseTypes_NOCONTENT
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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