protojson

package
v0.0.0-...-241046a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRequestParser

func NewRequestParser(r *http.Request, pathName []string, resolver jsonpb.AnyResolver) (grpcurl.RequestParser, error)

NewRequestParser creates a new request parser from the given http.Request and resolver.

Types

type EventHandler

type EventHandler struct {
	Status    *status.Status
	Message   proto.Message
	Marshaler jsonpb.Marshaler
}

func NewEventHandler

func NewEventHandler(writer io.Writer, resolver jsonpb.AnyResolver) *EventHandler

func (*EventHandler) OnReceiveHeaders

func (h *EventHandler) OnReceiveHeaders(_ metadata.MD)

func (*EventHandler) OnReceiveResponse

func (h *EventHandler) OnReceiveResponse(message proto.Message)

func (*EventHandler) OnReceiveTrailers

func (h *EventHandler) OnReceiveTrailers(status *status.Status, _ metadata.MD)

func (*EventHandler) OnResolveMethod

func (h *EventHandler) OnResolveMethod(_ *desc.MethodDescriptor)

func (*EventHandler) OnSendHeaders

func (h *EventHandler) OnSendHeaders(_ metadata.MD)

type Method

type Method struct {
	HttpMethod string
	PathNames  []string
	HttpPath   string
	RpcPath    string
}

func GetMethods

func GetMethods(source grpcurl.DescriptorSource) ([]Method, error)

GetMethods returns all methods of the given grpcurl.DescriptorSource.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL