audit

package
v0.25.3 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Checkpoint

func Checkpoint(log Log) error

func Close

func Close(log Log) error

func Record

func Record(log Log, event Event) error

func SetCheckpointInterval

func SetCheckpointInterval(log Log, n int64)

func Tail

func Tail(log Log) (int64, []byte)

func Vacuum

func Vacuum(log Log, before time.Time) error

func Verify

func Verify(log Log) error

func VerifyIncremental

func VerifyIncremental(log Log) error

Types

type Done

type Done struct {
	Detail string
}

type Entry

type Entry struct {
	Seq       int64
	Timestamp time.Time
	Event     Event
	KeyID     string
}

func Query

func Query(log Log, filter Filter) ([]Entry, error)

type Escalated

type Escalated struct {
	ToUser string
	Reason string
}

type Event

type Event struct {
	Actor   string
	Action  string
	Target  string
	Reason  string
	Outcome Outcome
	Extra   map[string]string
}

type FileSigner

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

func NewFileSigner

func NewFileSigner(path string) (FileSigner, error)

func (FileSigner) KeyID

func (s FileSigner) KeyID() string

func (FileSigner) Sign

func (s FileSigner) Sign(message []byte) ([]byte, error)

func (FileSigner) Verify

func (s FileSigner) Verify(message []byte, sig []byte) bool

type Filter

type Filter struct {
	Actor  string
	Action string
	Target string
	Since  time.Time
	Until  time.Time
	Limit  int
}

type Log

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

func Open

func Open(dbPath string) (Log, error)

func OpenWithKey

func OpenWithKey(dbPath string, keyPath string) (Log, error)

func OpenWithSigner

func OpenWithSigner(dbPath string, signer Signer) (Log, error)

type Outcome

type Outcome interface {
	// contains filtered or unexported methods
}

type Signer

type Signer interface {
	KeyID() string
	Sign(message []byte) ([]byte, error)
	Verify(message []byte, sig []byte) bool
}

type Skipped

type Skipped struct {
	Reason string
}

type Vacuumed

type Vacuumed struct {
	Before       time.Time
	Count        int
	HashAtCutoff []byte
}

Jump to

Keyboard shortcuts

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