This commit is contained in:
2023-03-30 08:44:58 +02:00
parent bf6453b963
commit 0ae5730e7f
17 changed files with 305 additions and 44 deletions

View File

@@ -3,6 +3,7 @@ package storage
import (
"fmt"
"git.coopgo.io/coopgo-platform/carpool-service/internal"
"github.com/paulmach/orb/geojson"
"github.com/spf13/viper"
)
@@ -12,6 +13,12 @@ type Storage interface {
GetUserRegularRoutes(userid string) ([]*geojson.FeatureCollection, error)
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)
}
func NewStorage(cfg *viper.Viper) (Storage, error) {