# Functions
AnnotateContext adds context information such as metadata from the request.
AnnotateIncomingContext adds context information such as metadata from the request.
Bool converts the given string representation of a boolean value into bool.
BoolP parses the given string representation of a boolean value, and returns a pointer to a bool whose value is same as the parsed value.
BoolSlice converts 'val' where individual booleans are separated by 'sep' into a bool slice.
BoolValue well-known type support as wrapper around bool type.
Bytes converts the given string representation of a byte sequence into a slice of bytes A bytes sequence is encoded in URL-safe base64 without padding.
BytesSlice converts 'val' where individual bytes sequences, encoded in URL-safe base64 without padding, are separated by 'sep' into a slice of byte slices.
BytesValue well-known type support as wrapper around bytes[] type.
DefaultHeaderMatcher is used to pass http request headers to/from gRPC context.
DefaultHTTPErrorHandler is the default error handler.
DefaultRoutingErrorHandler is our default handler for routing errors.
DoubleValue well-known type support as wrapper around float64 type.
Duration converts the given string into a timestamp.Duration.
Enum converts the given string into an int32 that should be type casted into the correct enum proto type.
EnumSlice converts 'val' where individual enums are separated by 'sep' into a int32 slice.
FieldMaskFromRequestBody creates a FieldMask printing all complete paths from the JSON body.
Float32 converts the given string representation of a floating point number into float32.
Float32P parses the given string representation of a floating point number, and returns a pointer to a float32 whose value is same as the parsed number.
Float32Slice converts 'val' where individual floating point numbers are separated by 'sep' into a float32 slice.
Float64 converts the given string representation into representation of a floating point number into float64.
Float64P parses the given string representation of a floating point number, and returns a pointer to a float64 whose value is same as the parsed number.
Float64Slice converts 'val' where individual floating point numbers are separated by 'sep' into a float64 slice.
FloatValue well-known type support as wrapper around float32 type.
ForwardResponseMessage forwards the message "resp" from gRPC server to REST client.
ForwardResponseStream forwards the stream from gRPC server to REST client.
HTTPError uses the mux-configured error handler.
HTTPPathPattern returns the HTTP path pattern string relating to the HTTP handler, if one exists.
HTTPPattern returns the HTTP path pattern struct relating to the HTTP handler, if one exists.
HTTPStatusFromCode converts a gRPC error code into the corresponding HTTP response status.
HTTPStreamError uses the mux-configured stream error handler to notify error to the client without closing the connection.
Int32 converts the given string representation of an integer into int32.
Int32P parses the given string representation of an integer and returns a pointer to an int32 whose value is same as the parsed integer.
Int32Slice converts 'val' where individual integers are separated by 'sep' into an int32 slice.
Int32Value well-known type support as wrapper around int32 type.
Int64 converts the given string representation of an integer into int64.
Int64P parses the given string representation of an integer and returns a pointer to an int64 whose value is same as the parsed integer.
Int64Slice converts 'val' where individual integers are separated by 'sep' into an int64 slice.
Int64Value well-known type support as wrapper around int64 type.
MarshalerForRequest returns the inbound/outbound marshalers for this request.
MustPattern is a helper function which makes it easier to call NewPattern in variable initialization.
NewPattern returns a new Pattern from the given definition values.
NewServeMux returns a new ServeMux whose internal mapping is empty.
NewServerMetadataContext creates a new context with ServerMetadata.
PopulateFieldFromPath sets a value in a nested Protobuf structure.
PopulateQueryParameters parses query parameters into "msg" using current query parser.
RPCMethod returns the method string for the server context.
ServerMetadataFromContext returns the ServerMetadata in ctx.
SetQueryParameterParser sets the query parameter parser, used to populate message from query parameters.
String just returns the given string.
StringP returns a pointer to a string whose pointee is same as the given string value.
StringSlice converts 'val' where individual strings are separated by 'sep' into a string slice.
StringValue well-known type support as wrapper around string type.
Timestamp converts the given RFC3339 formatted string into a timestamp.Timestamp.
Uint32 converts the given string representation of an integer into uint32.
Uint32P parses the given string representation of an integer and returns a pointer to a uint32 whose value is same as the parsed integer.
Uint32Slice converts 'val' where individual integers are separated by 'sep' into a uint32 slice.
UInt32Value well-known type support as wrapper around uint32 type.
Uint64 converts the given string representation of an integer into uint64.
Uint64P parses the given string representation of an integer and returns a pointer to a uint64 whose value is same as the parsed integer.
Uint64Slice converts 'val' where individual integers are separated by 'sep' into a uint64 slice.
UInt64Value well-known type support as wrapper around uint64 type.
WithDisablePathLengthFallback returns a ServeMuxOption for disable path length fallback.
WithErrorHandler returns a ServeMuxOption for configuring a custom error handler.
WithForwardResponseOption returns a ServeMuxOption representing the forwardResponseOption.
WithForwardResponseRewriter returns a ServeMuxOption that allows for implementers to insert logic that can rewrite the final response before it is forwarded.
WithHealthEndpointAt returns a ServeMuxOption that will add an endpoint to the created ServeMux at the path specified by endpointPath.
WithHealthzEndpoint returns a ServeMuxOption that will add a /healthz endpoint to the created ServeMux.
WithIncomingHeaderMatcher returns a ServeMuxOption representing a headerMatcher for incoming request to gateway.
WithMarshalerOption returns a ServeMuxOption which associates inbound and outbound Marshalers to a MIME type in mux.
WithMetadata returns a ServeMuxOption for passing metadata to a gRPC context.
WithMiddlewares sets server middleware for all handlers.
WithOutgoingHeaderMatcher returns a ServeMuxOption representing a headerMatcher for outgoing response from gateway.
WithOutgoingTrailerMatcher returns a ServeMuxOption representing a headerMatcher for outgoing response from gateway.
WithRoutingErrorHandler returns a ServeMuxOption for configuring a custom error handler to handle http routing errors.
WithStreamErrorHandler returns a ServeMuxOption that will use the given custom stream error handler, which allows for customizing the error trailer for server-streaming calls.
WithUnescapingMode sets the escaping type.
WithWriteContentLength returns a ServeMuxOption to enable writing content length on non-streaming responses.
# Constants
MetadataHeaderPrefix is the http prefix that represents custom metadata parameters to or from a gRPC call.
MetadataPrefix is prepended to permanent HTTP header keys (as specified by the IANA) when added to the gRPC context.
MetadataTrailerPrefix is prepended to gRPC metadata as it is converted to HTTP headers in a response handled by grpc-gateway.
MIMEWildcard is the fallback MIME type used for requests which do not match a registered MIME type.
UnescapingModeAllCharacters unescapes all URL path parameters.
UnescapingModeAllExceptReserved unescapes all path parameters except RFC 6570 reserved characters.
UnescapingModeAllExceptSlash unescapes URL path parameters except path separators, which will be left as "%2F".
UnescapingModeDefault is the default escaping type.
UnescapingModeLegacy is the default V2 behavior, which escapes the entire path string before doing any routing.
# Variables
DefaultContextTimeout is used for gRPC call context.WithTimeout whenever a Grpc-Timeout inbound header isn't present.
ErrInvalidPattern indicates that the given definition of Pattern is not valid.
ErrNotMatch indicates that the given HTTP request path does not match to the pattern.
# Structs
DecoderWrapper is a wrapper around a *json.Decoder that adds support for protos to the Decode method.
DefaultQueryParser is a QueryParameterParser which implements the default query parameters parsing behavior.
HTTPBodyMarshaler is a Marshaler which supports marshaling of a google.api.HttpBody message as the full response body if it is the actual message used as the response.
HTTPStatusError is the error to use when needing to provide a different HTTP status code for an error passed to the DefaultRoutingErrorHandler.
JSONBuiltin is a Marshaler which marshals/unmarshals into/from JSON with the standard "encoding/json" package of Golang.
JSONPb is a Marshaler which marshals/unmarshals into/from JSON with the "google.golang.org/protobuf/encoding/protojson" marshaler.
Pattern is a template pattern of http request paths defined in https://github.com/googleapis/googleapis/blob/master/google/api/http.proto.
ProtoMarshaller is a Marshaller which marshals/unmarshals into/from serialize proto bytes.
ServeMux is a request multiplexer for grpc-gateway.
ServerMetadata consists of metadata sent from gRPC server.
ServerTransportStream implements grpc.ServerTransportStream.
# Interfaces
Decoder decodes a byte sequence.
Delimited defines the streaming delimiter.
Encoder encodes gRPC payloads / fields into byte sequence.
Marshaler defines a conversion between byte sequence and gRPC payloads / fields.
QueryParameterParser defines interface for all query parameter parsers.
StreamContentType defines the streaming content type.
# Type aliases
DecoderFunc adapts an decoder function into Decoder.
EncoderFunc adapts an encoder function into Encoder.
ErrorHandlerFunc is the signature used to configure error handling.
ForwardResponseRewriter is the signature of a function that is capable of rewriting messages before they are forwarded in a unary, stream, or error response.
A HandlerFunc handles a specific pair of path pattern and HTTP method.
HeaderMatcherFunc checks whether a header key should be forwarded to/from gRPC context.
A Middleware handler wraps another HandlerFunc to do some pre- and/or post-processing of the request.
RoutingErrorHandlerFunc is the signature used to configure error handling for routing errors.
ServeMuxOption is an option that can be given to a ServeMux on construction.
StreamErrorHandlerFunc is the signature used to configure stream error handling.
UnescapingMode defines the behavior of ServeMux when unescaping path parameters.