Documentation ¶
Index ¶
- func GetFieldTagsForType(type_ reflect.Type, name string) map[string]string
- func GetFieldTagsForValue(value reflect.Value, name string) map[string]string
- func GetFunctionName(fn any) string
- func GetReferredField(entity reflect.Value, referenceFieldName string, referredFieldName string) (reflect.Value, reflect.Value, bool)
- func GetStructFields(type_ reflect.Type) []reflect.StructField
- func GetTaggedFields(structPtr any, name string) []reflect.Value
- func IsEmpty(value any) bool
- func IsFloat(kind reflect.Kind) bool
- func IsInteger(kind reflect.Kind) bool
- func IsMapOfStringToPointerToStruct(type_ reflect.Type) bool
- func IsNil(value reflect.Value) bool
- func IsPointerToBool(value any) bool
- func IsPointerToFloat64(value any) bool
- func IsPointerToInt64(value any) bool
- func IsPointerToMapOfStringToString(value any) bool
- func IsPointerToSliceOfString(value any) bool
- func IsPointerToString(value any) bool
- func IsPointerToStruct(type_ reflect.Type) bool
- func IsSliceOfPointerToStruct(type_ reflect.Type) bool
- func IsUInteger(kind reflect.Kind) bool
- func IsZero(value reflect.Value) bool
- func TraverseEntities(entity any, locking bool, traverse EntityTraverser)
- type EntityTraverser
- type EntityWork
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFieldTagsForType ¶
func GetFieldTagsForValue ¶
func GetFunctionName ¶
func GetReferredField ¶
func GetStructFields ¶
func GetStructFields(type_ reflect.Type) []reflect.StructField
Includes fields "inherited" from anonymous struct fields The order of field definition is important! Later fields will override previous fields
func IsMapOfStringToPointerToStruct ¶ added in v0.1.61
Compatible with map[string]*struct{}
func IsPointerToMapOfStringToString ¶ added in v0.1.61
*map[string]string
func IsPointerToSliceOfString ¶ added in v0.1.61
*[]string
func IsPointerToStruct ¶ added in v0.1.61
Compatible with *struct{}
func IsSliceOfPointerToStruct ¶ added in v0.1.61
Compatible with []*struct{}
func IsUInteger ¶ added in v0.1.61
uint64, uint32, uint16, uint8, uint
func IsZero ¶
See: https://stackoverflow.com/questions/23555241/golang-reflection-how-to-get-zero-value-of-a-field-type
func TraverseEntities ¶ added in v0.1.51
func TraverseEntities(entity any, locking bool, traverse EntityTraverser)
Ignore fields tagged with "traverse:ignore" or "lookup"
Types ¶
type EntityTraverser ¶ added in v0.1.51
type EntityWork ¶ added in v0.1.52
type EntityWork map[any]struct{}
func (EntityWork) Start ¶ added in v0.1.52
func (self EntityWork) Start(entityPtr any) bool
func (EntityWork) TraverseEntities ¶ added in v0.1.52
func (self EntityWork) TraverseEntities(entityPtr any, traverse EntityTraverser)
Click to show internal directories.
Click to hide internal directories.