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: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxTag = 536870911 // 2^29 - 1

	SpecialReservedStart = 19000
	SpecialReservedEnd   = 19999

	// NB: It would be nice to use constants from generated code instead of hard-coding these here.
	// But code-gen does not emit these as constants anywhere. The only places they appear in generated
	// code are struct tags on fields of the generated descriptor protos.
	File_packageTag           = 2
	File_dependencyTag        = 3
	File_messagesTag          = 4
	File_enumsTag             = 5
	File_servicesTag          = 6
	File_extensionsTag        = 7
	File_optionsTag           = 8
	File_syntaxTag            = 12
	Message_nameTag           = 1
	Message_fieldsTag         = 2
	Message_nestedMessagesTag = 3
	Message_enumsTag          = 4
	Message_extensionRangeTag = 5
	Message_extensionsTag     = 6
	Message_optionsTag        = 7
	Message_oneOfsTag         = 8
	Message_reservedRangeTag  = 9
	Message_reservedNameTag   = 10
	ExtensionRange_startTag   = 1
	ExtensionRange_endTag     = 2
	ExtensionRange_optionsTag = 3
	ReservedRange_startTag    = 1
	ReservedRange_endTag      = 2
	Field_nameTag             = 1
	Field_extendeeTag         = 2
	Field_numberTag           = 3
	Field_labelTag            = 4
	Field_typeTag             = 5
	Field_defaultTag          = 7
	Field_optionsTag          = 8
	Field_jsonNameTag         = 10
	OneOf_nameTag             = 1
	OneOf_optionsTag          = 2
	Enum_nameTag              = 1
	Enum_valuesTag            = 2
	Enum_optionsTag           = 3
	EnumVal_nameTag           = 1
	EnumVal_numberTag         = 2
	EnumVal_optionsTag        = 3
	Service_nameTag           = 1
	Service_methodsTag        = 2
	Service_optionsTag        = 3
	Method_nameTag            = 1
	Method_inputTag           = 2
	Method_outputTag          = 3
	Method_optionsTag         = 4
	Method_inputStreamTag     = 5
	Method_outputStreamTag    = 6

	// All *Options messages use the same tag for the field
	// that stores uninterpreted options
	UninterpretedOptionsTag = 999

	Uninterpreted_nameTag      = 2
	Uninterpreted_identTag     = 3
	Uninterpreted_posIntTag    = 4
	Uninterpreted_negIntTag    = 5
	Uninterpreted_doubleTag    = 6
	Uninterpreted_stringTag    = 7
	Uninterpreted_aggregateTag = 8
	UninterpretedName_nameTag  = 1
)

Variables

This section is empty.

Functions

func CreatePrefixList

func CreatePrefixList(pkg string) []string

CreatePrefixList returns a list of package prefixes to search when resolving a symbol name. If the given package is blank, it returns only the empty string. If the given package contains only one token, e.g. "foo", it returns that token and the empty string, e.g. ["foo", ""]. Otherwise, it returns successively shorter prefixes of the package and then the empty string. For example, for a package named "foo.bar.baz" it will return the following list:

["foo.bar.baz", "foo.bar", "foo", ""]

func InitCap

func InitCap(name string) string

func JsonName

func JsonName(name string) string

Types

type SourceInfoMap

type SourceInfoMap map[string]*dpb.SourceCodeInfo_Location

func CreateSourceInfoMap

func CreateSourceInfoMap(fd *dpb.FileDescriptorProto) SourceInfoMap

func (SourceInfoMap) Get

func (SourceInfoMap) Put

func (m SourceInfoMap) Put(path []int32, loc *dpb.SourceCodeInfo_Location)

func (SourceInfoMap) PutIfAbsent

func (m SourceInfoMap) PutIfAbsent(path []int32, loc *dpb.SourceCodeInfo_Location) bool

Jump to

Keyboard shortcuts

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