Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var JSONPBUnmarshaler = jsonpb.Unmarshaler{AllowUnknownFields: true}
JSONPBUnmarshaler unmarshals JSON into proto messages.
Functions ¶
func MapToStruct ¶
MapToStruct constructs a Struct from the given map[string]interface{}. The map keys must be valid UTF-8. The map values can be any of Go's basic types (bool, string, number type, byte, or rune), a proto message (in the form protoreflect.ProtoMessage), or a nested map[string]interface{} that fulfils the same requirements recursively.
NOTE: This function is just a modified version of structpb.NewStruct(), with added logic to handle the case where the map value is a proto message. This is necessary because Buildbucket request interfaces are almost always implemented as proto messages at some level.
func ToKeyvalSlice ¶
ToKeyvalSlice converts a key-val map to a slice of "key:val" strings.
Types ¶
This section is empty.