journal

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDefaultEntry

func CreateDefaultEntry(cid, spiffeid string,
	r *http.Request) audit.JournalEntry

CreateDefaultEntry constructs a default audit journal entry for HTTP requests. This entry includes basic request information and identifiers, serving as a foundational record for auditing and logging purposes. The function encapsulates details like the request method, URI, SPIFFE ID, and correlation ID into an audit journal entry.

Parameters:

  • cid (string): The correlation ID associated with the request, used for tracking and correlating logs and audit entries.
  • spiffeid (string): The SPIFFE ID associated with the requestor or the service, providing a security context.
  • r (*http.Request): The HTTP request from which method and request URI information are extracted.

Returns:

  • audit.JournalEntry: An audit journal entry populated with the request's method, URI, correlation ID, SPIFFE ID, and a default event type of 'Enter'.

The returned audit.JournalEntry object is intended for use in logging and audit trails, providing essential context about the request handling process. It serves as a standardized format for capturing request-related information, facilitating easier analysis and review of logged events.

Types

This section is empty.

Jump to

Keyboard shortcuts

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