Package-level declarations
Types
Link copied to clipboard
class FindParkingSlots(parkingSlotRepository: ParkingSlotRepository) : AsyncFailableUseCase<FindParkingSlots.Params, AppError, List<ParkingSlot>>
Finds the parking slots in a radius of Params.radius meters from Params.center
Link copied to clipboard
class FreeParkingSlot(parkingSlotRepository: ParkingSlotRepository) : AsyncFailableUseCase<Unit, AppError, Unit>
Frees the parking slot currently occupied by the user. If the user hasn't parked it does nothing.
Link copied to clipboard
class IncrementParkingSlotOccupation(parkingSlotRepository: ParkingSlotRepository) : AsyncFailableUseCase<IncrementParkingSlotOccupation.Params, AppError, Unit>
Increments the parking slot currently occupied by the user. If the user isn't parking it returns an instance of Either.Left containing AppError.NoParkingSlotOccupied
Link copied to clipboard
class OccupyParkingSlot(parkingSlotRepository: ParkingSlotRepository) : AsyncFailableUseCase<OccupyParkingSlot.Params, AppError, Unit>
Occupies a parking slot if the user is currently occupying no parking slot. If the user is already parking in another place it returns an instance of Either.Left containing AppError.AlreadyParking
Link copied to clipboard
class ViewCurrentParkingSlot(parkingSlotRepository: ParkingSlotRepository) : AsyncFailableUseCase<Unit, AppError, ParkingSlot?>
Finds the information of the current parking slot
Link copied to clipboard
class ViewParkingSlot(parkingSlotRepository: ParkingSlotRepository) : AsyncFailableUseCase<ViewParkingSlot.Params, AppError, ParkingSlot>
Finds the information of a parking slot identified by Params.id