ctx

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package ctx contains setters and getters for request context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRequestID

func GetRequestID(headerName string, r *http.Request) string

GetRequestID reads requestID from context, header or generates new one

func GetUserID

func GetUserID(r *http.Request) string

GetUserID reads userId from context

func SetRequestID

func SetRequestID(id string, r *http.Request) *http.Request

SetRequestID stores requestID in context

func SetUserID

func SetUserID(id string, r *http.Request) *http.Request

SetUserID stores userID in context

Types

This section is empty.

Jump to

Keyboard shortcuts

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