Documentation ¶
Index ¶
- Constants
- func Collect(md protoreflect.MethodDescriptor) (rules []*annotations.HttpRule)
- func DecodeRequest(rule *annotations.HttpRule, pathVars map[string]string, req *http.Request, ...) error
- func MatchRequest(rule *annotations.HttpRule, req *http.Request) map[string]string
- type HandleForwardedGRPCRequest
- type Server
Constants ¶
View Source
const ( ContentTypeBinaryProto = "application/x-protobuf" ContentTypeJSON = "application/json" )
Variables ¶
This section is empty.
Functions ¶
func Collect ¶
func Collect(md protoreflect.MethodDescriptor) (rules []*annotations.HttpRule)
Collect any annotations.Rule entries from a proto method.
func DecodeRequest ¶
func DecodeRequest(rule *annotations.HttpRule, pathVars map[string]string, req *http.Request, target proto.Message) error
DecodeRequest parses a http.Request, using a HttpRule, into a target message.
func MatchRequest ¶
MatchRequest returns a non-nil map of extracted path vars if a http.Request matches a rule's request path and method.
Types ¶
type HandleForwardedGRPCRequest ¶
type HandleForwardedGRPCRequest func(md protoreflect.MethodDescriptor, ss grpc.ServerStream) error
Click to show internal directories.
Click to hide internal directories.