context

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: Apache-2.0, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RequestContextKey = CtxKey("request")
View Source
var SessionContextKey = CtxKey("session")

Functions

func BaseURL

func BaseURL(ctx context.Context) *url.URL

BaseURL returns the "base" url for this request, defined as a url containing the Host and Scheme portions of the request uri.

func HistoryQFromRequest

func HistoryQFromRequest(request *http.Request) (*history.Q, error)

func RequestContext

func RequestContext(ctx context.Context, w http.ResponseWriter, r *http.Request) context.Context

requestContext returns a context representing the provided http action.

func RequestFromContext

func RequestFromContext(ctx context.Context) *http.Request

Types

type CtxKey

type CtxKey string

Jump to

Keyboard shortcuts

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