httpctx

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 6 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeviceFromHeader

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

Types

type Context

func ContextFromContext

func ContextFromContext(ctx context.Context) *Context

func ContextFromRequest

func ContextFromRequest(req RequestCtx, tracing bool) (*Context, trace.Span)

type HttpContext

type HttpContext contexti.RequestContext[RequestCtx]

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 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