istio: istio.io/istio/pkg/util/protomarshal Index | Files

package protomarshal

import "istio.io/istio/pkg/util/protomarshal"

Index

Package Files

protomarshal.go

func ApplyJSON Uses

func ApplyJSON(js string, pb proto.Message) error

ApplyJSON unmarshals a JSON string into a proto message.

func ApplyJSONStrict Uses

func ApplyJSONStrict(js string, pb proto.Message) error

ApplyJSONStrict unmarshals a JSON string into a proto message.

func ApplyYAML Uses

func ApplyYAML(yml string, pb proto.Message) error

ApplyYAML unmarshals a YAML string into a proto message. Unknown fields are allowed.

func ShallowCopy Uses

func ShallowCopy(src protoV2.Message) protoV2.Message

TODO(https://github.com/golang/protobuf/issues/1155) switch to upstream implementation

func ToJSON Uses

func ToJSON(msg proto.Message) (string, error)

ToJSON marshals a proto to canonical JSON

func ToJSONMap Uses

func ToJSONMap(msg proto.Message) (map[string]interface{}, error)

ToJSONMap converts a proto message to a generic map using canonical JSON encoding JSON encoding is specified here: https://developers.google.com/protocol-buffers/docs/proto3#json

func ToJSONWithIndent Uses

func ToJSONWithIndent(msg proto.Message, indent string) (string, error)

ToJSONWithIndent marshals a proto to canonical JSON with pretty printed string

func ToYAML Uses

func ToYAML(msg proto.Message) (string, error)

ToYAML marshals a proto to canonical YAML

Package protomarshal imports 9 packages (graph) and is imported by 4 packages. Updated 2020-10-20. Refresh now. Tools for package owners.