GaugeModelActor

actor GaugeModelActor

Actor for managing Gauge models.

Note

Initialize the actor in Task.detached to avoid blocking the main thread.

Lifecycle

Internal

  • Undocumented

    See more

    Declaration

    Swift

    enum Errors : Error, LocalizedError

fetch

  • Undocumented

    Declaration

    Swift

    func fetch(_ descriptor: FetchDescriptor<Gauge>) throws -> [Gauge]

getFavorites

get

  • Undocumented

    Declaration

    Swift

    func get(id: PersistentIdentifier) throws -> Gauge

seedBritishColumbiaGauges

seedOntarioGauges

seedUSGS

  • Undocumented

    Declaration

    Swift

    func seedUSGS() throws

seedUSState

  • Undocumented

    Declaration

    Swift

    func seedUSState(_ usState: String) throws

seedLawa

  • Undocumented

    Declaration

    Swift

    func seedLawa() throws
  • Undocumented

    Declaration

    Swift

    func save() throws

toggleFavorite

  • Undocumented

    Declaration

    Swift

    func toggleFavorite(_ gaugeID: PersistentIdentifier) throws

togglePrimary

  • Undocumented

    Declaration

    Swift

    func togglePrimary(_ gaugeID: PersistentIdentifier) throws

deleteAllReadings

deleteOldReadings

getLatestReadings