types

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StrErrType = reflect.TypeOf(fmt.Errorf(""))

Functions

func Elem

func Elem(rType reflect.Type) reflect.Type

func EnsureStruct

func EnsureStruct(fType reflect.Type) reflect.Type

func InlineStruct

func InlineStruct(p reflect.Type, onField func(f *reflect.StructField)) reflect.Type

func IsMulti

func IsMulti(destType reflect.Type) bool

func IsObject

func IsObject(anError interface{}) bool

func LookupType

func LookupType(lookup xreflect.LookupType, typeName string, opts ...xreflect.Option) (reflect.Type, error)

func NewValue

func NewValue(p reflect.Type) interface{}

func Traverse

func Traverse(any interface{}, visitor func(value reflect.Value) error) error

Types

type Accessor

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

func NewAccessor

func NewAccessor(fields ...*xunsafe.Field) *Accessor

func (*Accessor) SetBool

func (a *Accessor) SetBool(ptr unsafe.Pointer, value bool)

func (*Accessor) SetConverted

func (a *Accessor) SetConverted(ptr unsafe.Pointer, value interface{}, format string) error

func (*Accessor) SetConvertedAndGet

func (a *Accessor) SetConvertedAndGet(ptr unsafe.Pointer, value interface{}, format string) (interface{}, error)

func (*Accessor) SetValue

func (a *Accessor) SetValue(ptr unsafe.Pointer, value interface{})

func (*Accessor) String

func (a *Accessor) String(ptr unsafe.Pointer) string

func (*Accessor) Type

func (a *Accessor) Type() reflect.Type

func (*Accessor) Value

func (a *Accessor) Value(values interface{}, indexes ...int) (interface{}, error)

func (*Accessor) Values

func (a *Accessor) Values(values interface{}, indexes ...int) ([]interface{}, error)

type Accessors

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

func NewAccessors

func NewAccessors(namer Namer) *Accessors

func (*Accessors) AccessorByName

func (a *Accessors) AccessorByName(name string) (*Accessor, error)

func (*Accessors) Init

func (a *Accessors) Init(rType reflect.Type)

func (*Accessors) InitPath

func (a *Accessors) InitPath(rType reflect.Type, path string)

type CycleDetector

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

func NewCycleDetector

func NewCycleDetector(rType reflect.Type) *CycleDetector

func (*CycleDetector) Indexed

func (c *CycleDetector) Indexed(p reflect.Type) bool

func (*CycleDetector) Next

func (c *CycleDetector) Next(rType reflect.Type) *CycleDetector

type FieldNamer

type FieldNamer struct {
}

func (*FieldNamer) Names

func (s *FieldNamer) Names(rField reflect.StructField) []string

type Namer

type Namer interface {
	Names(rField reflect.StructField) []string
}

type SqlxNamer

type SqlxNamer struct {
}

func (*SqlxNamer) Names

func (s *SqlxNamer) Names(rField reflect.StructField) []string

type VeltyNamer

type VeltyNamer struct {
}

func (*VeltyNamer) Names

func (v *VeltyNamer) Names(rField reflect.StructField) []string

Jump to

Keyboard shortcuts

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