Versions in this module Expand all Collapse all v1 v1.8.8 Apr 3, 2022 Changes in this version + const FormatJSON + const FormatText + var ErrReflectionNotSupported = errors.New("server does not support the reflection API") + func AnyResolverFromDescriptorSource(source DescriptorSource) jsonpb.AnyResolver + func AnyResolverFromDescriptorSourceWithFallback(source DescriptorSource) jsonpb.AnyResolver + func BlockingDial(ctx context.Context, network, address string, ...) (*grpc.ClientConn, error) + func ClientTLSConfig(insecureSkipVerify bool, cacertFile, clientCertFile, clientKeyFile string) (*tls.Config, error) + func ClientTransportCredentials(insecureSkipVerify bool, cacertFile, clientCertFile, clientKeyFile string) (credentials.TransportCredentials, error) + func EnsureExtensions(source DescriptorSource, msg proto.Message) proto.Message + func ExpandHeaders(headers []string) ([]string, error) + func GetAllFiles(source DescriptorSource) ([]*desc.FileDescriptor, error) + func GetDescriptorText(dsc desc.Descriptor, _ DescriptorSource) (string, error) + func InvokeRPC(ctx context.Context, source DescriptorSource, ch grpcdynamic.Channel, ...) error + func InvokeRpc(ctx context.Context, source DescriptorSource, cc *grpc.ClientConn, ...) error + func ListMethods(source DescriptorSource, serviceName string) ([]string, error) + func ListServices(source DescriptorSource) ([]string, error) + func MakeTemplate(md *desc.MessageDescriptor) proto.Message + func MetadataFromHeaders(headers []string) metadata.MD + func MetadataToString(md metadata.MD) string + func PrintStatus(w io.Writer, stat *status.Status, formatter Formatter) + func RequestParserAndFormatter(format Format, descSource DescriptorSource, in io.Reader, opts FormatOptions) (RequestParser, Formatter, error) + func RequestParserAndFormatterFor(format Format, descSource DescriptorSource, ...) (RequestParser, Formatter, error) + func ServerTransportCredentials(cacertFile, serverCertFile, serverKeyFile string, requireClientCerts bool) (credentials.TransportCredentials, error) + func WriteProtoset(out io.Writer, descSource DescriptorSource, symbols ...string) error + type DefaultEventHandler struct + Formatter Formatter + NumResponses int + Out io.Writer + Status *status.Status + VerbosityLevel int + func NewDefaultEventHandler(out io.Writer, descSource DescriptorSource, formatter Formatter, verbose bool) *DefaultEventHandler + func (h *DefaultEventHandler) OnReceiveHeaders(md metadata.MD) + func (h *DefaultEventHandler) OnReceiveResponse(resp proto.Message) + func (h *DefaultEventHandler) OnReceiveTrailers(stat *status.Status, md metadata.MD) + func (h *DefaultEventHandler) OnResolveMethod(md *desc.MethodDescriptor) + func (h *DefaultEventHandler) OnSendHeaders(md metadata.MD) + type DescriptorSource interface + AllExtensionsForType func(typeName string) ([]*desc.FieldDescriptor, error) + FindSymbol func(fullyQualifiedName string) (desc.Descriptor, error) + ListServices func() ([]string, error) + func DescriptorSourceFromFileDescriptorSet(files *descriptorpb.FileDescriptorSet) (DescriptorSource, error) + func DescriptorSourceFromFileDescriptors(files ...*desc.FileDescriptor) (DescriptorSource, error) + func DescriptorSourceFromProtoFiles(importPaths []string, fileNames ...string) (DescriptorSource, error) + func DescriptorSourceFromProtoSets(fileNames ...string) (DescriptorSource, error) + func DescriptorSourceFromServer(_ context.Context, refClient *grpcreflect.Client) DescriptorSource + type Format string + type FormatOptions struct + AllowUnknownFields bool + EmitJSONDefaultFields bool + IncludeTextSeparator bool + type Formatter func(proto.Message) (string, error) + func NewJSONFormatter(emitDefaults bool, resolver jsonpb.AnyResolver) Formatter + func NewTextFormatter(includeSeparator bool) Formatter + type InvocationEventHandler interface + OnReceiveHeaders func(metadata.MD) + OnReceiveResponse func(proto.Message) + OnReceiveTrailers func(*status.Status, metadata.MD) + OnResolveMethod func(*desc.MethodDescriptor) + OnSendHeaders func(metadata.MD) + type RequestMessageSupplier func() ([]byte, error) + type RequestParser interface + Next func(msg proto.Message) error + NumRequests func() int + func NewJSONRequestParser(in io.Reader, resolver jsonpb.AnyResolver) RequestParser + func NewJSONRequestParserWithUnmarshaler(in io.Reader, unmarshaler jsonpb.Unmarshaler) RequestParser + func NewTextRequestParser(in io.Reader) RequestParser + type RequestSupplier func(proto.Message) error