Documentation ¶
Index ¶
- Variables
- func FormatIDList(ids []ID) (string, error)
- func Init(encode func(ID) string, decode func(string) (ID, error))
- func IsPrimitiveType(v interface{}) bool
- func IsSameType(a interface{}, b interface{}) bool
- func ParseInt64List(str string) ([]int64, error)
- func ZeroValue(v interface{}) interface{}
- type Any
- type AnySlice
- type Bool
- type BoolSlice
- type Byte
- type ByteSlice
- type Comparable
- type ComparableSlice
- type Float32
- type Float32Slice
- type Float64
- type Float64Slice
- type ID
- type Int
- type Int16
- type Int16Slice
- type Int32
- type Int32Slice
- type Int64
- type Int64Slice
- type Int8
- type Int8Slice
- type IntSlice
- type Interface
- type InterfaceSlice
- type Ordering
- type String
- type StringSlice
- type TypeId
- type Uint
- type Uint16
- type Uint16Slice
- type Uint32
- type Uint32Slice
- type Uint64
- type Uint64Slice
- type Uint8
- type Uint8Slice
- type UintSlice
Constants ¶
This section is empty.
Variables ¶
View Source
var Type = typeof{}
Functions ¶
func FormatIDList ¶
func IsPrimitiveType ¶
func IsPrimitiveType(v interface{}) bool
IsPrimitiveType return whether type of v is primitive type or not.
func IsSameType ¶
func IsSameType(a interface{}, b interface{}) bool
IsSameType check a's runtime type equal b's runtime type
func ParseInt64List ¶
Types ¶
type Comparable ¶
type Comparable interface{ Compare(o Comparable) Ordering }
type ComparableSlice ¶
type ComparableSlice = []Comparable
type Float32Slice ¶
type Float32Slice = []float32
type Float64Slice ¶
type Float64Slice = []float64
type ID ¶
type ID int64
ID is int64, useful for some convenient transform case. Example:
json api, to protect real id, developer can embed this ID into a struct to do automatically transform int64 to string with encrypt.
func ParseIDList ¶
func (ID) MarshalJSON ¶
func (ID) MarshalText ¶
func (*ID) UnmarshalJSON ¶
func (*ID) UnmarshalText ¶
type Int16Slice ¶
type Int16Slice = []int16
type Int32Slice ¶
type Int32Slice = []int32
type Int64Slice ¶
type Int64Slice = []int64
type InterfaceSlice ¶
type InterfaceSlice = AnySlice
type String ¶
type String string
func (String) Compare ¶
func (i String) Compare(o Comparable) Ordering
type StringSlice ¶
type StringSlice = []string
type Uint16 ¶
type Uint16 uint16
func (Uint16) Compare ¶
func (i Uint16) Compare(o Comparable) Ordering
type Uint16Slice ¶
type Uint16Slice = []uint16
type Uint32 ¶
type Uint32 uint32
func (Uint32) Compare ¶
func (i Uint32) Compare(o Comparable) Ordering
type Uint32Slice ¶
type Uint32Slice = []uint32
type Uint64 ¶
type Uint64 uint
func (Uint64) Compare ¶
func (i Uint64) Compare(o Comparable) Ordering
type Uint64Slice ¶
type Uint64Slice = []uint64
type Uint8Slice ¶
type Uint8Slice = []uint8
Click to show internal directories.
Click to hide internal directories.