Documentation ¶
Index ¶
- Constants
- func CtxWithValues(ctx context.Context, values CtxBody) context.Context
- func GenerateRequestID() string
- func GetField(ctx context.Context, key string) string
- func GetFields(ctx context.Context, key string, index int) string
- func GetRequestIDFromContext(ctx context.Context) string
- type CtxBody
- type LogCtxKey
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 GenerateRequestID ¶
func GenerateRequestID() string
func GetRequestIDFromContext ¶
Types ¶
type CtxBody ¶
type CtxBody = map[string]interface{}
func GetCtxValues ¶
GetCtxValues extracts the CtxBody currently stored on the input ctx.
Click to show internal directories.
Click to hide internal directories.