# Functions
Cleanup performs final cleanup on the initial response from grpc-gateway.
DefaultEndpoint returns an Endpoint with default configuration, e.g.
DeserializeGrpcResponseBodyIntoContainer deserializes the grpc-gateway's response body into an endpoint-specific struct.
DeserializeRequestBodyIntoContainer deserializes the request's body into an endpoint-specific struct.
GrpcResponseIsEmpty determines whether the grpc-gateway's response body contains no data.
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.
ProcessMiddlewareResponseFields processes fields of an endpoint-specific container according to field tags.
ProcessRequestContainerFields processes fields of an endpoint-specific container according to field tags.
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.
No description provided by the author
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.
HookCollection contains hooks that can be used to amend the default request/response cycle with custom logic for a specific endpoint.
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.
RunDefault expresses whether the default processing logic should be carried out after running a pre hook.