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 IsMapOfStringToPtrToStruct(type_ reflect.Type) bool
- func IsNil(value reflect.Value) bool
- func IsPtrToBool(value any) bool
- func IsPtrToFloat64(value any) bool
- func IsPtrToInt64(value any) bool
- func IsPtrToMapOfStringToString(value any) bool
- func IsPtrToSliceOfString(value any) bool
- func IsPtrToString(value any) bool
- func IsPtrToStruct(type_ reflect.Type) bool
- func IsSliceOfPtrToStruct(type_ reflect.Type) 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 pointer fields The order of field definition is important! Later fields will override previous fields
func IsMapOfStringToPtrToStruct ¶
Compatible with map[string]*struct{}
func IsPtrToMapOfStringToString ¶
*map[string]string
func IsSliceOfPtrToStruct ¶
Compatible with []*struct{}
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.