Documentation ¶
Overview ¶
Package pbutils provides helper utilities for working with protobuf objects. These utilities are mostly aimed at testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FuzzUnmarshaler ¶
func FuzzUnmarshaler(unmarshaler pb.Unmarshaler)
FuzzUnmarshaler tests given unmarshaler with random bytes.
func RoundTrip ¶
func RoundTrip( marshaler pb.Marshaler, unmarshaler pb.Unmarshaler, ) error
RoundTrip takes a marshaler and unmarshaler, marshals the marshaler, and then unmarshals the result into the unmarshaler. If either procedure errors out, it returns an error; otherwise it returns nil and the unmarshaler is left with the results of the round-trip.
This is a utility meant to facilitate tests that verify round-trip marshaling of objects with custom protobuf marshaling.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.