Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSON ¶
func JSON(v interface{}, um field_mask.FieldMask) ([]byte, error)
JSON helper function to return JSON from a struct and field mask.
func JSONIndent ¶
func JSONIndent(v interface{}, um field_mask.FieldMask, indent string) ([]byte, error)
JSONIndent helper function to return indented JSON from a struct and field mask.
func MapStringInterface ¶
func MapStringInterface(v interface{}, um field_mask.FieldMask) (interface{}, error)
MapStringInterface return map[string]interface from a struct and field mask.
Field mask represents the path to a field inside a message, each '.' separates a sub-field.
paths: "a.b.d"
Would apply to:
{ "a": { "b": { "d": "value" } } }
Field masks are used for either get or update operations where you only want to return or update a subset of the fields.
If the field mask is empty all fields should be returned.
When you have multiple items with the same path inside a message a field mask will apply to all of them.
paths: "a.b"
Would apply to:
{ "a": [ { "b": "value" }, { "b": "value" } ] }
Specifying a slice or map will include all sub-fields.
paths: "a"
Would apply to all fields.
Types ¶
This section is empty.