Skip to content

Commit

Permalink
chore: add distance field to facility response
Browse files Browse the repository at this point in the history
This will return the proximity distance to a facility whenever coordinates are
provided. The facilities will also be ordered by the distance from the user
  • Loading branch information
Salaton committed Nov 1, 2023
1 parent baaaf53 commit a0b640f
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions output.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,21 @@ type IdentifiersOutput struct {

// FacilityOutput is used to display facility(ies)
type FacilityOutput struct {
ID string `json:"id"`
Created time.Time `json:"created"`
Name string `json:"name"`
Description string `json:"description"`
FacilityType string `json:"facility_type"`
County string `json:"county"`
Country string `json:"country"`
Coordinates CoordinatesOutput `json:"coordinates"`
Status string `json:"status"`
Address string `json:"address"`
Contacts []ContactsOutput `json:"contacts"`
Identifiers []IdentifiersOutput `json:"identifiers"`
BusinessHours []BusinessHoursOutput `json:"businesshours"`
Services []FacilityService `json:"services"`
ID string `json:"id,omitempty"`
Created time.Time `json:"created,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
FacilityType string `json:"facility_type,omitempty"`
County string `json:"county,omitempty"`
Country string `json:"country,omitempty"`
Coordinates CoordinatesOutput `json:"coordinates,omitempty"`
Distance string `json:"distance,omitempty"`
Status string `json:"status,omitempty"`
Address string `json:"address,omitempty"`
Contacts []ContactsOutput `json:"contacts,omitempty"`
Identifiers []IdentifiersOutput `json:"identifiers,omitempty"`
BusinessHours []BusinessHoursOutput `json:"businesshours,omitempty"`
Services []FacilityService `json:"services,omitempty"`
}

// BusinessHoursOutput models data that show facility's operational hours
Expand Down

0 comments on commit a0b640f

Please sign in to comment.