Documentation ¶
Index ¶
- Variables
- func ConvertFloatDynamic(convert func(float64) any, canBeBelowZero bool) func(any) (any, error)
- func ConvertFloatToInt(in any) (any, error)
- func ConvertFloatToUint(in any) (any, error)
- func ConvertPassThrough(in any) (any, error)
- func ConvertPassThroughWithTypeValidation[T any](in any) (any, error)
- type ConvertFunc
- type FieldType
- type FieldTypeMapper
Constants ¶
This section is empty.
Variables ¶
View Source
var NumericTypes = []string{
"int", "int8", "int16", "int32", "int64",
"uint", "uint8", "uint16", "uint32", "uint64",
}
Functions ¶
func ConvertFloatDynamic ¶
func ConvertFloatToInt ¶
func ConvertFloatToUint ¶
func ConvertPassThrough ¶
Types ¶
type ConvertFunc ¶
type FieldType ¶
type FieldType struct { InternalToResponse ConvertFunc RequestToInternal ConvertFunc }
type FieldTypeMapper ¶
func DefaultFieldTypeMapper ¶
func DefaultFieldTypeMapper() *FieldTypeMapper
func Mapper ¶
func Mapper() *FieldTypeMapper
func (*FieldTypeMapper) Register ¶
func (s *FieldTypeMapper) Register(typeString string, fieldType FieldType)
func (*FieldTypeMapper) ToInternalValue ¶
func (s *FieldTypeMapper) ToInternalValue(typeString string) (ConvertFunc, error)
func (*FieldTypeMapper) ToRepresentation ¶
func (s *FieldTypeMapper) ToRepresentation(typeString string) (ConvertFunc, error)
Click to show internal directories.
Click to hide internal directories.