audit

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Time          string `json:"time"`
	CallerIP      string `json:"caller_ip,omitempty"`
	CalledBy      string `json:"called_by,omitempty"`
	Tool          string `json:"tool"`
	ContextID     string `json:"context_id,omitempty"`
	Seq           int64  `json:"seq,omitempty"`
	Kind          string `json:"kind,omitempty"`
	Priority      string `json:"priority,omitempty"`
	ProducerID    string `json:"producer_id,omitempty"`
	PayloadSHA256 string `json:"payload_sha256,omitempty"`
	EvidenceID    string `json:"evidence_id,omitempty"`
	EvidenceSize  int64  `json:"evidence_size,omitempty"`
	Result        string `json:"result,omitempty"`
	Error         string `json:"error,omitempty"`
	CostMS        int64  `json:"cost_ms,omitempty"`
}

Entry is the allow-listed audit record. Fields NOT present here (payload, token) are never logged.

type Logger

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

Logger serializes writes to an io.Writer.

func New

func New(w io.Writer) *Logger

New builds a Logger.

func (*Logger) Log

func (l *Logger) Log(e Entry)

Log writes one JSON line.

Jump to

Keyboard shortcuts

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