Documentation ¶
Index ¶
- func DynMarshalBSON(_struct reflect.Value, extraFields map[string]interface{}, ...) ([]byte, error)
- func DynMarshalJSON(_struct reflect.Value, extraFields map[string]interface{}, ...) ([]byte, error)
- func DynUnmarshalBSON(data []byte, ptrStruct reflect.Value, extraFieldsPtr *map[string]interface{}, ...) error
- func DynUnmarshalJSON(data []byte, ptrStruct reflect.Value, extraFieldsPtr *map[string]interface{}, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DynMarshalBSON ¶
func DynMarshalBSON(_struct reflect.Value, extraFields map[string]interface{}, extraFieldsName string) ([]byte, error)
DynMarshalBSON return the BSON encoding of the dynamic struct _struct _struct contains the reflect.Value of the struct extraFields is the map that contains the extra fields extraFieldsName is the name of the field in the struct that contains the extra fields
func DynMarshalJSON ¶
func DynMarshalJSON(_struct reflect.Value, extraFields map[string]interface{}, extraFieldsName string) ([]byte, error)
DynMarshalJSON return the JSON encoding of the dynamic struct _struct _struct contains the reflect.Value of the struct extraFields is the map that contains the extra fields extraFieldsName is the name of the field in the struct that contains the extra fields
func DynUnmarshalBSON ¶
func DynUnmarshalBSON(data []byte, ptrStruct reflect.Value, extraFieldsPtr *map[string]interface{}, extraFieldsName string) error
DynUnmarshalBSON parses the BSON encoded data and store the result into ptrStruct. The fields that aren't part of the struct are set inside extraFieldsPtr data contains the BSON encoded rappresentation of the data ptrStruct contains a reflect.Value pointer to the struct extraFieldsPtr is the pointer to the extraFields map
func DynUnmarshalJSON ¶
func DynUnmarshalJSON(data []byte, ptrStruct reflect.Value, extraFieldsPtr *map[string]interface{}, extraFieldsName string) error
DynUnmarshalJSON parses the JSON encoded data and store the result into ptrStruct. The fields that aren't part of the struct are set inside extraFieldsPtr data contains the JSON encoded rappresentation of the data ptrStruct contains a reflect.Value pointer to the struct extraFieldsPtr is the pointer to the extraFields map
Types ¶
This section is empty.