Documentation ¶
Index ¶
- Constants
- Variables
- func UnwrapTestValue(v any) any
- type GVFloat
- type GVIdentity
- type GVInt
- type GVNil
- type GVString
- type GVStruct
- func (v GVStruct) Equal(w GValue) bool
- func (v GVStruct) GetField(f string) (GValue, any, error)
- func (v GVStruct) HasField(f string) bool
- func (v GVStruct) Hash() uint64
- func (v GVStruct) RType() reflect.Type
- func (v GVStruct) ToGoValue() any
- func (GVStruct) Type() GValueType
- func (v GVStruct) Value() any
- type GVUint
- type GValue
- type GValueType
- type TypeInfo
Constants ¶
View Source
const FieldID = "__ID__"
View Source
const FieldSelf = "__Self__"
Variables ¶
View Source
var ErrFieldNotFound = errors.New("field not found")
Functions ¶
func UnwrapTestValue ¶
Types ¶
type GVIdentity ¶
type GVIdentity string
func (GVIdentity) Equal ¶
func (v GVIdentity) Equal(w GValue) bool
func (GVIdentity) Hash ¶
func (v GVIdentity) Hash() uint64
func (GVIdentity) RType ¶
func (v GVIdentity) RType() reflect.Type
func (GVIdentity) ToGoValue ¶
func (v GVIdentity) ToGoValue() any
func (GVIdentity) Type ¶
func (GVIdentity) Type() GValueType
type GVStruct ¶
type GVStruct struct {
V any // the actual struct
}
func NewGVStruct ¶
func (GVStruct) GetField ¶
GetField extract field value by field name `f`, wrap it into TestValue and return it
func (GVStruct) Type ¶
func (GVStruct) Type() GValueType
type GValueType ¶
type GValueType uint8
const ( GValueTypeUnknown GValueType = iota GValueTypeNil GValueTypeIdentity GValueTypeInt GValueTypeUint GValueTypeFloat GValueTypeString GValueTypeStruct )
TestValueType
func (GValueType) RType ¶
func (t GValueType) RType() reflect.Type
func (GValueType) String ¶
func (t GValueType) String() string
Click to show internal directories.
Click to hide internal directories.