Involved Source Files Package protodesc provides functionality for converting
FileDescriptorProto messages to/from [protoreflect.FileDescriptor] values.
The google.protobuf.FileDescriptorProto is a protobuf message that describes
the type information for a .proto file in a form that is easily serializable.
The [protoreflect.FileDescriptor] is a more structured representation of
the FileDescriptorProto message where references and remote dependencies
can be directly followed.desc_init.godesc_resolve.godesc_validate.goeditions.goproto.go
Package-Level Type Names (total 2)
/* sort by: | */
FileOptions configures the construction of file descriptors. AllowUnresolvable configures New to permissively allow unresolvable
file, enum, or message dependencies. Unresolved dependencies are replaced
by placeholder equivalents.
The following dependencies may be left unresolved:
• Resolving an imported file.
• Resolving the type for a message field or extension field.
If the kind of the field is unknown, then a placeholder is used for both
the Enum and Message accessors on the protoreflect.FieldDescriptor.
• Resolving an enum value set as the default for an optional enum field.
If unresolvable, the protoreflect.FieldDescriptor.Default is set to the
first value in the associated enum (or zero if the also enum dependency
is also unresolvable). The protoreflect.FieldDescriptor.DefaultEnumValue
is populated with a placeholder.
• Resolving the extended message type for an extension field.
• Resolving the input or output message type for a service method.
If the unresolved dependency uses a relative name,
then the placeholder will contain an invalid FullName with a "*." prefix,
indicating that the starting prefix of the full name is unknown.NoUnkeyedLiteralspragma.NoUnkeyedLiterals New creates a new [protoreflect.FileDescriptor] from the provided
file descriptor message. The file must represent a valid proto file according
to protobuf semantics. The returned descriptor is a deep copy of the input.
Any imported files, enum types, or message types referenced in the file are
resolved using the provided registry. When looking up an import file path,
the path must be unique. The newly created file descriptor is not registered
back into the provided file registry. NewFiles creates a new [protoregistry.Files] from the provided
FileDescriptorSet message. The descriptor set must include only
valid files according to protobuf semantics. The returned descriptors
are a deep copy of the input.
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.