context

package
v0.0.0-...-2741532 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const RequestIDKey string = "request_id"

RequestIDKey needs to be a string, since its used on Fiber `.Locals()`

Variables

This section is empty.

Functions

func CtxWithValues

func CtxWithValues(ctx context.Context, values CtxBody) context.Context

func GenerateRequestID

func GenerateRequestID() string

func GetField

func GetField(ctx context.Context, key string) string

func GetFields

func GetFields(ctx context.Context, key string, index int) string

func GetRequestIDFromContext

func GetRequestIDFromContext(ctx context.Context) string

Types

type CtxBody

type CtxBody = map[string]interface{}

func GetCtxValues

func GetCtxValues(ctx context.Context) CtxBody

GetCtxValues extracts the CtxBody currently stored on the input ctx.

type LogCtxKey

type LogCtxKey struct{}

Jump to

Keyboard shortcuts

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