internal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package internal contains some code that should not be exported but needs to be shared across more than one of the protoreflect sub-packages.

Index

Constants

This section is empty.

Variables

View Source
var StdFileAliases = map[string]string{

	"google/protobuf/descriptor.proto":      "descriptor.proto",
	"google/protobuf/compiler/plugin.proto": "plugin.proto",
}

These are standard protos included with protoc, but older versions of their respective packages registered them using incorrect paths.

Functions

func DecodeFileDescriptor

func DecodeFileDescriptor(element string, fdb []byte) (*dpb.FileDescriptorProto, error)

DecodeFileDescriptor decodes the bytes of a registered file descriptor. Registered file descriptors are first "proto encoded" (e.g. binary format for the descriptor protos) and then gzipped. So this function gunzips and then unmarshals into a descriptor proto.

func LoadFileDescriptor

func LoadFileDescriptor(file string) (*dpb.FileDescriptorProto, error)

LoadFileDescriptor loads a registered descriptor and decodes it. If the given name cannot be loaded but is a known standard name, an alias will be tried, so the standard files can be loaded even if linked against older "known bad" versions of packages.

Types

This section is empty.

Directories

Path Synopsis
Package testprotos is a generated protocol buffer package.
Package testprotos is a generated protocol buffer package.
nopkg
Package nopkg is a generated protocol buffer package.
Package nopkg is a generated protocol buffer package.
pkg
Package pkg is a generated protocol buffer package.
Package pkg is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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