carpool-service/storage/storage_test.go

1093 lines
35 KiB
Go
Raw Normal View History

package storage
import (
"git.coopgo.io/coopgo-platform/carpool-service/internal"
"git.coopgo.io/coopgo-platform/carpool-service/interoperability/ocss"
"github.com/google/uuid"
)
var regularroute1 = `{
"id" : "5ead15aa-fc4e-46ff-bac8-a3d0e98d169e",
"grid_ids" : [
48067
],
"properties" : {
"user" : {
"lastName" : "Testlastname",
"id" : "ca435b62-3162-4c79-983a-2a0f4fb16aa0",
"operator" : "ridygo.fr",
"alias" : "Firstname",
"firstName" : "Firstname"
},
"driver_options" : {
"pricing" : {
"fixed" : 0.0,
"per_km" : 0.0
}
},
"is_driver" : true,
"is_passenger" : true,
"passenger_options" : {
},
"polyline" : "nopolyline",
"schedules" : [
{
"day" : "MON",
"time_of_day" : "08:00"
},
{
"day" : "TUE",
"time_of_day" : "08:00"
},
{
"day" : "WED",
"time_of_day" : "08:00"
},
{
"day" : "THU",
"time_of_day" : "08:00"
},
{
"day" : "FRI",
"time_of_day" : "08:00"
}
]
},
"routes_group_id" : "5d3c2b41-51d2-403d-9dab-0b3bcaf60ed7",
"type" : "FeatureCollection",
"features" : [
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "Point",
"coordinates" : [
7.106398,
43.58758
]
},
"properties" : {
"country_gid" : "whosonfirst:country:85633147",
"localadmin_gid" : "whosonfirst:localadmin:1159321935",
"locality" : "Antibes",
"name" : "400 Chemin De Rabiac Estagnol",
"county_gid" : "whosonfirst:county:102072099",
"housenumber" : "400",
"macrocounty" : "Grasse",
"accuracy" : "point",
"country_a" : "FRA",
"gid" : "openaddresses:address:fr/countrywide:20c6c6d69049a07b",
"country" : "France",
"layer" : "address",
"macroregion_a" : "PR",
"region_gid" : "whosonfirst:region:85683323",
"source_id" : "fr/countrywide:20c6c6d69049a07b",
"distance" : 496.909,
"postalcode" : "06600",
"street" : "Chemin De Rabiac Estagnol",
"county" : "Antibes",
"locality_gid" : "whosonfirst:locality:101748955",
"macrocounty_gid" : "whosonfirst:macrocounty:404227597",
"region_a" : "AM",
"localadmin" : "Antibes",
"macroregion" : "Provence-Alpes-Cote d'Azur",
"macroregion_gid" : "whosonfirst:macroregion:404227445",
"source" : "openaddresses",
"id" : "fr/countrywide:20c6c6d69049a07b",
"label" : "400 Chemin De Rabiac Estagnol, Antibes, France",
"region" : "Alpes-Maritimes"
}
},
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "Point",
"coordinates" : [
7.047264,
43.623497
]
},
"properties" : {
"accuracy" : "point",
"macroregion_gid" : "whosonfirst:macroregion:404227445",
"source" : "openaddresses",
"region_a" : "AM",
"distance" : 490.705,
"locality" : "Valbonne",
"macrocounty_gid" : "whosonfirst:macrocounty:404227597",
"macroregion" : "Provence-Alpes-Cote d'Azur",
"macroregion_a" : "PR",
"name" : "6 Rue Soutrane",
"region" : "Alpes-Maritimes",
"localadmin" : "Valbonne",
"macrocounty" : "Grasse",
"region_gid" : "whosonfirst:region:85683323",
"street" : "Rue Soutrane",
"county" : "Le Bar-sur-Loup",
"locality_gid" : "whosonfirst:locality:101750713",
"country_gid" : "whosonfirst:country:85633147",
"gid" : "openaddresses:address:fr/countrywide:cb95350daaae60b3",
"id" : "fr/countrywide:cb95350daaae60b3",
"postalcode" : "06560",
"housenumber" : "6",
"label" : "6 Rue Soutrane, Valbonne, France",
"layer" : "address",
"country" : "France",
"country_a" : "FRA",
"county_gid" : "whosonfirst:county:102064433",
"localadmin_gid" : "whosonfirst:localadmin:404368657",
"source_id" : "fr/countrywide:cb95350daaae60b3"
}
},
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "LineString",
"coordinates" : [
[
7.10643,
43.58756
],
[
7.08307,
43.60216
],
[
7.0632,
43.60346
],
[
7.0357,
43.61976
],
[
7.03876,
43.62529
],
[
7.04724,
43.62355
]
]
},
"properties" : {
"encoded_polyline" : "nopolyline"
}
}
]
}`
var regularroute2 = `{
"id" : "efcde879-6066-48ae-a5b1-f1d9d923d30a",
"type" : "FeatureCollection",
"features" : [
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "Point",
"coordinates" : [
7.047264,
43.623497
]
},
"properties" : {
"country" : "France",
"locality" : "Valbonne",
"source" : "openaddresses",
"layer" : "address",
"macroregion_gid" : "whosonfirst:macroregion:404227445",
"postalcode" : "06560",
"region" : "Alpes-Maritimes",
"street" : "Rue Soutrane",
"distance" : 490.705,
"localadmin_gid" : "whosonfirst:localadmin:404368657",
"macroregion" : "Provence-Alpes-Cote d'Azur",
"macroregion_a" : "PR",
"gid" : "openaddresses:address:fr/countrywide:cb95350daaae60b3",
"housenumber" : "6",
"label" : "6 Rue Soutrane, Valbonne, France",
"locality_gid" : "whosonfirst:locality:101750713",
"macrocounty_gid" : "whosonfirst:macrocounty:404227597",
"name" : "6 Rue Soutrane",
"region_a" : "AM",
"country_a" : "FRA",
"county" : "Le Bar-sur-Loup",
"localadmin" : "Valbonne",
"source_id" : "fr/countrywide:cb95350daaae60b3",
"accuracy" : "point",
"id" : "fr/countrywide:cb95350daaae60b3",
"region_gid" : "whosonfirst:region:85683323",
"country_gid" : "whosonfirst:country:85633147",
"county_gid" : "whosonfirst:county:102064433",
"macrocounty" : "Grasse"
}
},
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "Point",
"coordinates" : [
7.106398,
43.58758
]
},
"properties" : {
"locality_gid" : "whosonfirst:locality:101748955",
"country_a" : "FRA",
"macrocounty" : "Grasse",
"macroregion_gid" : "whosonfirst:macroregion:404227445",
"postalcode" : "06600",
"source_id" : "fr/countrywide:20c6c6d69049a07b",
"county" : "Antibes",
"name" : "400 Chemin De Rabiac Estagnol",
"region_a" : "AM",
"source" : "openaddresses",
"layer" : "address",
"distance" : 496.909,
"localadmin_gid" : "whosonfirst:localadmin:1159321935",
"macrocounty_gid" : "whosonfirst:macrocounty:404227597",
"macroregion" : "Provence-Alpes-Cote d'Azur",
"accuracy" : "point",
"id" : "fr/countrywide:20c6c6d69049a07b",
"locality" : "Antibes",
"country_gid" : "whosonfirst:country:85633147",
"gid" : "openaddresses:address:fr/countrywide:20c6c6d69049a07b",
"housenumber" : "400",
"street" : "Chemin De Rabiac Estagnol",
"country" : "France",
"region_gid" : "whosonfirst:region:85683323",
"label" : "400 Chemin De Rabiac Estagnol, Antibes, France",
"localadmin" : "Antibes",
"macroregion_a" : "PR",
"region" : "Alpes-Maritimes",
"county_gid" : "whosonfirst:county:102072099"
}
},
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "LineString",
"coordinates" : [
[
7.04724,
43.62355
],
[
7.05507,
43.62677
],
[
7.05942,
43.62123
],
[
7.08051,
43.61504
],
[
7.08373,
43.60162
],
[
7.10643,
43.58756
]
]
},
"properties" : {
"encoded_polyline" : "noencodedpolyline"
}
}
],
"properties" : {
"polyline" : "noencodedpolyline",
"schedules" : [
{
"day" : "MON",
"time_of_day" : "18:00"
},
{
"time_of_day" : "18:00",
"day" : "TUE"
},
{
"time_of_day" : "18:00",
"day" : "WED"
},
{
"day" : "THU",
"time_of_day" : "18:00"
},
{
"day" : "FRI",
"time_of_day" : "18:00"
}
],
"user" : {
"id" : "ca435b62-3162-4c79-983a-2a0f4fb16aa0",
"operator" : "ridygo.fr",
"alias" : "Firstname",
"firstName" : "Firstname",
"lastName" : "Testlastname"
},
"driver_options" : {
"pricing" : {
"fixed" : 0.0,
"per_km" : 0.0
}
},
"is_driver" : true,
"is_passenger" : true,
"passenger_options" : {
}
},
"routes_group_id" : "5d3c2b41-51d2-403d-9dab-0b3bcaf60ed7",
"grid_ids" : [
48067
]
}`
var regularroute3 = `{
"id" : "eca00e7f-2470-40df-bebb-9db6302fb969",
"type" : "FeatureCollection",
"features" : [
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "Point",
"coordinates" : [
7.091261,
43.595551
]
},
"properties" : {
"gid" : "openstreetmap:venue:node/552358080",
"source_id" : "node/552358080",
"macrocounty" : "Grasse",
"postalcode" : "06600",
"county" : "Antibes",
"county_gid" : "whosonfirst:county:102072099",
"locality_gid" : "whosonfirst:locality:101748955",
"country" : "France",
"localadmin" : "Antibes",
"macroregion_gid" : "whosonfirst:macroregion:404227445",
"region_gid" : "whosonfirst:region:85683323",
"country_gid" : "whosonfirst:country:85633147",
"distance" : 495.416,
"layer" : "venue",
"region" : "Alpes-Maritimes",
"addendum" : {
"osm" : {
"opening_hours:covid19" : "off",
"operator" : "La Poste"
}
},
"country_a" : "FRA",
"id" : "node/552358080",
"macroregion" : "Provence-Alpes-Cote d'Azur",
"macroregion_a" : "PR",
"name" : "Croix Rouge",
"accuracy" : "point",
"localadmin_gid" : "whosonfirst:localadmin:1159321935",
"macrocounty_gid" : "whosonfirst:macrocounty:404227597",
"locality" : "Antibes",
"region_a" : "AM",
"label" : "Croix Rouge, Antibes, France",
"source" : "openstreetmap"
}
},
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "Point",
"coordinates" : [
7.039535,
43.625465
]
},
"properties" : {
"localadmin" : "Valbonne",
"macroregion" : "Provence-Alpes-Cote d'Azur",
"macroregion_a" : "PR",
"region" : "Alpes-Maritimes",
"region_gid" : "whosonfirst:region:85683323",
"street" : "Route Des Dolines",
"distance" : 490.106,
"source_id" : "fr/countrywide:f18fcb5874ed2fbe",
"country_gid" : "whosonfirst:country:85633147",
"county_gid" : "whosonfirst:county:102064433",
"housenumber" : "1240",
"label" : "1240 Route Des Dolines, Valbonne, France",
"postalcode" : "06560",
"accuracy" : "point",
"country_a" : "FRA",
"layer" : "address",
"macrocounty_gid" : "whosonfirst:macrocounty:404227597",
"name" : "1240 Route Des Dolines",
"source" : "openaddresses",
"county" : "Le Bar-sur-Loup",
"id" : "fr/countrywide:f18fcb5874ed2fbe",
"region_a" : "AM",
"gid" : "openaddresses:address:fr/countrywide:f18fcb5874ed2fbe",
"locality" : "Valbonne",
"locality_gid" : "whosonfirst:locality:101750713",
"country" : "France",
"localadmin_gid" : "whosonfirst:localadmin:404368657",
"macrocounty" : "Grasse",
"macroregion_gid" : "whosonfirst:macroregion:404227445"
}
},
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "LineString",
"coordinates" : [
[
7.09133,
43.59565
],
[
7.0826,
43.60233
],
[
7.0632,
43.60346
],
[
7.03855,
43.617
],
[
7.03558,
43.62068
],
[
7.03951,
43.62551
]
]
},
"properties" : {
"encoded_polyline" : "nopolyline"
}
}
],
"properties" : {
"passenger_options" : {
},
"polyline" : "nopolyline",
"schedules" : [
{
"day" : "MON",
"time_of_day" : "08:00"
},
{
"day" : "TUE",
"time_of_day" : "08:00"
},
{
"day" : "WED",
"time_of_day" : "08:00"
},
{
"day" : "THU",
"time_of_day" : "08:00"
},
{
"day" : "FRI",
"time_of_day" : "08:00"
}
],
"user" : {
"id" : "d1bdbf1e-4f00-4173-8ef6-03161e96bc55",
"operator" : "ridygo.fr",
"alias" : "Firstname Test",
"firstName" : "Firstname Test",
"lastName" : "Testlastname"
},
"driver_options" : {
"pricing" : {
"per_km" : 0.0,
"fixed" : 0.0
}
},
"is_driver" : false,
"is_passenger" : true
},
"routes_group_id" : "90fc2c97-b7b1-41d3-803e-a40fde84c564",
"grid_ids" : [
48067
]
}`
var regularroute4 = `{
"id" : "3a6f2f71-2cda-4c59-b803-a6e8a1671bdb",
"routes_group_id" : "90fc2c97-b7b1-41d3-803e-a40fde84c564",
"grid_ids" : [
48067
],
"type" : "FeatureCollection",
"features" : [
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "Point",
"coordinates" : [
7.039535,
43.625465
]
},
"properties" : {
"country_gid" : "whosonfirst:country:85633147",
"name" : "1240 Route Des Dolines",
"country_a" : "FRA",
"label" : "1240 Route Des Dolines, Valbonne, France",
"county_gid" : "whosonfirst:county:102064433",
"county" : "Le Bar-sur-Loup",
"layer" : "address",
"postalcode" : "06560",
"source_id" : "fr/countrywide:f18fcb5874ed2fbe",
"country" : "France",
"region" : "Alpes-Maritimes",
"region_gid" : "whosonfirst:region:85683323",
"source" : "openaddresses",
"street" : "Route Des Dolines",
"macroregion" : "Provence-Alpes-Cote d'Azur",
"macrocounty_gid" : "whosonfirst:macrocounty:404227597",
"macroregion_gid" : "whosonfirst:macroregion:404227445",
"housenumber" : "1240",
"localadmin" : "Valbonne",
"locality" : "Valbonne",
"macroregion_a" : "PR",
"id" : "fr/countrywide:f18fcb5874ed2fbe",
"macrocounty" : "Grasse",
"distance" : 490.106,
"gid" : "openaddresses:address:fr/countrywide:f18fcb5874ed2fbe",
"localadmin_gid" : "whosonfirst:localadmin:404368657",
"locality_gid" : "whosonfirst:locality:101750713",
"region_a" : "AM",
"accuracy" : "point"
}
},
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "Point",
"coordinates" : [
7.091261,
43.595551
]
},
"properties" : {
"localadmin" : "Antibes",
"accuracy" : "point",
"country_a" : "FRA",
"label" : "Croix Rouge, Antibes, France",
"region_gid" : "whosonfirst:region:85683323",
"addendum" : {
"osm" : {
"opening_hours:covid19" : "off",
"operator" : "La Poste"
}
},
"county" : "Antibes",
"id" : "node/552358080",
"locality" : "Antibes",
"region" : "Alpes-Maritimes",
"country" : "France",
"county_gid" : "whosonfirst:county:102072099",
"macrocounty" : "Grasse",
"macroregion" : "Provence-Alpes-Cote d'Azur",
"source_id" : "node/552358080",
"country_gid" : "whosonfirst:country:85633147",
"distance" : 495.416,
"layer" : "venue",
"region_a" : "AM",
"macroregion_a" : "PR",
"macroregion_gid" : "whosonfirst:macroregion:404227445",
"name" : "Croix Rouge",
"postalcode" : "06600",
"source" : "openstreetmap",
"gid" : "openstreetmap:venue:node/552358080",
"localadmin_gid" : "whosonfirst:localadmin:1159321935",
"locality_gid" : "whosonfirst:locality:101748955",
"macrocounty_gid" : "whosonfirst:macrocounty:404227597"
}
},
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "LineString",
"coordinates" : [
[
7.03951,
43.62551
],
[
7.03131,
43.62366
],
[
7.03741,
43.61673
],
[
7.06329,
43.60334
],
[
7.08227,
43.60214
],
[
7.09133,
43.59565
]
]
},
"properties" : {
"encoded_polyline" : "polyline"
}
}
],
"properties" : {
"schedules" : [
{
"day" : "MON",
"time_of_day" : "18:00"
},
{
"day" : "TUE",
"time_of_day" : "18:00"
},
{
"day" : "WED",
"time_of_day" : "18:00"
},
{
"day" : "THU",
"time_of_day" : "18:00"
},
{
"time_of_day" : "18:00",
"day" : "FRI"
}
],
"user" : {
"alias" : "Firstname Test",
"firstName" : "Firstname Test",
"lastName" : "Testlastname",
"id" : "d1bdbf1e-4f00-4173-8ef6-03161e96bc55",
"operator" : "ridygo.fr"
},
"driver_options" : {
"pricing" : {
"fixed" : 0.0,
"per_km" : 0.0
}
},
"is_driver" : true,
"is_passenger" : false,
"passenger_options" : {
},
"polyline" : "polyline"
}
}`
var regularroute5 = `{
"id" : "6e94d8be-22cd-405b-8b4e-8dbd341d2adb",
"properties" : {
"driver_options" : {
"pricing" : {
"fixed" : 0.0,
"per_km" : 0.0
}
},
"is_driver" : true,
"is_passenger" : true,
"passenger_options" : {
},
"polyline" : "polyline",
"schedules" : [
{
"day" : "MON",
"time_of_day" : "08:00"
},
{
"day" : "TUE",
"time_of_day" : "08:00"
},
{
"day" : "WED",
"time_of_day" : "08:00"
},
{
"day" : "THU",
"time_of_day" : "08:00"
},
{
"day" : "FRI",
"time_of_day" : "08:00"
}
],
"user" : {
"id" : "d1bdbf1e-4f00-4173-8ef6-03161e96bc55",
"operator" : "ridygo.fr",
"alias" : "Firstname Test",
"firstName" : "Firstname Test",
"lastName" : "Testlastname"
}
},
"routes_group_id" : "d3f18947-66a1-4649-8c0d-685964cab8bb",
"grid_ids" : [
48068
],
"type" : "FeatureCollection",
"features" : [
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "Point",
"coordinates" : [
7.12482,
43.58403
]
},
"properties" : {
"macroregion_a" : "PR",
"macroregion_gid" : "whosonfirst:macroregion:404227445",
"name" : "Port Vauban",
"region_a" : "AM",
"county" : "Antibes",
"distance" : 498.25,
"label" : "Port Vauban, Antibes, France",
"macroregion" : "Provence-Alpes-Cote d'Azur",
"source" : "openstreetmap",
"country" : "France",
"gid" : "openstreetmap:venue:node/2261575893",
"layer" : "venue",
"locality_gid" : "whosonfirst:locality:101748955",
"locality" : "Antibes",
"macrocounty" : "Grasse",
"region" : "Alpes-Maritimes",
"region_gid" : "whosonfirst:region:85683323",
"accuracy" : "point",
"id" : "node/2261575893",
"localadmin" : "Antibes",
"localadmin_gid" : "whosonfirst:localadmin:1159321935",
"source_id" : "node/2261575893",
"country_a" : "FRA",
"country_gid" : "whosonfirst:country:85633147",
"county_gid" : "whosonfirst:county:102072099",
"macrocounty_gid" : "whosonfirst:macrocounty:404227597"
}
},
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "Point",
"coordinates" : [
7.039535,
43.625465
]
},
"properties" : {
"macrocounty_gid" : "whosonfirst:macrocounty:404227597",
"county_gid" : "whosonfirst:county:102064433",
"id" : "fr/countrywide:f18fcb5874ed2fbe",
"localadmin_gid" : "whosonfirst:localadmin:404368657",
"macrocounty" : "Grasse",
"country_a" : "FRA",
"label" : "1240 Route Des Dolines, Valbonne, France",
"region_gid" : "whosonfirst:region:85683323",
"country" : "France",
"county" : "Le Bar-sur-Loup",
"locality" : "Valbonne",
"macroregion_gid" : "whosonfirst:macroregion:404227445",
"region" : "Alpes-Maritimes",
"street" : "Route Des Dolines",
"postalcode" : "06560",
"country_gid" : "whosonfirst:country:85633147",
"gid" : "openaddresses:address:fr/countrywide:f18fcb5874ed2fbe",
"layer" : "address",
"macroregion_a" : "PR",
"accuracy" : "point",
"housenumber" : "1240",
"source_id" : "fr/countrywide:f18fcb5874ed2fbe",
"distance" : 490.106,
"localadmin" : "Valbonne",
"macroregion" : "Provence-Alpes-Cote d'Azur",
"source" : "openaddresses",
"locality_gid" : "whosonfirst:locality:101750713",
"name" : "1240 Route Des Dolines",
"region_a" : "AM"
}
},
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "LineString",
"coordinates" : [
[
7.12481,
43.58399
],
[
7.11211,
43.58609
],
[
7.08283,
43.60226
],
[
7.0632,
43.60346
],
[
7.03636,
43.61877
],
[
7.03951,
43.62551
]
]
},
"properties" : {
"encoded_polyline" : "polyline"
}
}
]
}`
var regularroute6 = `{
"id" : "869d2f9f-96fa-4da2-9843-5edb60e9e130",
"features" : [
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "Point",
"coordinates" : [
7.039535,
43.625465
]
},
"properties" : {
"country" : "France",
"id" : "fr/countrywide:f18fcb5874ed2fbe",
"locality" : "Valbonne",
"locality_gid" : "whosonfirst:locality:101750713",
"macrocounty_gid" : "whosonfirst:macrocounty:404227597",
"postalcode" : "06560",
"distance" : 490.106,
"housenumber" : "1240",
"localadmin_gid" : "whosonfirst:localadmin:404368657",
"street" : "Route Des Dolines",
"country_gid" : "whosonfirst:country:85633147",
"name" : "1240 Route Des Dolines",
"region_gid" : "whosonfirst:region:85683323",
"gid" : "openaddresses:address:fr/countrywide:f18fcb5874ed2fbe",
"layer" : "address",
"localadmin" : "Valbonne",
"county" : "Le Bar-sur-Loup",
"county_gid" : "whosonfirst:county:102064433",
"macrocounty" : "Grasse",
"macroregion" : "Provence-Alpes-Cote d'Azur",
"macroregion_gid" : "whosonfirst:macroregion:404227445",
"region_a" : "AM",
"source_id" : "fr/countrywide:f18fcb5874ed2fbe",
"accuracy" : "point",
"country_a" : "FRA",
"region" : "Alpes-Maritimes",
"source" : "openaddresses",
"label" : "1240 Route Des Dolines, Valbonne, France",
"macroregion_a" : "PR"
}
},
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "Point",
"coordinates" : [
7.12482,
43.58403
]
},
"properties" : {
"accuracy" : "point",
"country" : "France",
"layer" : "venue",
"region_gid" : "whosonfirst:region:85683323",
"country_gid" : "whosonfirst:country:85633147",
"distance" : 498.25,
"gid" : "openstreetmap:venue:node/2261575893",
"id" : "node/2261575893",
"label" : "Port Vauban, Antibes, France",
"localadmin" : "Antibes",
"localadmin_gid" : "whosonfirst:localadmin:1159321935",
"locality" : "Antibes",
"macrocounty" : "Grasse",
"macrocounty_gid" : "whosonfirst:macrocounty:404227597",
"macroregion" : "Provence-Alpes-Cote d'Azur",
"name" : "Port Vauban",
"region" : "Alpes-Maritimes",
"country_a" : "FRA",
"county_gid" : "whosonfirst:county:102072099",
"locality_gid" : "whosonfirst:locality:101748955",
"macroregion_a" : "PR",
"region_a" : "AM",
"source" : "openstreetmap",
"source_id" : "node/2261575893",
"county" : "Antibes",
"macroregion_gid" : "whosonfirst:macroregion:404227445"
}
},
{
"id" : null,
"type" : "Feature",
"geometry" : {
"type" : "LineString",
"coordinates" : [
[
7.03951,
43.62551
],
[
7.03131,
43.62362
],
[
7.06329,
43.60334
],
[
7.08227,
43.60214
],
[
7.11211,
43.58609
],
[
7.12481,
43.58399
]
]
},
"properties" : {
"encoded_polyline" : "polyline"
}
}
],
"properties" : {
"is_driver" : true,
"is_passenger" : true,
"passenger_options" : {
},
"polyline" : "polyline",
"schedules" : [
{
"day" : "MON",
"time_of_day" : "18:00"
},
{
"day" : "TUE",
"time_of_day" : "18:00"
},
{
"day" : "WED",
"time_of_day" : "18:00"
},
{
"time_of_day" : "18:00",
"day" : "THU"
},
{
"day" : "FRI",
"time_of_day" : "18:00"
}
],
"user" : {
"lastName" : "Testlastname",
"id" : "d1bdbf1e-4f00-4173-8ef6-03161e96bc55",
"operator" : "ridygo.fr",
"alias" : "Firstname Test",
"firstName" : "Firstname Test"
},
"driver_options" : {
"pricing" : {
"fixed" : 0.0,
"per_km" : 0.0
}
}
},
"routes_group_id" : "d3f18947-66a1-4649-8c0d-685964cab8bb",
"grid_ids" : [
48068
],
"type" : "FeatureCollection"
}`
var booking1id = uuid.NewString()
var bookinguser1 = uuid.NewString()
var booking1 = internal.Booking{
Booking: ocss.Booking{
ID: booking1id,
Driver: ocss.User{
ID: bookinguser1,
},
Passenger: ocss.User{
ID: uuid.NewString(),
},
},
}
var booking2 = internal.Booking{
Booking: ocss.Booking{
ID: uuid.NewString(),
Driver: ocss.User{
ID: uuid.NewString(),
},
Passenger: ocss.User{
ID: bookinguser1,
},
},
}
var booking3 = internal.Booking{
Booking: ocss.Booking{
ID: uuid.NewString(),
Driver: ocss.User{
ID: uuid.NewString(),
},
Passenger: ocss.User{
ID: uuid.NewString(),
},
},
}