2
1
Fork 0
pr3-ws202526/go/06-airport/airport/baggageHandlingSystem.go

45 lines
900 B
Go

package airport
import (
"time"
)
type BaggageProcessor interface {
ProcessBaggage(FlightNumber, Baggage) error
}
type BaggageHandlingSystem struct {
processingTime time.Duration
sinks map[FlightNumber]BaggageProcessor
//TODO: extend
}
type LostBaggage struct {
Baggage
FlightNumber FlightNumber
Err error
}
var _ BaggageProcessor = &BaggageHandlingSystem{}
func NewBaggageHandlingSystem(processingTime time.Duration, sinks map[FlightNumber]BaggageProcessor) BaggageHandlingSystem {
return BaggageHandlingSystem{
processingTime: processingTime,
sinks: sinks,
}
}
func (bhs *BaggageHandlingSystem) ProcessBaggage(fn FlightNumber, b Baggage) error {
//TODO: implement
return nil
}
func (bhs *BaggageHandlingSystem) CollectLostBaggage() []LostBaggage {
//TODO: implement
return nil
}
func (bhs *BaggageHandlingSystem) Start() {
//TODO: implement
}