# Functions
Cleanup performs final cleanup on the initial response from grpc-gateway.
DeserializeGrpcResponseBodyIntoContainer deserializes the grpc-gateway's response body into an endpoint-specific struct.
DeserializeGrpcResponseBodyIntoErrorJson deserializes the body from the grpc-gateway's response into an error struct.
DeserializeRequestBodyIntoContainer deserializes the request's body into an endpoint-specific struct.
GrpcResponseIsStatusCodeOnly checks whether a grpc-gateway's response contained no body.
HandleGrpcResponseError acts on an error that resulted from a grpc-gateway's response.
HandleQueryParameters processes query parameters, allowing them to be safely and correctly proxied to grpc-gateway.
HandleURLParameters processes URL parameters, allowing parameterized URLs to be safely and correctly proxied to grpc-gateway.
InternalServerError returns a DefaultErrorJson with 500 code.
InternalServerErrorWithMessage returns a DefaultErrorJson with 500 code and a custom message.
New returns a new instance of the Gateway.
ProcessMiddlewareResponseFields processes fields of an endpoint-specific container according to field tags.
ProcessRequestContainerFields processes fields of an endpoint-specific container according to field tags.
ProxyRequest proxies the request to grpc-gateway.
ReadGrpcResponseBody reads the body from the grpc-gateway's response.
SerializeMiddlewareResponseIntoJson serializes the endpoint-specific response struct into a JSON representation.
SetRequestBodyToRequestContainer makes the endpoint-specific container the new body of the request.
SwaggerServer returns swagger specification files located under "/swagger/".
WriteError writes the error by manipulating headers and the body of the final response.
WriteMiddlewareResponseHeadersAndBody populates headers and the body of the final response.
# Structs
ApiProxyMiddleware is a proxy between an Ethereum consensus API HTTP client and grpc-gateway.
DefaultErrorJson is a JSON representation of a simple error value, containing only a message and an error code.
Endpoint is a representation of an API HTTP endpoint that should be proxied by the middleware.
Gateway is the gRPC gateway to serve HTTP JSON traffic as a proxy and forward it to the gRPC server.
HookCollection contains handlers/hooks that can be used to amend the default request/response cycle with custom logic for a specific endpoint.
PbMux serves grpc-gateway requests for selected patterns using registered protobuf handlers.
QueryParam represents a single query parameter's metadata.
# Interfaces
EndpointFactory is responsible for creating new instances of Endpoint values.
ErrorJson describes common functionality of all JSON error representations.
# Type aliases
CustomHandler is a function that can be invoked at the very beginning of the request, essentially replacing the whole default request/response logic with custom logic for a specific endpoint.
Hook is a function that can be invoked at various stages of the request/response cycle, leading to custom behaviour for a specific endpoint.
MuxHandler is a function that implements the mux handler functionality.
PbHandlerRegistration is a function that registers a protobuf handler.