Documentation ¶
Index ¶
- Variables
- func ConvertFuncToInternalValueFuncAdapter(cf types.ConvertFunc) fields.InternalValueFunc
- func ConvertFuncToRepresentationFuncAdapter(cf types.ConvertFunc) fields.RepresentationFunc
- func FieldTypes[Model any]() map[string]string
- func Fields[Model any]() []string
- type ToInternalValueDetector
- type ToRepresentationDetector
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFieldShouldBeSkipped = errors.New("field is a relationship")
Functions ¶
func ConvertFuncToInternalValueFuncAdapter ¶
func ConvertFuncToInternalValueFuncAdapter(cf types.ConvertFunc) fields.InternalValueFunc
func ConvertFuncToRepresentationFuncAdapter ¶
func ConvertFuncToRepresentationFuncAdapter(cf types.ConvertFunc) fields.RepresentationFunc
func FieldTypes ¶
Prints a summary with the fields of the model obtained using reflection
Types ¶
type ToInternalValueDetector ¶
type ToInternalValueDetector interface {
ToInternalValue(fieldName string) (fields.InternalValueFunc, error)
}
func DefaultToInternalValueDetector ¶
func DefaultToInternalValueDetector[Model any]() ToInternalValueDetector
type ToRepresentationDetector ¶
type ToRepresentationDetector[Model any] interface { ToRepresentation(fieldName string) (fields.RepresentationFunc, error) }
ToRepresentationDetector is an interface that allows to detect the representation function for a given field using well known interfaces, knowledge of stdlib types or any other way
func DefaultToRepresentationDetector ¶
func DefaultToRepresentationDetector[Model any]() ToRepresentationDetector[Model]
Click to show internal directories.
Click to hide internal directories.