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 ApplyYAML Uses

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

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

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 7 packages (graph) and is imported by 5 packages. Updated 2019-09-28. Refresh now. Tools for package owners.