audit

package
v0.0.0-...-3511abf Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const EntityIDKey = "entityID"

EntityIDKey is the key used to store and extract entity IDs from log fields.

Variables

This section is empty.

Functions

func ExtractLogFields

func ExtractLogFields(ctx context.Context) logrus.Fields

ExtractLogFields retrieves logrus Fields from a context, if it exists.

func SupplyEntityID

func SupplyEntityID(ctx context.Context, id interface{}) context.Context

SupplyEntityID augments a context's log fields with the entity ID.

Types

type LogKey

type LogKey struct{}

LogKey is the key used to store and extract logrus fields from context.

Jump to

Keyboard shortcuts

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