ctxHttp

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: May 30, 2020 License: MIT Imports: 5 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context(req *http.Request) ctx.Context

Pulls out user context that was saved to the *http.Request.

func ExecuteHttpHandler

func ExecuteHttpHandler(context ctx.Context, handler http.Handler)

Execute Http Handler

func ExecuteHttpHandlerFunc

func ExecuteHttpHandlerFunc(context ctx.Context, handlerFunc http.HandlerFunc)

Execute Http Handler Function

func NewContext

func NewContext(req *http.Request, res http.ResponseWriter) *http.Request

Create new context for user request, also saves context inside *http.Request without disturbing the context of the user request.

func OriginalRequest

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

Pulls out original request from context.

func Request

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

Pulls out request from context.

func Response

func Response(context ctx.Context) http.ResponseWriter

Pulls out response from context

func ResponseWriter

func ResponseWriter(context ctx.Context) http.ResponseWriter

Alias of Response

func SetTitle

func SetTitle(context ctx.Context, titleStr string)

Set title from inside context.

func Title

func Title(context ctx.Context) string

* Pulls out title from context

Types

This section is empty.

Jump to

Keyboard shortcuts

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