auditquery

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package auditquery defines the sanitized, authorized audit repository port. The host must authenticate and intersect current permissions before each call.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalid = errors.New("audit_invalid_request")
View Source
var ErrUnavailable = errors.New("audit_snapshot_unavailable")

Functions

This section is empty.

Types

type Batch

type Batch struct {
	Records  []Record
	Snapshot string
}

type Position

type Position struct {
	Time       time.Time
	Source, ID string
}

type Reader

type Reader interface {
	ReadAudit(context.Context, Request) (Batch, error)
}

type Record

type Record struct {
	ID, Source, Actor, Target, Action, Reason, Result string
	Scope                                             Scope
	CreatedAt                                         time.Time
}

type Request

type Request struct {
	Scopes                []Scope
	Actor, Target, Action string
	From, Until           time.Time
	Before                *Position
	Snapshot              string
	Limit                 int
}

Request mirrors platform admin.AuditRequest. Scopes are a union of authorized intersections, never caller-provided grants. Until is an exclusive upper bound.

type Scope

type Scope struct {
	School string `json:"school"`
	Group  string `json:"group"`
	Module string `json:"module"`
}

Jump to

Keyboard shortcuts

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