internal
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package internal contains code that is shared by both reflection package andthe test package. The packages are split in this way inorder to avoiddependency to deprecated package github.com/golang/protobuf.
Index¶
- func V1AlphaToV1Request(v1alpha *v1alphareflectionpb.ServerReflectionRequest) *v1reflectionpb.ServerReflectionRequest
- func V1AlphaToV1Response(v1alpha *v1alphareflectionpb.ServerReflectionResponse) *v1reflectionpb.ServerReflectionResponse
- func V1ToV1AlphaRequest(v1 *v1reflectionpb.ServerReflectionRequest) *v1alphareflectionpb.ServerReflectionRequest
- func V1ToV1AlphaResponse(v1 *v1reflectionpb.ServerReflectionResponse) *v1alphareflectionpb.ServerReflectionResponse
- type ExtensionResolver
- type ServerReflectionServer
- func (s *ServerReflectionServer) AllExtensionNumbersForTypeName(name string) ([]int32, error)
- func (s *ServerReflectionServer) FileDescEncodingContainingExtension(typeName string, extNum int32, sentFileDescriptors map[string]bool) ([][]byte, error)
- func (s *ServerReflectionServer) FileDescEncodingContainingSymbol(name string, sentFileDescriptors map[string]bool) ([][]byte, error)
- func (s *ServerReflectionServer) FileDescWithDependencies(fd protoreflect.FileDescriptor, sentFileDescriptors map[string]bool) ([][]byte, error)
- func (s *ServerReflectionServer) ListServices() []*v1reflectionpb.ServiceResponse
- func (s *ServerReflectionServer) ServerReflectionInfo(stream v1reflectiongrpc.ServerReflection_ServerReflectionInfoServer) error
- type ServiceInfoProvider
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
funcV1AlphaToV1Request¶
func V1AlphaToV1Request(v1alpha *v1alphareflectionpb.ServerReflectionRequest) *v1reflectionpb.ServerReflectionRequest
V1AlphaToV1Request converts a v1alpha ServerReflectionRequest to a v1.
funcV1AlphaToV1Response¶
func V1AlphaToV1Response(v1alpha *v1alphareflectionpb.ServerReflectionResponse) *v1reflectionpb.ServerReflectionResponse
V1AlphaToV1Response converts a v1alpha ServerReflectionResponse to a v1.
funcV1ToV1AlphaRequest¶
func V1ToV1AlphaRequest(v1 *v1reflectionpb.ServerReflectionRequest) *v1alphareflectionpb.ServerReflectionRequest
V1ToV1AlphaRequest converts a v1 ServerReflectionRequest to a v1alpha.
funcV1ToV1AlphaResponse¶
func V1ToV1AlphaResponse(v1 *v1reflectionpb.ServerReflectionResponse) *v1alphareflectionpb.ServerReflectionResponse
V1ToV1AlphaResponse converts a v1 ServerReflectionResponse to a v1alpha.
Types¶
typeExtensionResolver¶
type ExtensionResolver interface {protoregistry.ExtensionTypeResolverRangeExtensionsByMessage(messageprotoreflect.FullName, f func(protoreflect.ExtensionType)bool)}ExtensionResolver is the interface used to query details about extensions.This interface is satisfied by protoregistry.GlobalTypes.
typeServerReflectionServer¶
type ServerReflectionServer struct {v1alphareflectiongrpc.UnimplementedServerReflectionServerSServiceInfoProviderDescResolverprotodesc.ResolverExtResolverExtensionResolver}ServerReflectionServer is the server API for ServerReflection service.
func (*ServerReflectionServer)AllExtensionNumbersForTypeName¶
func (s *ServerReflectionServer) AllExtensionNumbersForTypeName(namestring) ([]int32,error)
AllExtensionNumbersForTypeName returns all extension numbers for the given type.
func (*ServerReflectionServer)FileDescEncodingContainingExtension¶
func (s *ServerReflectionServer) FileDescEncodingContainingExtension(typeNamestring, extNumint32, sentFileDescriptors map[string]bool) ([][]byte,error)
FileDescEncodingContainingExtension finds the file descriptor containinggiven extension, finds all of its previously unsent transitive dependencies,does marshalling on them, and returns the marshalled result.
func (*ServerReflectionServer)FileDescEncodingContainingSymbol¶
func (s *ServerReflectionServer) FileDescEncodingContainingSymbol(namestring, sentFileDescriptors map[string]bool) ([][]byte,error)
FileDescEncodingContainingSymbol finds the file descriptor containing thegiven symbol, finds all of its previously unsent transitive dependencies,does marshalling on them, and returns the marshalled result. The given symbolcan be a type, a service or a method.
func (*ServerReflectionServer)FileDescWithDependencies¶
func (s *ServerReflectionServer) FileDescWithDependencies(fdprotoreflect.FileDescriptor, sentFileDescriptors map[string]bool) ([][]byte,error)
FileDescWithDependencies returns a slice of serialized fileDescriptors inwire format ([]byte). The fileDescriptors will include fd and all thetransitive dependencies of fd with names not in sentFileDescriptors.
func (*ServerReflectionServer)ListServices¶
func (s *ServerReflectionServer) ListServices() []*v1reflectionpb.ServiceResponse
ListServices returns the names of services this server exposes.
func (*ServerReflectionServer)ServerReflectionInfo¶
func (s *ServerReflectionServer) ServerReflectionInfo(streamv1reflectiongrpc.ServerReflection_ServerReflectionInfoServer)error
ServerReflectionInfo is the reflection service handler.
typeServiceInfoProvider¶
type ServiceInfoProvider interface {GetServiceInfo() map[string]grpc.ServiceInfo}ServiceInfoProvider is an interface used to retrieve metadata about theservices to expose.