validator

package
v1.0.26 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertSliceType

func ConvertSliceType(source string, typeName string, tf string) (interface{}, error)

func ConvertString2Map

func ConvertString2Map(tag string, split string, keySplit string) map[string]*string

func ConvertType

func ConvertType(source string, typeName string, tf string) (interface{}, error)

func ShouldBindWithBody

func ShouldBindWithBody(s any, c *gin.Context) error

func ShouldBindWithForm

func ShouldBindWithForm(s any, c *gin.Context) error

func ShouldBindWithQuery

func ShouldBindWithQuery(s any, c *gin.Context) error

func ValidNumberByMax

func ValidNumberByMax(val any, ml int64, name string) error

func ValidNumberByMin

func ValidNumberByMin(val any, ml int64, name string) error

Types

type BadRequestError

type BadRequestError struct {
	Msg string
}

func (*BadRequestError) Error

func (e *BadRequestError) Error() string

type ConvertTypeError

type ConvertTypeError struct {
	Msg string
}

func (*ConvertTypeError) Error

func (e *ConvertTypeError) Error() string

Jump to

Keyboard shortcuts

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