httpctx

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeviceFromHeader

func DeviceFromHeader(r http.Header) *reqctx.DeviceInfo

Types

type Context

type Context = reqctx.Context[RequestCtx]

func FromContextValue added in v1.16.0

func FromContextValue(ctx context.Context) *Context

func FromRequest added in v1.16.0

func FromRequest(req RequestCtx) *Context

type HttpContext

type HttpContext Context

func (*HttpContext) SendHeader

func (c *HttpContext) SendHeader(md metadata.MD) error

func (*HttpContext) SetCookie

func (c *HttpContext) SetCookie(v string) error

func (*HttpContext) SetHeader

func (c *HttpContext) SetHeader(md metadata.MD) error

func (*HttpContext) SetTrailer

func (c *HttpContext) SetTrailer(md metadata.MD) error

func (*HttpContext) WriteHeader

func (c *HttpContext) WriteHeader(k, v string) error

type ReqValue added in v1.16.0

type ReqValue[REQ any, V any] struct {
	reqctx.ReqValue[REQ]
	Value V
}

type RequestCtx

type RequestCtx struct {
	Request  *http.Request
	Response http.ResponseWriter
}

Jump to

Keyboard shortcuts

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