Documentation
¶
Overview ¶
Package compliance renders bounded, self-contained compliance artifacts. It intentionally has no browser, native-library, or network dependency.
Index ¶
Constants ¶
const ( ArchiveManifestName = "manifest.json" ArchiveSchemaVersion = "agentsql.audit-archive/v1" // MaximumArchiveBytes is the maximum accepted compressed or expanded archive size. MaximumArchiveBytes = 512 << 20 )
Variables ¶
This section is empty.
Functions ¶
func RenderAuditPDF ¶
func RenderAuditPDF(logs []model.AuditLog, options PDFOptions) ([]byte, error)
RenderAuditPDF renders every selected event into a compact, multi-page A4 report. The standard CJK Type0 font mapping keeps the implementation pure Go and allows Chinese audit values without invoking a browser or external tool.
Types ¶
type ArchiveFile ¶
ArchiveFile is one payload in a compliance archive.
type ArchiveManifest ¶
type ArchiveManifest struct {
SchemaVersion string `json:"schema_version"`
Kind string `json:"kind"`
GeneratedAt time.Time `json:"generated_at"`
Files []ArchiveManifestFile `json:"files"`
}
func BuildArchive ¶
func BuildArchive(generatedAt time.Time, files []ArchiveFile) ([]byte, ArchiveManifest, error)
BuildArchive writes a deterministic-shape ZIP with a manifest covering each payload. The manifest is an integrity inventory, not a signature.
func VerifyArchive ¶
func VerifyArchive(contents []byte) (ArchiveManifest, error)
VerifyArchive validates names, bounds, membership, sizes, and every SHA-256 digest. It does not authenticate the archive producer.