audit

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package audit provides append-only JSONL audit logging for canvas-cli mutations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashBody

func HashBody(body string) string

HashBody returns the SHA-256 hex digest of body, prefixed with "sha256:".

Types

type Auditor

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

Auditor writes AuditEvent records to a local JSONL file.

func NewAuditor

func NewAuditor(path string, enabled bool) *Auditor

NewAuditor creates an Auditor that writes to path when enabled is true.

func (*Auditor) WriteEvent

func (a *Auditor) WriteEvent(event *canvas.AuditEvent) error

WriteEvent appends a single JSONL line to the audit log file.

Jump to

Keyboard shortcuts

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