MCPcopy Create free account

hub / github.com/bufbuild/protocompile / functions

Functions1,436 in github.com/bufbuild/protocompile

↓ 3 callersFunctionprotoStatname
(s int)
parser/proto.y.go:984
↓ 3 callersMethodputMessageNode
(m *descriptorpb.DescriptorProto, n ast.MessageDeclNode)
parser/result.go:959
↓ 3 callersFunctionreaderForTestdata
(t testing.TB, filename string)
parser/parser_test.go:973
↓ 3 callersFunctionremovePrefixIndent
(s string)
linker/linker_test.go:3963
↓ 3 callersMethodresolveExtensionType
(name string)
options/options.go:245
↓ 3 callersMethodsetFloat
(lval *protoSymType, val float64)
parser/lexer.go:431
↓ 3 callersFunctionsetMapEntry
( fld protoreflect.FieldDescriptor, msg protoreflect.Message, mapVal protoreflect.Map, entry protoreflect.
options/options.go:1472
↓ 3 callersFunctiontestByProtoc
(t *testing.T, files map[string]string, fileNames []string)
linker/linker_test.go:4501
↓ 3 callersMethodvalidateEnumValueFeatureSupport
( edition descriptorpb.Edition, enum protoreflect.EnumDescriptor, number protoreflect.EnumNumber, path []i
options/options.go:944
↓ 3 callersFunctionwriteToNull
(b *testing.B, fds *descriptorpb.FileDescriptorSet)
internal/benchmarks/benchmark_test.go:494
↓ 2 callersMethodAddComment
AddComment adds info about a comment to this file. Comments must first be added as items via f.AddToken(). The given comment argument is the Token fro
ast/file_info.go:128
↓ 2 callersMethodAddToken
AddToken adds info about a token at the given location to this file. It returns a value that allows access to all of the token's details.
ast/file_info.go:98
↓ 2 callersFunctionBinaryPath
BinaryPath returns the path to an appropriate protoc executable. This path is created by the Makefile, so run `make test` instead of `go test ./...` t
internal/protoc/protoc.go:36
↓ 2 callersMethodByDescriptor
(d protoreflect.Descriptor)
linker/descriptors.go:390
↓ 2 callersFunctionCanPack
CanPack returns true if a repeated field of the given kind can use packed encoding.
internal/util.go:224
↓ 2 callersFunctionCompile
Compile compiles the given files with protoc. The fileNames parameter indicates the order of files that should be used in the command line for protoc
internal/protoc/protoc.go:63
↓ 2 callersMethodDefaultEnumValue
()
linker/descriptors.go:1480
↓ 2 callersFunctionDescriptorProtosEnterAndExit
DescriptorProtosEnterAndExit walks all descriptor protos in the given file using a depth-first traversal, calling the given functions on entry and on
walk/walk.go:238
↓ 2 callersFunctionDescriptorsEnterAndExit
DescriptorsEnterAndExit walks all descriptors in the given file using a depth-first traversal, calling the given functions on entry and on exit for ea
walk/walk.go:67
↓ 2 callersMethodEdition
()
linker/descriptors.go:216
↓ 2 callersMethodEnumNode
EnumNode returns the AST node corresponding to the given enum. This can return nil, such as if the given enum is not part of the FileDescriptorProto h
parser/parser.go:180
↓ 2 callersMethodExtensionRangeNode
ExtensionRangeNode returns the AST node corresponding to the given extension range. This can return nil, such as if the given range is not part of the
parser/parser.go:163
↓ 2 callersMethodFieldDescriptorProto
()
protoutil/protos.go:156
↓ 2 callersMethodFindExtensionByNumber
FindExtensionByNumber returns the extension descriptor for the given tag that extends the given message name. If no such extension is defined in this
linker/files.go:44
↓ 2 callersMethodFirst
First returns the first element in the sequence. The bool return is false if this sequence contains no elements. For example, an empty file has no ite
ast/file_info.go:226
↓ 2 callersMethodFullName
()
linker/descriptors.go:1091
↓ 2 callersMethodGetGroupKeyword
()
ast/field.go:36
↓ 2 callersMethodGetSyntax
()
ast/no_source.go:69
↓ 2 callersMethodHasJSONName
()
linker/descriptors.go:1141
↓ 2 callersMethodHasOptionalKeyword
()
linker/descriptors.go:1188
↓ 2 callersMethodImport
Import populates the symbol table with all symbols/elements and extension tags present in the given file descriptor. If s is nil or if fd has already
linker/symbols.go:80
↓ 2 callersFunctionInterpretUnlinkedOptions
InterpretUnlinkedOptions does a best-effort attempt to interpret options in the given parsed result, returning an index that can be used to generate s
options/options.go:131
↓ 2 callersMethodIsAnyTypeReference
IsAnyTypeReference reports if this is an Any type reference.
ast/options.go:309
↓ 2 callersMethodIsPacked
()
linker/descriptors.go:1207
↓ 2 callersMethodItems
()
ast/file.go:131
↓ 2 callersMethodLast
Last returns the last element in the sequence. The bool return is false if this sequence contains no elements. For example, an empty file has no items
ast/file_info.go:235
↓ 2 callersFunctionLink
Link handles linking a parsed descriptor proto into a fully-linked descriptor. If the given parser.Result has imports, they must all be present in the
linker/linker.go:42
↓ 2 callersMethodMethods
()
linker/descriptors.go:1725
↓ 2 callersMethodName
()
linker/descriptors.go:1087
↓ 2 callersFunctionNewCompactOptionNode
NewCompactOptionNode creates a new *OptionNode for a full compact declaration (as used in fields, enum values, and extension ranges). All arguments mu
ast/options.go:99
↓ 2 callersFunctionNewCompactOptionsNode
NewCompactOptionsNode creates a *CompactOptionsNode. All args must be non-nil. The commas arg must have a length that is one less than the length of o
ast/options.go:342
↓ 2 callersFunctionNewEnumValueNode
NewEnumValueNode creates a new *EnumValueNode. All arguments must be non-nil except opts which is only non-nil if the declaration included options. -
ast/enum.go:134
↓ 2 callersFunctionNewExtensionFieldReferenceNode
NewExtensionFieldReferenceNode creates a new *FieldReferenceNode for an extension field. All args must be non-nil. The openSym and closeSym runes shou
ast/options.go:249
↓ 2 callersFunctionNewExtensionRangeNode
NewExtensionRangeNode creates a new *ExtensionRangeNode. All args must be non-nil except opts, which may be nil. - keyword: The token corresponding to
ast/ranges.go:46
↓ 2 callersFunctionNewFieldReferenceNode
NewFieldReferenceNode creates a new *FieldReferenceNode for a regular field. The name arg must not be nil.
ast/options.go:233
↓ 2 callersFunctionNewFileInfo
NewFileInfo creates a new instance for the given file.
ast/file_info.go:64
↓ 2 callersFunctionNewFileNodeWithEdition
NewFileNodeWithEdition creates a new *FileNode. The edition parameter is required. If a file has no edition declaration, use NewFileNode instead. Thi
ast/file.go:62
↓ 2 callersFunctionNewMessageFieldNode
NewMessageFieldNode creates a new *MessageFieldNode. All args except sep must be non-nil.
ast/values.go:493
↓ 2 callersFunctionNewNegativeIntLiteralNode
NewNegativeIntLiteralNode creates a new *NegativeIntLiteralNode. Both arguments must be non-nil.
ast/values.go:202
↓ 2 callersFunctionNewOptionNode
NewOptionNode creates a new *OptionNode for a full option declaration (as used in files, messages, oneofs, enums, services, and methods). All argument
ast/options.go:61
↓ 2 callersFunctionNewRPCTypeNode
NewRPCTypeNode creates a new *RPCTypeNode. All arguments must be non-nil except stream, which may be nil. - openParen: The token corresponding to the
ast/service.go:282
↓ 2 callersFunctionNewReservedRangesNode
NewReservedRangesNode creates a new *ReservedNode that represents reserved numeric ranges. All args must be non-nil. - keyword: The token correspondin
ast/ranges.go:251
↓ 2 callersFunctionNewRuneNode
NewRuneNode creates a new *RuneNode with the given properties.
ast/node.go:104
↓ 2 callersFunctionNewSyntheticMapField
NewSyntheticMapField creates a new *SyntheticMapField for the given identifier (either a key or value type in a map declaration) and tag number (1 for
ast/field.go:739
↓ 2 callersMethodOptionNamePartNode
OptionNamePartNode returns the AST node corresponding to the given name part for an uninterpreted option. This can return nil, such as if the given na
parser/parser.go:143
↓ 2 callersMethodParentFile
()
linker/resolve.go:803
↓ 2 callersFunctionProtoFromDescriptor
ProtoFromDescriptor extracts a descriptor proto from the given "rich" descriptor. For descriptors generated by the compiler, this is an inexpensive an
protoutil/protos.go:82
↓ 2 callersFunctionProtoFromMessageDescriptor
ProtoFromMessageDescriptor extracts a descriptor proto from the given "rich" descriptor. For message descriptors generated by the compiler, this is an
protoutil/protos.go:135
↓ 2 callersFunctionRemoveOption
(uo []*descriptorpb.UninterpretedOption, indexToRemove int)
internal/options.go:62
↓ 2 callersMethodReporterError
ReporterError returns the error returned by the handler's reporter. If the reporter has either not been invoked (no errors handled) or has not returne
reporter/reporter.go:214
↓ 2 callersFunctionResolveFeature
ResolveFeature resolves a feature for the given descriptor. This simple helper examines the given element and its ancestors, searching for an override
internal/editions/editions.go:83
↓ 2 callersFunctionScan
Scan scans the given reader, which should contain Protobuf source, and returns the set of imports declared in the file. The result also contains the v
parser/fastscan/fastscan.go:96
↓ 2 callersMethodServices
()
linker/descriptors.go:269
↓ 2 callersMethodStartValueAsInt32
(minVal, maxVal int32)
ast/ranges.go:192
↓ 2 callersFunctionStripSourceRetentionOptionsFromFile
StripSourceRetentionOptionsFromFile returns a file descriptor proto that omits any options in file that are defined to be retained only in source. If
options/source_retention_options.go:35
↓ 2 callersMethodSyntax
()
linker/descriptors.go:1083
↓ 2 callersFunctionWithStandardImports
WithStandardImports returns a new resolver that can provide the source code for the standard imports that are included with protoc. This differs from
wellknownimports/wellknownimports.go:44
↓ 2 callersMethodaccessFile
(path string)
resolver.go:157
↓ 2 callersMethodaddExtensions
(ext *ast.ExtendNode, flds *[]*descriptorpb.FieldDescriptorProto, msgs *[]*descriptorpb.DescriptorProto, synta
parser/result.go:266
↓ 2 callersMethodaddMessageBody
(msgd *descriptorpb.DescriptorProto, body *ast.MessageBody, syntax protoreflect.Syntax, handler *reporter.Hand
parser/result.go:580
↓ 2 callersMethodaddPath
(p sourcePath)
options/source_retention_options.go:115
↓ 2 callersMethodaddReservedNames
(names *[]string, node *ast.ReservedNode, syntax protoreflect.Syntax, handler *reporter.Handler, alreadyReserv
parser/result.go:532
↓ 2 callersMethodasEnumDescriptor
(en *ast.EnumNode, syntax protoreflect.Syntax, handler *reporter.Handler)
parser/result.go:489
↓ 2 callersFunctionasExtensionType
(ext protoreflect.ExtensionDescriptor)
internal/editions/editions.go:352
↓ 2 callersFunctionasLabel
(lbl *ast.FieldLabel)
parser/result.go:292
↓ 2 callersMethodasMessageDescriptor
(node *ast.MessageNode, syntax protoreflect.Syntax, handler *reporter.Handler, depth int)
parser/result.go:522
↓ 2 callersMethodattributeComments
(prevInfo, info ast.NodeInfo)
sourceinfo/source_code_info.go:786
↓ 2 callersFunctionbenchmarkGoogleapisProtoc
(b *testing.B, extraArgs ...string)
internal/benchmarks/benchmark_test.go:436
↓ 2 callersFunctionbenchmarkGoogleapisProtocompile
(b *testing.B, factory func() *protocompile.Compiler)
internal/benchmarks/benchmark_test.go:260
↓ 2 callersFunctionbenchmarkGoogleapisProtoparse
(b *testing.B, factory func() *protoparse.Parser)
internal/benchmarks/benchmark_test.go:296
↓ 2 callersFunctionbenchmarkProtocompile
(b *testing.B, c *protocompile.Compiler, sources []string)
internal/benchmarks/benchmark_test.go:266
↓ 2 callersFunctionbuildDescriptor
(name string, data []byte)
internal/featuresext/featuresext.go:67
↓ 2 callersFunctionbuildUninterpretedMapForEnum
(qual string, ed *descriptorpb.EnumDescriptorProto, opts map[string]interface{})
options/options_test.go:319
↓ 2 callersFunctioncanonicalEnumValueName
(enumValueName, enumName string)
linker/validate.go:744
↓ 2 callersFunctioncheckAttributesInFields
(t *testing.T, exp, actual protoreflect.ExtensionDescriptors, where string)
linker/descriptors_ext_test.go:142
↓ 2 callersMethodcommitFileLocked
(f protoreflect.FileDescriptor)
linker/symbols.go:403
↓ 2 callersMethodcompile
(ctx context.Context, file string)
compiler.go:261
↓ 2 callersMethodcompileLocked
(ctx context.Context, file string, explicitFile bool)
compiler.go:268
↓ 2 callersMethodcountElementsInEnums
(enums []*descriptorpb.EnumDescriptorProto)
linker/pool.go:126
↓ 2 callersMethodcreateEnums
(prefix string, parent protoreflect.Descriptor, enumProtos []*descriptorpb.EnumDescriptorProto, pool *allocPoo
linker/descriptors.go:654
↓ 2 callersMethodcreateExtensions
(prefix string, parent protoreflect.Descriptor, extProtos []*descriptorpb.FieldDescriptorProto, pool *allocPoo
linker/descriptors.go:919
↓ 2 callersFunctioncreateFieldRanges
(rangeProtos []T)
linker/descriptors.go:621
↓ 2 callersMethodcreateMessages
(prefix string, parent protoreflect.Descriptor, msgProtos []*descriptorpb.DescriptorProto, pool *allocPool)
linker/descriptors.go:406
↓ 2 callersMethodenumFieldValue
enumFieldValue resolves the given AST node val as an enum value descriptor. If the given value is not a valid identifier (or number if allowed), an er
options/options.go:1672
↓ 2 callersMethodenumFieldValueFromProto
enumFieldValueFromProto resolves the given uninterpreted option value as an enum value descriptor. If the given value is not a valid identifier, an er
options/options.go:1720
↓ 2 callersMethodfieldValue
fieldValue computes a compile-time value (constant or list or message literal) for the given AST node val. The value in val must be assignable to the
options/options.go:1622
↓ 2 callersFunctionfindImportSpan
(res parser.Result, dep string)
compiler.go:570
↓ 2 callersFunctionfindOption
(res hasOptionNode, handler errorHandler, scope string, opts []*descriptorpb.UninterpretedOption, name string,
internal/options.go:38
↓ 2 callersFunctionfindOptionSpan
( file ast.FileDeclNode, root ast.NodeWithOptions, md protoreflect.MessageDescriptor, path ...int32, )
linker/validate.go:931
↓ 2 callersFunctionfindReservedNameNode
(parent ast.Node, decls []T, name string)
parser/validate.go:298
← previousnext →301–400 of 1,436, ranked by callers