protocod

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeAny

func DecodeAny(value *any.Any, cache *QnameCache) (*dymessage.Entity, error)

EncodeAny encodes provided Protocol Buffer's Any type to dynamic entity. If the type URL of provided value doesn't represent a type, known to Encoder, the method will return an error.

func EncodeAny

func EncodeAny(value *dymessage.Entity, cache *QnameCache) (*any.Any, error)

EncodeAny encodes provided dynamic entity to Protocol Buffer's Any type. If the type of the entity doesn't belong to the registry, provided during creation of Encoder, the method will panic.

Types

type QnameCache

type QnameCache struct {
	// contains filtered or unexported fields
}

Provides the fast lookup of the message definitions by its qualified names for the purpose of encoding and decoding the dynamic messages.

func NewQnameCache

func NewQnameCache(reg *dymessage.Registry) *QnameCache

Jump to

Keyboard shortcuts

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