ptypes

package
v0.0.50 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: Apache-2.0, NCSA Imports: 5 Imported by: 7

Documentation

Overview

Package ptypes is a thin wrapper around the golang.org/protobuf/ptypes package that adds support for Kythe message types, and handles some type format conversions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalAny

func MarshalAny(pb proto.Message) (*anypb.Any, error)

MarshalAny converts pb to a google.protobuf.Any message, fixing the URLs of Kythe protobuf types as needed.

func SortByTypeURL added in v0.0.27

func SortByTypeURL(msgs []*anypb.Any)

SortByTypeURL orders a slice of Any messages by their type URL, modifying the argument slice in-place.

func UnmarshalAny added in v0.0.27

func UnmarshalAny(any *anypb.Any, pb proto.Message) error

UnmarshalAny unmarshals a google.protobuf.Any message into pb. This is an alias for ptypes.UnmarshalAny to save an import.

Types

type Any added in v0.0.30

type Any = anypb.Any

Any is an alias for the protocol buffer Any message type.

Jump to

Keyboard shortcuts

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