Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToStruct ¶
func ConvertToStruct(input interface{}, output interface{}) error
ConvertToStruct copies the input map to the output struct.
func ExtractValidationRules ¶
ExtractValidationRules extracts validation rules from the given input struct. It iterates over the fields of the struct and checks for the presence of "json" and "validate" tags. If a "json" tag is found, it maps the tag value to the corresponding "validate" tag value in the result map. If a field is of type struct, it recursively calls ExtractValidationRules to extract validation rules from the nested struct fields. The extracted validation rules are returned as a map[string]string, where the key represents the "json" tag value and the value represents the "validate" tag value.
func NewValidator ¶
NewValidator creates a new instance of the validator.Validate struct. It registers a custom validation functions for different types.
Types ¶
This section is empty.