trust

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package trust implements App 3: Trust — audit ledger, compliance, evidence packs, replay lab.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func New

func New(conn *sql.DB) *App

func (*App) Auditor

func (a *App) Auditor() func(eventType, actor, resource, action string, detail any)

Auditor returns a TrustAuditor that other packages can use to record events. This ensures all writes go through the serialized hash chain.

func (*App) Description

func (a *App) Description() string

func (*App) Migrate

func (a *App) Migrate(conn *sql.DB) error

func (*App) Name

func (a *App) Name() string

func (*App) RecordEvent

func (a *App) RecordEvent(eventType, actor, resource, action string, detail any) (int64, string)

RecordEvent appends an entry to the hash-chain audit ledger. Thread-safe — serializes hash chain computation.

func (*App) RegisterRoutes

func (a *App) RegisterRoutes(mux *http.ServeMux)

func (*App) SetBroadcaster

func (a *App) SetBroadcaster(b any)

SetBroadcaster subscribes to live proxy events and records them in the audit ledger. Accepts any type that has AddListener(func([]byte)) func() — uses any to work with Go's interface type assertion in engine.go.

Jump to

Keyboard shortcuts

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