convert

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GRPCStatusToHTTPStatusCode

func GRPCStatusToHTTPStatusCode(grpcStatus codes.Code) (c int)

GRPCStatusToHTTPStatusCode converts a GRPC status to an HTTP Status Code

func MethodFromString

func MethodFromString(methodString string) httpapi.Method

MethodFromString converts a method string to a httpapi.Method

func ProxyRequest

func ProxyRequest(ctx context.Context, w http.ResponseWriter, r *http.Request, procedure string, conn *grpc.ClientConn, txid string, loggers ...logs.Writer)

ProxyRequest proxies an HTTP request through a GRPC connection compliant with httpgrpc/proto

func RequestFromRequest

func RequestFromRequest(r *http.Request) *httpapi.Request

RequestFromRequest creates a *httpapi.Request from *http.Request filling all values except body, which could error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL