context

package
Version: v0.0.0-...-3051362 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppContext

func AppContext(ctx context.Context) context.Context

AppContext retrieves application context

func Hostname

func Hostname(ctx context.Context) string

Hostname gets the hostname from request context

func Logger

func Logger(ctx context.Context) *logger.SupportLogger

Logger returns the CreditsLogger from context

func RequestContext

func RequestContext(ginCtx *gin.Context) context.Context

RequestContext returns a context.Context from a gin.Context

func RequestID

func RequestID(ctx context.Context) string

RequestID gets the request's requestID

func WithContext

func WithContext(ctx context.Context, c context.Context) context.Context

WithContext sets the application context

func WithHostname

func WithHostname(ctx context.Context, hostname string) context.Context

WithHostname adds the hostname to request context

func WithLogger

func WithLogger(ctx context.Context, logger *logger.SupportLogger) context.Context

WithLogger stores a CreditsLogger in context

func WithRequestContext

func WithRequestContext(ctx context.Context, ginCtx *gin.Context)

WithRequestContext returns a context.Context from a gin.Context

func WithRequestID

func WithRequestID(ctx context.Context, id string) context.Context

WithRequestID adds a RequestID to request context

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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