journal

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 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,
) data.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.

func Log

func Log(e data.JournalEntry)

Log prints an audit log entry to the standard output. The log entry includes the correlation ID, event type, request method, request URI, SPIFFE ID, and payload. The function is intended for use in logging and auditing request-related events, providing a standardized format for capturing and recording essential request handling information.

Types

This section is empty.

Jump to

Keyboard shortcuts

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