audit

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package audit provides shared, append-only audit logging stored as YAML.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(dir string, entry Entry) error

Append adds an entry to the audit log in the given directory. If the audit file does not exist, it is created.

Types

type Entry

type Entry struct {
	Timestamp time.Time         `yaml:"timestamp"`
	Action    string            `yaml:"action"`
	Details   string            `yaml:"details"`
	Metadata  map[string]string `yaml:"metadata,omitempty"`
}

Entry represents a single audit log entry.

func Load

func Load(dir string) ([]Entry, error)

Load reads all audit entries from the given directory. Returns an empty slice (not an error) if the audit file does not exist.

Jump to

Keyboard shortcuts

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