audit

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package audit provides the `ana audit` verb tree: tail. Like the other verb packages it avoids importing internal/transport and internal/config — callers inject a narrow Deps struct that adapts a real transport client to a single Unary function field plus an injectable clock for deterministic `--since` tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(deps Deps) *cli.Group

New returns the `audit` verb group. A zero Now defaults to time.Now so the common wiring path does not need to remember it; tests pass a fake clock to exercise the `--since` branch deterministically.

Types

type Deps

type Deps struct {
	Unary func(ctx context.Context, path string, req, resp any) error
	Now   func() time.Time
}

Deps is the injection boundary for the audit package.

Unary JSON-encodes req, POSTs it to path, and JSON-decodes into *resp. A real wiring layer adapts transport.Client to this signature.

Now is the clock used to compute `--since` timestamps. Defaulting Now to time.Now is the caller's responsibility; New does it for you.

Jump to

Keyboard shortcuts

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