Documentation
¶
Index ¶
- func Builtins() []string
- func Declarables() []string
- func IsBuiltin(typeName string) bool
- func IsDecimal(typeName string) bool
- func IsDeclarable(typeName string) bool
- func IsNative(typeName string) bool
- func NeedCustomUnmarshaler(typeName string) (ok bool, err error)
- type Bool
- type Dec32
- type Dec64
- type Dec128
- type Field
- type FieldCustom
- type FieldRegistrator
- type Float32
- type Float64
- type Hex
- type Hex8
- type Hex16
- type Hex32
- type Hex64
- type ImportedType
- type Int
- type Int8
- type Int16
- type Int32
- type Int64
- type LocalType
- type Oct
- type Oct8
- type Oct16
- type Oct32
- type Oct64
- type Source
- type Str
- type String
- type TypeRegistration
- type Uint
- type Uint8
- type Uint16
- type Uint32
- type Uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Declarables ¶ added in v0.1.1
func Declarables() []string
Declarables return list of builtin declarables type except decX.Y, which should be handled separately
func IsDeclarable ¶ added in v0.1.1
IsDeclarable check if type name can be declared explicitly (dec32, dec64 and dec128 can't)
func NeedCustomUnmarshaler ¶ added in v0.1.1
NeedCustomUnmarshaler checks if given typeName is a native type which needs custom unmarshaler, e.g. $int, $float64, etc
Types ¶
type Bool ¶ added in v0.1.1
type Bool string
Bool represents field of type bool
func (Bool) Register ¶ added in v0.1.1
func (i Bool) Register(registrator FieldRegistrator)
Register registers a field
type Dec32 ¶
type Dec32 string
Dec32 represents field of type dec32
func (Dec32) Register ¶
func (i Dec32) Register(registrator FieldRegistrator)
Register registers a field
type Dec64 ¶
type Dec64 string
Dec64 represents field of type dec64
func (Dec64) Register ¶
func (i Dec64) Register(registrator FieldRegistrator)
Register registers a field
type Dec128 ¶
type Dec128 string
Dec128 represents field of type dec128
func (Dec128) Register ¶
func (i Dec128) Register(registrator FieldRegistrator)
Register registers a field
type Field ¶
type Field interface {
Name() string
TypeName() string
Register(registrator FieldRegistrator)
GoName() string
}
Field represents a field of given type
type FieldCustom ¶
type FieldCustom struct {
FieldName string
Type TypeRegistration
}
FieldCustom represents a field of custom pre-registered type
func (FieldCustom) GoName ¶ added in v0.1.1
func (f FieldCustom) GoName() string
GoName name of registered type
func (FieldCustom) Register ¶
func (f FieldCustom) Register(registrator FieldRegistrator)
Register registers custom type
type FieldRegistrator ¶
type FieldRegistrator interface {
AddInt(name string)
AddInt8(name string)
AddInt16(name string)
AddInt32(name string)
AddInt64(name string)
AddUint(name string)
AddUint8(name string)
AddUint16(name string)
AddUint32(name string)
AddUint64(name string)
AddDec128(name string)
AddFloat32(name string)
AddFloat64(name string)
AddString(name string)
AddStr(name string)
AddBool(name string)
AddCustomType(name string, info TypeRegistration)
}
FieldRegistrator abstration for field of given type adder
type Float32 ¶
type Float32 string
Float32 represents field of type float32
func (Float32) Register ¶
func (i Float32) Register(registrator FieldRegistrator)
Register registers a field
type Float64 ¶
type Float64 string
Float64 represents field of type float64
func (Float64) Register ¶
func (i Float64) Register(registrator FieldRegistrator)
Register registers a field
type Hex ¶
type Hex string
Hex represents field of type hex
func (Hex) Register ¶
func (i Hex) Register(registrator FieldRegistrator)
Register registers a field
type Hex8 ¶
type Hex8 string
Hex8 represents field of type hex8
func (Hex8) Register ¶
func (i Hex8) Register(registrator FieldRegistrator)
Register registers a field
type Hex16 ¶
type Hex16 string
Hex16 represents field of type hex16
func (Hex16) Register ¶
func (i Hex16) Register(registrator FieldRegistrator)
Register registers a field
type Hex32 ¶
type Hex32 string
Hex32 represents field of type hex32
func (Hex32) Register ¶
func (i Hex32) Register(registrator FieldRegistrator)
Register registers a field
type Hex64 ¶
type Hex64 string
Hex64 represents field of type hex64
func (Hex64) Register ¶
func (i Hex64) Register(registrator FieldRegistrator)
Register registers a field
type ImportedType ¶
ImportedType imported type view
func (ImportedType) String ¶
func (it ImportedType) String() string
type Int ¶
type Int string
Int represents field of type int
func (Int) Register ¶
func (i Int) Register(registrator FieldRegistrator)
Register registers a field
type Int8 ¶
type Int8 string
Int8 represents field of type int8
func (Int8) Register ¶
func (i Int8) Register(registrator FieldRegistrator)
Register registers a field
type Int16 ¶
type Int16 string
Int16 represents field of type int16
func (Int16) Register ¶
func (i Int16) Register(registrator FieldRegistrator)
Register registers a field
type Int32 ¶
type Int32 string
Int32 represents field of type int32
func (Int32) Register ¶
func (i Int32) Register(registrator FieldRegistrator)
Register registers a field
type Int64 ¶
type Int64 string
Int64 represents field of type int64
func (Int64) Register ¶
func (i Int64) Register(registrator FieldRegistrator)
Register registers a field
type Oct ¶
type Oct string
Oct represents field of type oct
func (Oct) Register ¶
func (i Oct) Register(registrator FieldRegistrator)
Register registers a field
type Oct8 ¶
type Oct8 string
Oct8 represents field of type oct8
func (Oct8) Register ¶
func (i Oct8) Register(registrator FieldRegistrator)
Register registers a field
type Oct16 ¶
type Oct16 string
Oct16 represents field of type oct16
func (Oct16) Register ¶
func (i Oct16) Register(registrator FieldRegistrator)
Register registers a field
type Oct32 ¶
type Oct32 string
Oct32 represents field of type oct32
func (Oct32) Register ¶
func (i Oct32) Register(registrator FieldRegistrator)
Register registers a field
type Oct64 ¶
type Oct64 string
Oct64 represents field of type oct64
func (Oct64) Register ¶
func (i Oct64) Register(registrator FieldRegistrator)
Register registers a field
type Str ¶
type Str string
Str represents field of type str
func (Str) Register ¶
func (i Str) Register(registrator FieldRegistrator)
Register registers a field
type String ¶
type String string
String represents field of type string
func (String) Register ¶
func (i String) Register(registrator FieldRegistrator)
Register registers a field
type TypeRegistration ¶
type TypeRegistration interface {
String() string
// contains filtered or unexported methods
}
TypeRegistration type registration view
type Uint ¶
type Uint string
Uint represents field of type uint
func (Uint) Register ¶
func (i Uint) Register(registrator FieldRegistrator)
Register registers a field
type Uint8 ¶
type Uint8 string
Uint8 represents field of type uint8
func (Uint8) Register ¶
func (i Uint8) Register(registrator FieldRegistrator)
Register registers a field
type Uint16 ¶
type Uint16 string
Uint16 represents field of type uint16
func (Uint16) Register ¶
func (i Uint16) Register(registrator FieldRegistrator)
Register registers a field
type Uint32 ¶
type Uint32 string
Uint32 represents field of type uint32
func (Uint32) Register ¶
func (i Uint32) Register(registrator FieldRegistrator)
Register registers a field
Source Files
¶
- builtin.go
- field.go
- fields_generator.go
- gen_bool.go
- gen_dec128.go
- gen_dec32.go
- gen_dec64.go
- gen_float32.go
- gen_float64.go
- gen_hex.go
- gen_hex16.go
- gen_hex32.go
- gen_hex64.go
- gen_hex8.go
- gen_int.go
- gen_int16.go
- gen_int32.go
- gen_int64.go
- gen_int8.go
- gen_oct.go
- gen_oct16.go
- gen_oct32.go
- gen_oct64.go
- gen_oct8.go
- gen_str.go
- gen_string.go
- gen_uint.go
- gen_uint16.go
- gen_uint32.go
- gen_uint64.go
- gen_uint8.go
- type_custom.go
- type_imported.go
- type_local.go
- type_registration.go