diff --git a/integration/oasis/solution/doc.go b/integration/oasis/solution/doc.go new file mode 100644 index 00000000000..025b66e0061 --- /dev/null +++ b/integration/oasis/solution/doc.go @@ -0,0 +1,7 @@ +/* +package solution defines internal foramt for recording single solution result. +It isolates internal calculation logic and final restful response: +- Internal algorithm will calculate result in this format. +- In the end, oasis will use this format to generate restful response. +*/ +package solution diff --git a/integration/oasis/solution/solution.go b/integration/oasis/solution/solution.go new file mode 100644 index 00000000000..181e72f2c3e --- /dev/null +++ b/integration/oasis/solution/solution.go @@ -0,0 +1,26 @@ +package solution + +// Solution contains summary and selected charge stations +type Solution struct { + Distance float64 + Duration float64 + RemainingRage float64 + Weight float64 + ChargeStations []*ChargeStation +} + +// ChargeStation contains all information related with specific charge station +type ChargeStation struct { + Location Location + StationID string + ArrivalEnergy float64 + WaitTime float64 + ChargeTime float64 + ChargeRange float64 +} + +// Location defines the geo location of a station +type Location struct { + Lat float64 + Lon float64 +}