protoutils

package
v0.21.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2022 License: Apache-2.0 Imports: 8 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapStringInterfaceToMapStringString

func MapStringInterfaceToMapStringString(interfaceMap map[string]interface{}) (map[string]string, error)

reverse of previous

func MapStringStringToMapStringInterface

func MapStringStringToMapStringInterface(stringMap map[string]string) (map[string]interface{}, error)

ilackarms: help come up with a better name for this please values in stringMap are yaml encoded or error used by configmap resource client

func MarshalBytes

func MarshalBytes(pb proto.Message) ([]byte, error)

func MarshalBytesEmitZeroValues

func MarshalBytesEmitZeroValues(pb proto.Message) ([]byte, error)

func MarshalMap

func MarshalMap(from proto.Message) (map[string]interface{}, error)

func MarshalMapEmitZeroValues

func MarshalMapEmitZeroValues(from proto.Message) (map[string]interface{}, error)

func MarshalStruct

func MarshalStruct(m proto.Message) (*types.Struct, error)

this function is designed for converting go object (that is not a proto.Message) into a pb Struct, based on json struct tags

func MarshalStructEmitZeroValues

func MarshalStructEmitZeroValues(m proto.Message) (*types.Struct, error)

func UnmarshalBytes

func UnmarshalBytes(data []byte, into proto.Message) error

func UnmarshalMap

func UnmarshalMap(m map[string]interface{}, into proto.Message) error

func UnmarshalStruct

func UnmarshalStruct(structuredData *types.Struct, into interface{}) error

func UnmarshalYaml

func UnmarshalYaml(data []byte, into proto.Message) error

func UnmarshalYamlAllowUnknown

func UnmarshalYamlAllowUnknown(data []byte, into proto.Message) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL