Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository owns the access log write path and simple single-table reads. Cross-domain reads (e.g. joining devices for device_name) live in internal/queries.
func NewRepository ¶
func NewRepository(db *database.DB) *Repository
func (*Repository) BatchInsert ¶
func (r *Repository) BatchInsert(ctx context.Context, events []policy.DecisionEvent) error
func (*Repository) DeleteOlderThan ¶ added in v0.4.0
DeleteOlderThan removes access_log rows (and their children via CASCADE) with created_at before the given time. Returns the number of rows deleted from access_log.
func (*Repository) ListDenyReasons ¶
func (r *Repository) ListDenyReasons(ctx context.Context) ([]string, error)
type Sink ¶
type Sink struct {
// contains filtered or unexported fields
}
Sink receives DecisionEvents on a buffered channel and batch-inserts them.
func (*Sink) OnDecision ¶
func (s *Sink) OnDecision(_ context.Context, e policy.DecisionEvent)
OnDecision implements policy.DecisionObserver.
Click to show internal directories.
Click to hide internal directories.