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 ¶
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.
Click to show internal directories.
Click to hide internal directories.