Documentation
¶
Overview ¶
------------------------------------------------------------------------------------------------ Ensuring we have a very limited use of the 'reflect' package. THIS FILE SHOULD BE THE ONLY PLACE WHERE WE IMPORT THE REFLECT PACKAGE! Basically, we only want to use reflection: - 1) when generating code (which then precisely allows to avoid reflection) - 2) in init functions NEVER DURING THE RUNTIME! At least not in OUR code (but some 3rd party libraries prolly do) ------------------------------------------------------------------------------------------------
Index ¶
- func GetFnName(fn any) string
- func TypeNameOf(arg any, bare bool) string
- type Country
- type GoaldField
- type GoaldType
- func (t GoaldType) Elem() GoaldType
- func (t GoaldType) Equals(other GoaldType) bool
- func (t GoaldType) Field(index int) GoaldField
- func (t GoaldType) FieldByName(name string) GoaldField
- func (t GoaldType) Implements(other GoaldType) bool
- func (t GoaldType) Name() string
- func (t GoaldType) NumField() int
- func (t GoaldType) PkgPath() string
- func (t GoaldType) String() string
- type GoaldValue
- type Language
- type TypeFamily
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TypeNameOf ¶
Types ¶
type GoaldField ¶
type GoaldField struct {
// contains filtered or unexported fields
}
func (GoaldField) IsAnonymous ¶
func (f GoaldField) IsAnonymous() bool
func (GoaldField) Name ¶
func (f GoaldField) Name() string
func (GoaldField) Tag ¶
func (f GoaldField) Tag() reflect.StructTag
func (GoaldField) Type ¶
func (f GoaldField) Type() GoaldType
type GoaldType ¶
type GoaldType struct {
// contains filtered or unexported fields
}
func (GoaldType) Field ¶
func (t GoaldType) Field(index int) GoaldField
func (GoaldType) FieldByName ¶
func (t GoaldType) FieldByName(name string) GoaldField
func (GoaldType) Implements ¶
type GoaldValue ¶
type GoaldValue struct {
// contains filtered or unexported fields
}
func ValueOf ¶
func ValueOf(arg any) GoaldValue
func (GoaldValue) GetFieldValue ¶
func (thisValue GoaldValue) GetFieldValue(fieldName string) any
type TypeFamily ¶
type TypeFamily int
TypeFamily represents the type of a business object's property
const ( TypeFamilyUNKNOWN TypeFamily = iota - 1 TypeFamilyBOOL TypeFamilySTRING TypeFamilyINT TypeFamilyBIGINT TypeFamilyREAL TypeFamilyDOUBLE TypeFamilyDATE TypeFamilyENUM TypeFamilyRELATIONSHIPxMONOM TypeFamilyRELATIONSHIPxPOLYM )
func GetTypeFamily ¶
func GetTypeFamily(field GoaldField, iBoTypeFamily, enumTypeFamily GoaldType) (TypeFamily TypeFamily, multiple bool)
GetTypeFamily returns the type family of a given structfield
func (TypeFamily) IsRelationship ¶
func (thisProperty TypeFamily) IsRelationship() bool
Tells if we have a relationship here
func (TypeFamily) String ¶
func (thisProperty TypeFamily) String() string
func (TypeFamily) Val ¶
func (thisProperty TypeFamily) Val() int
Val helps implement the IEnum interface
func (TypeFamily) Values ¶
func (thisProperty TypeFamily) Values() map[int]string
Values helps implement the IEnum interface