utils

package
v0.0.0-...-22ee8c0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalJSONAny

func MarshalJSONAny(m codec.JSONCodec, msg proto.Message) ([]byte, error)

MarshalJSONAny is a convenience function for packing the provided value in an Any and then proto marshaling it to bytes

func UnmarshalJSONAny

func UnmarshalJSONAny(m codec.Codec, iface interface{}, bz []byte) error

UnmarshalJSONAny is a convenience function for proto unmarshaling an Any from bz and then unpacking it to the interface pointer passed in as iface using the provided AnyUnpacker or returning an error

Ex:

var x MyInterface
err := UnmarshalJSONAny(unpacker, &x, bz)

Types

This section is empty.

Jump to

Keyboard shortcuts

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