Help us shape the future of Go! Take the 2026 Go Developer Survey

audit

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package audit appends every write to a JSONL log, secrets redacted.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Time     time.Time        `json:"time"`
	Subject  identity.Subject `json:"subject"`
	Action   string           `json:"action"`
	Args     map[string]any   `json:"args,omitempty"`
	Effect   string           `json:"effect"`
	Env      string           `json:"env,omitempty"`
	Decision string           `json:"decision"`
	Approver string           `json:"approver,omitempty"`
	Result   string           `json:"result,omitempty"`
	Error    string           `json:"error,omitempty"`
}

func Read

func Read(path string) ([]Entry, error)

Read is every entry of the log at path, oldest first; a missing log has none.

type Log

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

func Open

func Open(path string, secrets ...string) *Log

Open logs to path, usually .rig/<env>/audit.jsonl; secrets are masked in every entry.

func (*Log) Append

func (l *Log) Append(e Entry) error

Jump to

Keyboard shortcuts

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