Documentation ¶
Overview ¶
Package meta provides functions for manipulating golang objects generically
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FullTypeName ¶
func FullTypeName(obj interface{}) string
FullTypeName returns the full type name of an object
func NameFromType ¶
NameFromType returns the full type name from a reflect.Type
func ShallowMerge ¶
func ShallowMerge(value1, value2 interface{}) (interface{}, error)
ShallowMerge merges value2 into value1 and return the result.
Non-zero field values in value2 override the corresponding values in value1.
Types ¶
type MarshalFunc ¶
MarshalFunc serializes data into an object
type Marshaler ¶
type Marshaler struct {
Struct MarshalFunc
}
Marshaler gives on custom on-the-side marshaling functions for specific golang object kinds.
type UnmarshalFunc ¶
UnmarshalFunc deserializes data into an object
type Unmarshaler ¶
type Unmarshaler struct {
Struct UnmarshalFunc
}
Unmarshaler gives on custom on-the-side unmarshaling functions for specific golang object kinds.
func (*Unmarshaler) Unmarshal ¶
func (a *Unmarshaler) Unmarshal(data []byte, obj interface{}) error
Unmarshal parses the JSON-encoded data and stores the result in the value pointed to by obj. Custom unmarshaling functions can be specified on the side.