21 lines
854 B
Go
21 lines
854 B
Go
package handlers
|
|
|
|
import (
|
|
"context"
|
|
|
|
fleethistory "wucher/internal/domain/fleet_history"
|
|
)
|
|
|
|
// fleetHistoryRecorder appends append-only events to a helicopter's timeline.
|
|
// Logging is best-effort: callers ignore the returned error so a logging failure
|
|
// never blocks the underlying action.
|
|
type fleetHistoryRecorder interface {
|
|
Record(ctx context.Context, helicopterID []byte, entityType string, entityID []byte, action, message string, actor []byte) error
|
|
RecordByInspection(ctx context.Context, inspectionID []byte, entityType string, entityID []byte, action, message string, actor []byte) error
|
|
}
|
|
|
|
// fleetHistoryLister reads a helicopter's timeline events (for the merged history).
|
|
type fleetHistoryLister interface {
|
|
ListByHelicopter(ctx context.Context, helicopterID []byte, limit, offset int) ([]fleethistory.FleetHistory, int64, error)
|
|
}
|