Documentation ¶
Index ¶
- Variables
- func Enum[T any](opts ...EnumOpt) any
- func Inline(fns ...any) any
- func Specialize[T any](c any, cvs ...any) any
- func WithInline(fns ...any) any
- func X_addPackageDef(def PackageDef)
- func X_defPackageName() string
- type DefaultOpt
- type EnumDef
- type EnumOpt
- type EnumSpec
- type FieldDef
- type FieldOpt
- type FieldSpec
- type InitOpt
- type InlineDef
- type MetaOpt
- type PackageDef
- type PackageSpec
- func (ps PackageSpec) Enum(ty any) *EnumSpec
- func (ps PackageSpec) Enums() []*EnumSpec
- func (ps PackageSpec) Inlines() map[any]*InlineDef
- func (ps PackageSpec) Name() string
- func (ps PackageSpec) Struct(ty any) *StructSpec
- func (ps PackageSpec) Structs() []*StructSpec
- func (ps PackageSpec) WithInlines() map[any]*WithInlineDef
- type ReceiverOpt
- type RegistryError
- type SpecError
- type SpecializeDef
- type StructDef
- type StructOpt
- type StructSpec
- func (ss StructSpec) Defs() []StructDef
- func (ss StructSpec) Field(name string) *FieldSpec
- func (ss StructSpec) Fields() []*FieldSpec
- func (ss StructSpec) Inits() []any
- func (ss StructSpec) Meta() ctr.Map[reflect.Type, any]
- func (ss StructSpec) Opts() []StructOpt
- func (ss StructSpec) Receiver() string
- func (ss StructSpec) Type() any
- type TypeOpt
- type WithInlineDef
Constants ¶
This section is empty.
Variables ¶
View Source
var (
RegistrySealedError = RegistryError{errors.New("registry sealed")}
)
Functions ¶
func WithInline ¶
func X_addPackageDef ¶
func X_addPackageDef(def PackageDef)
func X_defPackageName ¶
func X_defPackageName() string
Types ¶
type DefaultOpt ¶
func Default ¶
func Default(val any) DefaultOpt
type EnumSpec ¶
type EnumSpec struct {
// contains filtered or unexported fields
}
func NewEnumSpec ¶
type FieldSpec ¶
type FieldSpec struct {
// contains filtered or unexported fields
}
func NewFieldSpec ¶
func (FieldSpec) RuntimeType ¶
type PackageDef ¶
type PackageDef interface {
// contains filtered or unexported methods
}
type PackageSpec ¶
type PackageSpec struct {
// contains filtered or unexported fields
}
func NewPackageSpec ¶
func NewPackageSpec(name string, defs []PackageDef) *PackageSpec
func X_getPackageSpec ¶
func X_getPackageSpec() *PackageSpec
func (PackageSpec) Enum ¶
func (ps PackageSpec) Enum(ty any) *EnumSpec
func (PackageSpec) Enums ¶
func (ps PackageSpec) Enums() []*EnumSpec
func (PackageSpec) Inlines ¶
func (ps PackageSpec) Inlines() map[any]*InlineDef
func (PackageSpec) Name ¶
func (ps PackageSpec) Name() string
func (PackageSpec) Struct ¶
func (ps PackageSpec) Struct(ty any) *StructSpec
func (PackageSpec) Structs ¶
func (ps PackageSpec) Structs() []*StructSpec
func (PackageSpec) WithInlines ¶
func (ps PackageSpec) WithInlines() map[any]*WithInlineDef
type ReceiverOpt ¶
type ReceiverOpt struct {
Name string
}
func Receiver ¶
func Receiver(name string) ReceiverOpt
type RegistryError ¶
type RegistryError struct {
// contains filtered or unexported fields
}
func (RegistryError) Error ¶
func (e RegistryError) Error() string
func (RegistryError) Unwrap ¶
func (e RegistryError) Unwrap() error
type SpecializeDef ¶
type StructSpec ¶
type StructSpec struct {
// contains filtered or unexported fields
}
func NewStructSpec ¶
func NewStructSpec(ty any, defs []StructDef) *StructSpec
func (StructSpec) Defs ¶
func (ss StructSpec) Defs() []StructDef
func (StructSpec) Field ¶
func (ss StructSpec) Field(name string) *FieldSpec
func (StructSpec) Fields ¶
func (ss StructSpec) Fields() []*FieldSpec
func (StructSpec) Inits ¶
func (ss StructSpec) Inits() []any
func (StructSpec) Opts ¶
func (ss StructSpec) Opts() []StructOpt
func (StructSpec) Receiver ¶
func (ss StructSpec) Receiver() string
func (StructSpec) Type ¶
func (ss StructSpec) Type() any
type WithInlineDef ¶
type WithInlineDef struct {
Fns []any
}
Click to show internal directories.
Click to hide internal directories.