package
0.0.0-20231206062002-1ce2f004b7d9
Repository: https://github.com/codingeasygo/util.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
FormValidFormat will valid args by http request form.
NewStruct will return new struct.
PostFormValidFormat will valid args by http request post form.
QueryValidFormat will valid args by http request query.
RequestValidFormat will valid args by http request query/form/postform.
No description provided by the author
No description provided by the author
ValidAttrFormat will valid multi value by foramt template, return error if fail format is temple set is seperated by ";", general it is one line one temple end with ";" arg1,R|I,R:0; arg2,O|F,R:0; ..
ValidAttrTemple will valid the data to specified value by limit data: target value for valding valueType: target value type limit by <R or O>|<S or I or F> R is value must be having and valid O is vlaue can be empty or nil, but must be valid if it having value S:string value,I:integet value,F:float value example "R|F" is required float value example "O|F" is optional float value valueRange: taget value range limit by <O or R or P>:<limit pattern> O is value must be in options, all optional is seperated by - R is value must be in range by "start-end", or "start" to positive infinite or negative infinite to "-end" P is value must be matched by regex pattern example "O:1-2-3-4" is valid by value is in options 1-2-3-4) example "P:^.*\@.*$" is valid by string having "@" required: if true, ValidAttrTemple will return fail when require value is empty or nil,if false, ValidAttrTemple will return success although setting required for emppty/nil value.
ValidFormat will check all supported type and run valid format.
ValidSetValue will convert src value to dst type and set it.
ValidStructAttrFormat will valid struct by filed.
ValidValue will convert src value to dst type and return it.

# Variables

No description provided by the author

# Structs

Struct is validable struct impl.
No description provided by the author

# Interfaces

EnumValider is interface to enum valid.
Validable is interface to define object can be valid by valid temple.
ValueGetter is inteface for using get the value by key.
ValueSetter is interface to set value to target arg.
No description provided by the author

# Type aliases

M is an map[string]interface{} which can be valid by valid temple.
MS is an map[string]string which can be valid by valid temple.
ValueGetterF is func for implment ValueGetter.
Values is an url.Values which can be valid by valid temple.
ValueSetterF is func for implment ValueSetter.