Documentation
¶
Overview ¶
Package modelmeta shares field naming and tag parsing between declarations and generation.
Index ¶
- func FieldAt(model reflect.Type, template, ptr unsafe.Pointer, typ reflect.Type) (int, error)
- func FieldMethodPrefix(name string) string
- func OffsetMatches(t reflect.Type, offset uintptr, target reflect.Type) int
- func ParseTags(text string) (map[string]string, error)
- func Snake(name string) string
- func ValidMutatorInput(t reflect.Type) bool
- type FieldMethod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FieldMethodPrefix ¶
FieldMethodPrefix identifies the shared model field-method convention. Example: FieldMethodPrefix("MutateEmail").
func OffsetMatches ¶
OffsetMatches includes nested fields and zero-sized neighbors in ambiguity checks.
func ParseTags ¶
ParseTags rejects malformed and repeated struct tags. Example: ParseTags(`foundry:"-"`).
func ValidMutatorInput ¶
ValidMutatorInput rejects interfaces and nullable wrappers at declaration boundaries. Example: ValidMutatorInput(reflect.TypeFor[EmailInput]()).
Types ¶
type FieldMethod ¶
FieldMethod describes a validated, unbound model method without invoking it. Example: methods, err := FieldMethods(reflect.TypeFor[Member](), fields).
func FieldMethods ¶
FieldMethods checks value and pointer method sets, retaining value receivers only. Fields contains persisted fields and their non-null stored types.