package
2.0.0-beta.2
Repository: https://github.com/jhump/protoreflect.git
Documentation: pkg.go.dev

# Packages

# Functions

Combine returns a resolver that iterates through the given resolvers to find elements.
CombinePools is just like Combine, except that the returned value provides am AsTypePool() method that returns a TypePool that iterates through the TypePools of the given resolvers to find and enumerate elements.
ExtensionType returns a [protoreflect.ExtensionType] for the given descriptor.
FindDescriptorByNameInFile searches the given file for the element with the given fully-qualified name.
FindExtensionByNumber searches the given descriptor pool for the requested extension.
FindExtensionByNumberInFile searches all extension in the given file for the requested extension.
FromFileDescriptorSet constructs a *Registry from the given file descriptor set.
FromFiles returns a new registry that wraps the given files.
KindOf returns the DescriptorKind of the given descriptor d.
NewNotFoundError returns an error that wraps ErrNotFound with context indicating the given name as the element that could not be found.
NewProtoOracle returns a value that can recover all kinds of descriptor proto messages given a function for recovering the file descriptor proto from a [protoreflect.FileDescriptor].
NewUnexpectedTypeError constructs a new *ErrUnexpectedType based on the given properties.
RangeExtensionsByMessage enumerates all extensions in the given descriptor pool that extend the given message.
RegisterTypesInFile registers all the types (with kinds that match kindMask) with the given registry.
RegisterTypesInFileRecursive registers all the types (with kinds that match kindMask) with the given registry, for the given file and all of its transitive dependencies (i.e.
RegisterTypesInFilesRecursive registers all the types (with kinds that match kindMask) with the given registry, for all files in the given pool and their dependencies.
ResolverFromPool implements the full Resolver interface on top of the given DescriptorPool.
ResolverFromPools (plural) is just like ResolverFromPool (singular) except it also accepts a TypePool that is used to implement the AsTypeResolver method.
TypeNameFromURL extracts the fully-qualified type name from the given URL.
TypesFromDescriptorPool adapts a descriptor pool into a pool that returns types.
TypesFromResolver adapts a resolver that returns descriptors into a resolver that returns types.

# Constants

The various supported DescriptorKind values.
The various supported DescriptorKind values.
The various supported DescriptorKind values.
The various supported DescriptorKind values.
The various supported DescriptorKind values.
The various supported DescriptorKind values.
The various supported DescriptorKind values.
The various supported DescriptorKind values.
The various supported DescriptorKind values.
The various supported DescriptorKind values.
The various supported TypeKind values.
The various supported TypeKind values.
The various supported TypeKind values.
TypeKindsAll is a bitmask that represents all types.
TypeKindsSerialization includes the kinds of types needed for serialization and de-serialization: messages (for interpreting google.protobuf.Any messages) and extensions.

# Variables

ErrNotFound is a sentinel error that is returned from resolvers to indicate that the named element is not known to the registry.
GlobalDescriptors provides a view of protoregistry.GlobalFiles and protoregistry.GlobalTypes as a Resolver.

# Structs

ErrUnexpectedType is an error that indicates a descriptor was resolved for a given URL or name, but it is of the wrong type.
Registry implements the full Resolver interface defined in this package.

# Interfaces

DependencyResolver can resolve dependencies, which is needed when constructing a [protoreflect.FileDescriptor] from a FileDescriptorProto.
DescriptorPool is a FilePool that also functions as a DescriptorResolver.
DescriptorRegistry is a file and descriptor resolver that allows the caller to add files (and their contained descriptors) to the set of files and descriptors it can resolve.
DescriptorResolver can resolve descriptors by full name.
EnumTypeResolver can resolve enum types.
ExtensionPool is an ExtensionResolver that also allows iteration over all extensions for a message.
ExtensionResolver can resolve extensions based on the containing message name and field number.
ExtensionTypeResolver can resolve extension types.
FilePool is a FileResolver that also allows iteration over the known file descriptors.
FileResolver can resolve file descriptors by path.
MessageResolver can resolve messages based on their name or a type URL.
MessageTypeResolver can resolve message types.
ProtoFileOracle can recover a [*descriptorpb.FileDescriptorProto] for a given [protoreflect.FileDescriptor].
ProtoFileRegistry is a registry of descriptors that can work directly with descriptor protos.
ProtoOracle has methods for recovering descriptor proto messages that correspond to given [protoreflect.Descriptor] instances.
Resolver is a comprehensive resolver interface with methods for resolving all kinds of descriptors.
SerializationResolver is a named interface that can be used as a resolver for various marshalling and unmarshalling operations.
TypeContainer is a descriptor that contains types.
TypePool is a type resolver that allows for iteration over all known types.
TypeRegistry is a type resolver that allows the caller to add elements to the set of types it can resolve.
TypeResolver can resolve all types: extensions, messages, and enums.

# Type aliases

DescriptorKind represents the kind of a descriptor.
TypeKind represents a category of types that can be registered in a TypeRegistry.