regular routes journeys, persistent KV to store return states, ...

This commit is contained in:
2023-04-03 20:35:12 +02:00
parent 0ae5730e7f
commit 2f536dfb19
21 changed files with 1722 additions and 1070 deletions

View File

@@ -14,11 +14,16 @@ type Storage interface {
GetDriverRegularRoutesForTile(day string, gridId int64) ([]*geojson.FeatureCollection, error)
GetPassengerRegularRoutesForTile(day string, gridId int64) ([]*geojson.FeatureCollection, error)
StoreSearchResults(string, []internal.SearchResult) error
GetSearchResult(driverOrPassenger, id string) (*internal.SearchResult, error)
CreateBooking(internal.Booking) error
GetBooking(id string) (*internal.Booking, error)
// Caching temporary results
PersistedKVPut(documents []any) error
PersistedKVGet(id string, document any) error
StoreSearchResults([]internal.SearchResult) error
GetSearchResult(id string) (*internal.SearchResult, error)
StoreRouteSchedules([]internal.PlannedRouteSchedule) error
GetRouteSchedules(id string) (*internal.PlannedRouteSchedule, error)
}
func NewStorage(cfg *viper.Viper) (Storage, error) {