typedesc

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnderlyingOf

func UnderlyingOf(typ types.Type) types.Type

Types

type KindTuple

type KindTuple struct {
	Ptr       bool
	Container reflect.Kind // Only slice or array
	PtrElem   bool
	Elem      reflect.Kind // int32, int64, string, struct, map
}

KindTuple represents an underlying type. We do not support double pointer.

func NewKindTuple

func NewKindTuple(typ types.Type) (kt KindTuple, err error)

func SimpleKind

func SimpleKind(ptr bool, elem reflect.Kind) KindTuple

func (KindTuple) IsBasic

func (k KindTuple) IsBasic() bool

func (KindTuple) IsKind

func (k KindTuple) IsKind(kind reflect.Kind) bool

func (KindTuple) IsKindTuple

func (k KindTuple) IsKindTuple(kind KindTuple) bool

func (KindTuple) IsNillable

func (k KindTuple) IsNillable() bool

IsNillable ...

func (KindTuple) IsNumber

func (k KindTuple) IsNumber() bool

func (KindTuple) IsPtr

func (k KindTuple) IsPtr() bool

IsPtr ...

func (KindTuple) IsPtrBasic

func (k KindTuple) IsPtrBasic() bool

func (KindTuple) IsPtrNumber

func (k KindTuple) IsPtrNumber() bool

func (KindTuple) IsSimple

func (k KindTuple) IsSimple() bool

func (KindTuple) IsSimpleKind

func (k KindTuple) IsSimpleKind(ptr bool, kind reflect.Kind) bool

func (KindTuple) IsSlice

func (k KindTuple) IsSlice() bool

type TypeDesc

type TypeDesc struct {
	TypeString string
	Underlying string
	KindTuple
}

TypeDesc describes types for generating code

func (*TypeDesc) IsBareTime

func (d *TypeDesc) IsBareTime() bool

func (*TypeDesc) IsJSON

func (d *TypeDesc) IsJSON() bool

func (*TypeDesc) IsPtrTime

func (d *TypeDesc) IsPtrTime() bool

func (*TypeDesc) IsSliceOfBasicOrTime

func (d *TypeDesc) IsSliceOfBasicOrTime() bool

func (*TypeDesc) IsTime

func (d *TypeDesc) IsTime() bool

func (*TypeDesc) IsType

func (d *TypeDesc) IsType(t string) bool

Jump to

Keyboard shortcuts

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