http_context

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 7 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeviceFromHeader added in v1.4.9

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

Types

type Context

type Context = contexti.RequestContext[RequestCtx]

func ContextFromContext

func ContextFromContext(ctx context.Context) *Context

func ContextFromRequest

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

type HttpContext added in v1.4.9

type HttpContext contexti.RequestContext[RequestCtx]

func (*HttpContext) SendHeader added in v1.4.9

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

func (*HttpContext) SetCookie added in v1.4.9

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

func (*HttpContext) SetHeader added in v1.4.9

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

func (*HttpContext) SetTrailer added in v1.4.9

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

func (*HttpContext) WriteHeader added in v1.4.9

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

type RequestCtx added in v1.7.2

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