refactoring fmt + moving utils
This commit is contained in:
parent
6696cd3152
commit
b7bba4cdaa
|
@ -0,0 +1,8 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/solidarity-service.iml" filepath="$PROJECT_DIR$/.idea/solidarity-service.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="Go" enabled="true" />
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -3,7 +3,7 @@ package handler
|
|||
import (
|
||||
"github.com/paulmach/orb"
|
||||
"github.com/paulmach/orb/geojson"
|
||||
"solidarity-service/servers/utils"
|
||||
"solidarity-service/utils"
|
||||
)
|
||||
|
||||
func (handler *SolidarityServiceHandler) CalculateDistanceBetweenFeatures(feature1, feature2 *geojson.Feature) int64 {
|
||||
|
|
|
@ -9,11 +9,7 @@
|
|||
|
||||
package openapi
|
||||
|
||||
|
||||
|
||||
|
||||
type PassengerPost400Response struct {
|
||||
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
|
||||
package openapi
|
||||
|
||||
|
||||
|
||||
|
||||
type BookingRequest struct {
|
||||
|
||||
// Booking id is common between both operators, and must be created as a [UUID](https://datatracker.ietf.org/doc/html/rfc4122) by whoever initiates the booking. Usage of a [4 UUID](https://datatracker.ietf.org/doc/html/rfc4122#section-4.4) generation algorithm is advised.
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
|
||||
package openapi
|
||||
|
||||
|
||||
|
||||
// BookingStatus : Status of the booking.
|
||||
type BookingStatus string
|
||||
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
|
||||
package openapi
|
||||
|
||||
|
||||
|
||||
|
||||
type Car struct {
|
||||
|
||||
// Model of the car.
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
|
||||
package openapi
|
||||
|
||||
|
||||
|
||||
|
||||
type DriverPunctualAvailabilitiesRequest struct {
|
||||
|
||||
// The address or location description.
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
|
||||
package openapi
|
||||
|
||||
|
||||
|
||||
|
||||
type DriverRegularAvailabilitiesRequest struct {
|
||||
|
||||
// The address or location description.
|
||||
|
|
|
@ -9,11 +9,7 @@
|
|||
|
||||
package openapi
|
||||
|
||||
|
||||
|
||||
|
||||
type DriverTrip struct {
|
||||
|
||||
User User `json:"user"`
|
||||
|
||||
Car Car `json:"car,omitempty"`
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
|
||||
package openapi
|
||||
|
||||
|
||||
|
||||
|
||||
type GetBookings404Response struct {
|
||||
|
||||
// Explain why the request couldn't be processed.
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
|
||||
package openapi
|
||||
|
||||
|
||||
|
||||
|
||||
type JourneySchedule struct {
|
||||
|
||||
// Passenger pickup datetime as a UNIX UTC timestamp in seconds.
|
||||
|
|
|
@ -9,11 +9,7 @@
|
|||
|
||||
package openapi
|
||||
|
||||
|
||||
|
||||
|
||||
type PassengerTripRequest struct {
|
||||
|
||||
User User `json:"user"`
|
||||
|
||||
DestinationAddress string `json:"destination_address"`
|
||||
|
|
|
@ -9,11 +9,7 @@
|
|||
|
||||
package openapi
|
||||
|
||||
|
||||
|
||||
|
||||
type PostConnectionsRequest struct {
|
||||
|
||||
From User `json:"from"`
|
||||
|
||||
To User `json:"to"`
|
||||
|
|
|
@ -9,13 +9,10 @@
|
|||
|
||||
package openapi
|
||||
|
||||
|
||||
import (
|
||||
"errors"
|
||||
)
|
||||
|
||||
|
||||
|
||||
type Preferences struct {
|
||||
|
||||
// If driver journey, specifies if the driver allows smoking in the car.
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
|
||||
package openapi
|
||||
|
||||
|
||||
|
||||
|
||||
type Price struct {
|
||||
|
||||
// Either « FREE », « PAYING » or « UNKNOWN ». « UNKNOWN » is given when it should be « PAYING » but we cannot set the price yet.
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
|
||||
package openapi
|
||||
|
||||
|
||||
|
||||
|
||||
type PunctualAvailabilitySlot struct {
|
||||
|
||||
// UNIX UTC timestamp in seconds.
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
|
||||
package openapi
|
||||
|
||||
|
||||
|
||||
|
||||
type RegularAvailabilitySlot struct {
|
||||
|
||||
// Day of the week for regular scheduling.
|
||||
|
|
|
@ -9,13 +9,10 @@
|
|||
|
||||
package openapi
|
||||
|
||||
|
||||
import (
|
||||
"errors"
|
||||
)
|
||||
|
||||
|
||||
|
||||
type User struct {
|
||||
|
||||
// User's identifier. It MUST be unique for a given `operator`.
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
"github.com/rs/zerolog/log"
|
||||
"github.com/spf13/viper"
|
||||
"solidarity-service/internal"
|
||||
"solidarity-service/servers/utils"
|
||||
"solidarity-service/utils"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
|
Loading…
Reference in New Issue