typemeta

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldMeta

type FieldMeta struct {
	GoName       string
	DBName       string
	JSONName     string
	Type         reflect.Type
	Index        []int
	EmbeddedPath []string

	IsPK       bool
	IsNullable bool
	IsIgnored  bool

	Attributes map[string]string
}

FieldMeta is transport-neutral field metadata.

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry caches parsed metadata.

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates metadata registry.

func (*Registry) Resolve

func (r *Registry) Resolve(model any) (*TypeMeta, error)

Resolve returns metadata for model type and caches it.

type TypeMeta

type TypeMeta struct {
	Type       reflect.Type
	Name       string
	Fields     []*FieldMeta
	FieldsByGo map[string]*FieldMeta
	FieldsByDB map[string]*FieldMeta
}

TypeMeta is transport-neutral metadata for a Go struct type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL