Files
fm_be/internal/transport/http/handlers/fleet_history.go
2026-07-16 22:16:45 +07:00

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)
}