Documentation
¶
Index ¶
- Constants
- func FieldIDName(entity any) string
- func FieldIDString(entity any) string
- func FindEntityID(entity any) (value reflect.Value, fieldName string, err error)
- func GetID(entity any) (string, error)
- func HasRIPIDField(f reflect.StructField) bool
- func SetID(entity any, uuid string) error
- func TagFromType(v any) (string, bool)
Constants ¶
View Source
const MissingIDField = "<MISSING ID FIELD>"
Variables ¶
This section is empty.
Functions ¶
func FieldIDName ¶
func FieldIDString ¶
func FindEntityID ¶
FindEntityID will find a struct field named ID or a public struct field with the `rip:id` struct tag. If there are many `rip:id` struct tags in the struct, it will return the first one.
func HasRIPIDField ¶
func HasRIPIDField(f reflect.StructField) bool
func TagFromType ¶ added in v0.9.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.