gateway

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CookieHook

func CookieHook(ctx context.Context, writer http.ResponseWriter, message proto.Message) error

func CustomHTTPError

func CustomHTTPError(ctx context.Context, mux *runtime.ServeMux, marshaler runtime.Marshaler, w http.ResponseWriter, r *http.Request, err error)

func ForwardResponseMessage

func ForwardResponseMessage(ctx *gin.Context, md runtime.ServerMetadata, message proto.Message)

func Gateway

func Gateway(gatewayHandle GatewayHandle) *runtime.ServeMux

func HTTPError

func HTTPError(ctx *gin.Context, err error)

func HTTPStatusFromCode

func HTTPStatusFromCode(code errorcode.ErrCode) int

func ResponseHook

func ResponseHook(ctx context.Context, writer http.ResponseWriter, message proto.Message) error

func RoutingErrorHandler

func RoutingErrorHandler(ctx context.Context, mux *runtime.ServeMux, marshaler runtime.Marshaler, w http.ResponseWriter, r *http.Request, httpStatus int)

Types

type GatewayHandle

type GatewayHandle func(context.Context, *runtime.ServeMux)

type SetCookie

type SetCookie interface {
	GetCookie() string
}

Jump to

Keyboard shortcuts

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