params

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUCCESS         = "SUCCESS"
	ErrorMsg        = "Field:[%s]->Tag:[%s] setting is incorrect,[%s]"
	ValidKeyNotNull = "notnull"
	ValidKeyReg     = "reg"
	ValidKeyMax     = "max"
	ValidKeyMin     = "min"
	ValidKeyRoutes  = "routes"
	ValidKeyMsg     = "msg"
)
View Source
const (
	Field = "field"
)

Variables

This section is empty.

Functions

func GetFieldType

func GetFieldType(structField reflect.StructField) string

GetFieldType 获取字段类型

func SetValue

func SetValue(paramType reflect.Type, paramElem reflect.Value, request commons.BeeRequest, i int)

SetValue Assigning values to fields

func ToStruct

func ToStruct(request commons.BeeRequest, pointParamStruct interface{})

ToStruct Take out the parameters and wrap them in struct

func ToStructAndValidation

func ToStructAndValidation(request commons.BeeRequest, pointParamStruct interface{}) string

ToStructAndValidation Take the parameters out, wrap them in a struct and check the parameters

func Validation

func Validation(request commons.BeeRequest, pointParamStruct interface{}) string

Validation Checking the parameters of the struct

func ValidationReflect

func ValidationReflect(request commons.BeeRequest, paramElem reflect.Value, paramType reflect.Type) string

ValidationReflect Checking the parameters of the struct

Types

This section is empty.

Jump to

Keyboard shortcuts

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