context

package
v0.0.0-...-5bbb7b8 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClaimsFromContext

func ClaimsFromContext(ctx context.Context) (claims common.Claims, ok bool)

ClaimsFromContext extracts JWT claims from the given context.

func NewClaimsContext

func NewClaimsContext(ctx context.Context, claims common.Claims) context.Context

NewClaimsContext creates a new context from the given parent and adds the given JWT claims to it.

func NewRequestIDContext

func NewRequestIDContext(ctx context.Context, rid *common.UUID) context.Context

NewRequestIDContext creates a new context from the given parent and adds the given request ID to it.

func NewTimingContext

func NewTimingContext(ctx context.Context, t time.Time) context.Context

NewTimingContext creates a new context from the given parent and adds the specified time to it.

func RequestIDFromContext

func RequestIDFromContext(ctx context.Context) (rid common.UUID, ok bool)

RequestIDFromContext extracts a request ID from the given context.

func TimingFromContext

func TimingFromContext(ctx context.Context) (t time.Time, ok bool)

TimingFromContext extracts the timing from the given context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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