io.github.positionpal.location.domain

Members list

Type members

Classlikes

final case class Address(name: String, position: GPSLocation)

An address, identified by a name and a position.

An address, identified by a name and a position.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
enum Alert

The possible alerts that can be triggered during a MonitorableTracking session while monitoring the user's route to a destination.

The possible alerts that can be triggered during a MonitorableTracking session while monitoring the user's route to a destination.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

A trait representing an event reaction that produces two possible outcomes: a "left" (failure) and a "right" (success) outcome, following a short-circuit evaluation strategy: once the left outcome is produced, no further reactions are processed, stopping the chain of reactions at the first failure.

A trait representing an event reaction that produces two possible outcomes: a "left" (failure) and a "right" (success) outcome, following a short-circuit evaluation strategy: once the left outcome is produced, no further reactions are processed, stopping the chain of reactions at the first failure.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
sealed trait ClientDrivingEvent extends DrivingEvent

An event driving an application use case triggered by a client.

An event driving an application use case triggered by a client.

Attributes

Supertypes
trait DrivingEvent
trait DomainEvent
class Object
trait Matchable
class Any
Known subtypes
final case class Distance(value: Double, unit: DistanceUnit)

A distance record, identified by a value and a unit of measurement.

A distance record, identified by a value and a unit of measurement.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Distance

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Distance.type
trait DomainEvent

A generic domain event, representing a valuable change in the system.

A generic domain event, representing a valuable change in the system.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
sealed trait DrivenEvent extends DomainEvent

An event triggered by the system as a result of some system action.

An event triggered by the system as a result of some system action.

Attributes

Supertypes
trait DomainEvent
class Object
trait Matchable
class Any
Known subtypes
class UserUpdate
sealed trait DrivingEvent extends DomainEvent

An event driving an application use case.

An event driving an application use case.

Attributes

Supertypes
trait DomainEvent
class Object
trait Matchable
class Any
Known subtypes

A bunch of conversion utilities for domain events.

A bunch of conversion utilities for domain events.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
opaque trait EventReactionADT

An abstract data type for effectful event reactions.

An abstract data type for effectful event reactions.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

A mixin enriching the EventReactionADT with operations for filtering the execution of reactions.

A mixin enriching the EventReactionADT with operations for filtering the execution of reactions.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type
final case class GPSLocation(latitude: Latitude, longitude: Longitude)

A GPS location, identified by a Latitude and a Longitude.

A GPS location, identified by a Latitude and a Longitude.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait InternalEvent extends DrivingEvent

An event driving a use case triggered by the system itself.

An event driving a use case triggered by the system itself.

Attributes

Supertypes
trait DrivingEvent
trait DomainEvent
class Object
trait Matchable
class Any
Known subtypes
case class InvalidState(reason: String)

An invalid state, reached because of an unexpected event.

An invalid state, reached because of an unexpected event.

Value parameters

reason

The reason why the state is invalid.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

A Tracking with additional information to monitor the user's route.

A Tracking with additional information to monitor the user's route.

Attributes

Supertypes
trait Tracking
class Object
trait Matchable
class Any

The mode of routing to a destination.

The mode of routing to a destination.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class RoutingStarted(timestamp: Instant, user: UserId, group: GroupId, position: GPSLocation, mode: RoutingMode, destination: Address, expectedArrival: Instant) extends ClientDrivingEvent

An event triggered when a user starts routing to a destination.

An event triggered when a user starts routing to a destination.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait DrivingEvent
trait DomainEvent
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class RoutingStopped(timestamp: Instant, user: UserId, group: GroupId) extends ClientDrivingEvent

An event triggered to stop an active route.

An event triggered to stop an active route.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait DrivingEvent
trait DomainEvent
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class SOSAlertStopped(timestamp: Instant, user: UserId, group: GroupId) extends ClientDrivingEvent

An event triggered by a user when stopping the SOS alert.

An event triggered by a user when stopping the SOS alert.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait DrivingEvent
trait DomainEvent
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class SOSAlertTriggered(timestamp: Instant, user: UserId, group: GroupId, position: GPSLocation) extends ClientDrivingEvent

An event triggered by a user when needing help.

An event triggered by a user when needing help.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait DrivingEvent
trait DomainEvent
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class SampledLocation(timestamp: Instant, user: UserId, group: GroupId, position: GPSLocation) extends ClientDrivingEvent

An event triggered regularly on behalf of a user, tracking its position.

An event triggered regularly on behalf of a user, tracking its position.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait DrivingEvent
trait DomainEvent
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class Scope(userId: UserId, groupId: GroupId)

Defines the context in which a user's state is visible and relevant to a specific group. A Scope captures the idea that a user's state can differ depending on the group they are associated with, enabling group-specific visibility and tracking.

Defines the context in which a user's state is visible and relevant to a specific group. A Scope captures the idea that a user's state can differ depending on the group they are associated with, enabling group-specific visibility and tracking.

Value parameters

groupId

The unique identifier of the group.

userId

The unique identifier of the user.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait Session

A facade over the user's state and tracking information.

A facade over the user's state and tracking information.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object Session

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Session.type
case class StuckAlertStopped(timestamp: Instant, user: UserId, group: GroupId) extends InternalEvent

An event triggered when a user stops being stuck.

An event triggered when a user stops being stuck.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait DrivingEvent
trait DomainEvent
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class StuckAlertTriggered(timestamp: Instant, user: UserId, group: GroupId) extends InternalEvent

An event triggered when a user is stuck in the same position for a suspicious amount of time.

An event triggered when a user is stuck in the same position for a suspicious amount of time.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait DrivingEvent
trait DomainEvent
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class TimeoutAlertTriggered(timestamp: Instant, user: UserId, group: GroupId) extends InternalEvent

An event triggered when a user is late to reach a destination.

An event triggered when a user is late to reach a destination.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait DrivingEvent
trait DomainEvent
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
trait Tracking

The tracking of a user.

The tracking of a user.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Tracking

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Tracking.type
enum UserState

The user state information.

The user state information.

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object UserState

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
UserState.type
case class UserUpdate(timestamp: Instant, user: UserId, group: GroupId, position: Option[GPSLocation], status: UserState) extends DrivenEvent

A user update event.

A user update event.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait DrivenEvent
trait DomainEvent
class Object
trait Matchable
class Any
Show all
object UserUpdate

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
UserUpdate.type
case class WentOffline(timestamp: Instant, user: UserId, group: GroupId) extends ClientDrivingEvent

An event triggered when a user goes offline.

An event triggered when a user goes offline.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait DrivingEvent
trait DomainEvent
class Object
trait Matchable
class Any
Show all
object WentOffline

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Types

type Latitude = Double

The latitude of a GPSLocation.

The latitude of a GPSLocation.

Attributes

type Longitude = Double

The longitude of a GPSLocation.

The longitude of a GPSLocation.

Attributes

type Route = List[SampledLocation]

A list of ordered SampledLocations that can be interpolated forming a path between two geographical positions.

A list of ordered SampledLocations that can be interpolated forming a path between two geographical positions.

Attributes

Value members

Concrete methods

def notification(title: String, body: String): NotificationMessage

Creates a new notification message with the given title and body.

Creates a new notification message with the given title and body.

Attributes

Returns

a new NotificationMessage.

Extensions

Extensions

extension (instant: Instant)
def format(using formatter: DateTimeFormatter): String
extension (n: NotificationMessage)
def prepended(prefix: String): NotificationMessage

Attributes

Returns

a new NotificationMessage with the given prefix prepended to the title and body.