audit

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package audit exposes Pitcrew's immutable audit log.

Index

Constants

This section is empty.

Variables

View Source
var ErrProjectNotFound = errors.New("project not found")

Functions

This section is empty.

Types

type Event

type Event struct {
	ID         int64
	ProjectID  *int64
	EraID      *int64
	Type       string
	EntityType string
	EntityID   string
	Payload    json.RawMessage
	Actor      string
	OccurredAt time.Time
}

Event is one immutable record of a state-changing operation.

type Store

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

Store owns audit-log reads from the shared Pitcrew database.

func Open

func Open(ctx context.Context, path string) (*Store, error)

Open opens audit persistence and applies technical schema migrations.

func (*Store) Close

func (s *Store) Close() error

Close releases the database connection.

func (*Store) List

func (s *Store) List(ctx context.Context, projectReference string) ([]Event, error)

List returns events in append order. A non-empty project reference limits results to the project selected with exact-name precedence over its key.

Jump to

Keyboard shortcuts

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