context

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 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 added in v1.11.1

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 added in v1.11.1

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

func RequestContext added in v1.11.1

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

requestContext returns a context representing the provided http action.

func RequestFromContext added in v1.11.1

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