ctxval

package
v0.0.0-...-d078efc Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthHeader

func GetAuthHeader(ctx context.Context) (string, bool)

GetAuthHeader returns the `Authorization` header value in a context.

func GetUserID

func GetUserID(ctx context.Context) (model.UserID, bool)

GetUserID returns UserID of the given context.

func SetAuthHeader

func SetAuthHeader(ctx context.Context, authHeader string) context.Context

SetAuthHeader returns new context which has the `Authorization` header value in a context.

func SetUserID

func SetUserID(ctx context.Context, userID model.UserID) context.Context

SetUserID returns new context which has UserID for the context value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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