audit

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package audit provides structured audit logging for Keep evaluations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger writes audit entries as JSON Lines to a writer.

func NewLogger

func NewLogger(w io.Writer) *Logger

NewLogger creates a logger that writes to the given writer.

func NewLoggerFromOutput

func NewLoggerFromOutput(output string) (*Logger, io.Closer, error)

NewLoggerFromOutput creates a logger from an output string. "stdout" -> os.Stdout, "stderr" -> os.Stderr, anything else -> file path.

func (*Logger) Log

func (l *Logger) Log(entry engine.AuditEntry)

Log serializes the audit entry as JSON and writes it as a single line. Thread-safe.

Jump to

Keyboard shortcuts

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