Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ParamErr = fmt.Errorf("param error")
)
Functions ¶
func GetTimeout ¶
GetTimeout returns the timeout from the header, if not set, returns the default timeout.
func NewRequestParser ¶
func NewRequestParser(r *http.Request, resolver jsonpb.AnyResolver) (grpcurl.RequestParser, error)
NewRequestParser creates a new request parser from the given http.Request and resolver.
func ProcessHeaders ¶
ProcessHeaders builds the headers for the gateway from HTTP headers.
Types ¶
type JSONRequestParser ¶
type JSONRequestParser struct {
// contains filtered or unexported fields
}
func NewJSONRequestParser ¶
func NewJSONRequestParser(r *http.Request, resolver jsonpb.AnyResolver) (*JSONRequestParser, error)
func (*JSONRequestParser) NumRequests ¶
func (f *JSONRequestParser) NumRequests() int
Click to show internal directories.
Click to hide internal directories.