handlerwrap

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: MIT, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerWrap

func HandlerWrap[REQ, RES any](service Service[*REQ, *RES]) http.Handler

func HandlerWrapCompatibleGRPC

func HandlerWrapCompatibleGRPC[REQ, RES any](method types.GrpcService[*REQ, *RES]) http.Handler

func UnWarpContext

func UnWarpContext(ctx context.Context) any

func WarpContext

func WarpContext(v any) context.Context

Types

type ReqResp

type ReqResp struct {
	*http.Request
	http.ResponseWriter
}

type Service

type Service[REQ, RES any] func(ctx ReqResp, req REQ) (RES, *httpx.ErrRep)

Jump to

Keyboard shortcuts

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