auditlog

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: AGPL-3.0 Imports: 6 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

Overview

Package auditlog keeps komando's audit log in the local store.

Index

Constants

View Source
const Page = 500

Page is how many records one short read step returns, so reading the log never holds the store for long.

Variables

This section is empty.

Functions

func Append

func Append(rec map[string]any) ([]byte, error)

func Each

func Each(fn func(n int, rec []byte) error) error

Each calls fn with every audit record in the store, oldest first. A sealed record that does not open stops it with sealdb.ErrTampered.

func EachAfter

func EachAfter(after int64, fn func(n int, rec []byte) error) error

EachAfter is Each from the record after number after on.

func NewestSeq

func NewestSeq() (int64, error)

NewestSeq gives the number of the newest audit record (0: none).

Types

type Check

type Check struct {
	OK          bool   `json:"ok"`
	Entries     int    `json:"entries"`
	Chained     int    `json:"chained"`                // records with a prev hash
	FirstBroken int    `json:"first_broken,omitempty"` // line number
	Note        string `json:"note"`
}

func Verify

func Verify() (Check, error)

func (Check) Text

func (a Check) Text() string

Jump to

Keyboard shortcuts

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