types

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const MaxKinds = 32

Variables

View Source
var (
	Any = reflect.TypeOf((*any)(nil)).Elem()

	Bool = reflect.TypeOf((*bool)(nil)).Elem()
	Byte = reflect.TypeOf((*byte)(nil)).Elem()

	Int   = reflect.TypeOf((*int)(nil)).Elem()
	Int8  = reflect.TypeOf((*int8)(nil)).Elem()
	Int16 = reflect.TypeOf((*int16)(nil)).Elem()
	Int32 = reflect.TypeOf((*int32)(nil)).Elem()
	Int64 = reflect.TypeOf((*int64)(nil)).Elem()

	Uint   = reflect.TypeOf((*uint)(nil)).Elem()
	Uint8  = reflect.TypeOf((*uint8)(nil)).Elem()
	Uint16 = reflect.TypeOf((*uint16)(nil)).Elem()
	Uint32 = reflect.TypeOf((*uint32)(nil)).Elem()
	Uint64 = reflect.TypeOf((*uint64)(nil)).Elem()

	Float32 = reflect.TypeOf((*float32)(nil)).Elem()
	Float64 = reflect.TypeOf((*float64)(nil)).Elem()

	String = reflect.TypeOf((*string)(nil)).Elem()
	Bytes  = reflect.TypeOf((*[]byte)(nil)).Elem()
)

Functions

func LoadOrCreate added in v0.1.3

func LoadOrCreate(typ reflect.Type, tag string, constructor func() interface{}) (interface{}, bool)

Types

type Field added in v0.1.3

type Field struct {
	Index     []int
	Name      string
	Router    string
	InlineMap bool
	Error     error
}

Field

type Profile added in v0.1.3

type Profile struct {
	Fields []*Field
	Names  map[string]struct{}
}

Profile type's Profile

func GetProfile added in v0.2.0

func GetProfile(t reflect.Type, tagKey string) *Profile

GetProfile get or construct type's profile

func NewProfile added in v0.1.3

func NewProfile(t reflect.Type, tagKey string) *Profile

NewProfile construct type's profile

Jump to

Keyboard shortcuts

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