renamed neighbour to neighbor

This commit is contained in:
Matthias Hannig 2018-10-03 18:02:56 +02:00
parent dbf88195b9
commit dfd2b0dd15
2 changed files with 19 additions and 19 deletions

View File

@ -26,8 +26,8 @@ import (
// Routeservers // Routeservers
// List /api/v1/routeservers // List /api/v1/routeservers
// Status /api/v1/routeservers/:id/status // Status /api/v1/routeservers/:id/status
// Neighbors /api/v1/routeservers/:id/neighbours // Neighbors /api/v1/routeservers/:id/neighbors
// Routes /api/v1/routeservers/:id/neighbours/:neighbourId/routes // Routes /api/v1/routeservers/:id/neighbors/:neighborId/routes
// //
// Querying // Querying
// LookupPrefix /api/v1/routeservers/:id/lookup/prefix?q=<prefix> // LookupPrefix /api/v1/routeservers/:id/lookup/prefix?q=<prefix>
@ -96,15 +96,15 @@ func apiRegisterEndpoints(router *httprouter.Router) error {
endpoint(apiRouteserversList)) endpoint(apiRouteserversList))
router.GET("/api/v1/routeservers/:id/status", router.GET("/api/v1/routeservers/:id/status",
endpoint(apiStatus)) endpoint(apiStatus))
router.GET("/api/v1/routeservers/:id/neighbours", router.GET("/api/v1/routeservers/:id/neighbors",
endpoint(apiNeighborsList)) endpoint(apiNeighborsList))
router.GET("/api/v1/routeservers/:id/neighbours/:neighbourId/routes", router.GET("/api/v1/routeservers/:id/neighbors/:neighborId/routes",
endpoint(apiRoutesList)) endpoint(apiRoutesList))
router.GET("/api/v1/routeservers/:id/neighbours/:neighbourId/routes/received", router.GET("/api/v1/routeservers/:id/neighbors/:neighborId/routes/received",
endpoint(apiRoutesListReceived)) endpoint(apiRoutesListReceived))
router.GET("/api/v1/routeservers/:id/neighbours/:neighbourId/routes/filtered", router.GET("/api/v1/routeservers/:id/neighbors/:neighborId/routes/filtered",
endpoint(apiRoutesListFiltered)) endpoint(apiRoutesListFiltered))
router.GET("/api/v1/routeservers/:id/neighbours/:neighbourId/routes/not-exported", router.GET("/api/v1/routeservers/:id/neighbors/:neighborId/routes/not-exported",
endpoint(apiRoutesListNotExported)) endpoint(apiRoutesListNotExported))
// Querying // Querying

View File

@ -13,11 +13,11 @@ func apiRoutesList(_req *http.Request, params httprouter.Params) (api.Response,
if err != nil { if err != nil {
return nil, err return nil, err
} }
neighbourId := params.ByName("neighbourId") neighborId := params.ByName("neighborId")
source := AliceConfig.Sources[rsId].getInstance() source := AliceConfig.Sources[rsId].getInstance()
result, err := source.Routes(neighbourId) result, err := source.Routes(neighborId)
if err != nil { if err != nil {
apiLogSourceError("routes", rsId, neighbourId, err) apiLogSourceError("routes", rsId, neighborId, err)
} }
return result, err return result, err
@ -33,11 +33,11 @@ func apiRoutesListReceived(
return nil, err return nil, err
} }
neighbourId := params.ByName("neighbourId") neighborId := params.ByName("neighborId")
source := AliceConfig.Sources[rsId].getInstance() source := AliceConfig.Sources[rsId].getInstance()
result, err := source.RoutesReceived(neighbourId) result, err := source.RoutesReceived(neighborId)
if err != nil { if err != nil {
apiLogSourceError("routes_received", rsId, neighbourId, err) apiLogSourceError("routes_received", rsId, neighborId, err)
return nil, err return nil, err
} }
@ -70,11 +70,11 @@ func apiRoutesListFiltered(
return nil, err return nil, err
} }
neighbourId := params.ByName("neighbourId") neighborId := params.ByName("neighborId")
source := AliceConfig.Sources[rsId].getInstance() source := AliceConfig.Sources[rsId].getInstance()
result, err := source.RoutesFiltered(neighbourId) result, err := source.RoutesFiltered(neighborId)
if err != nil { if err != nil {
apiLogSourceError("routes_filtered", rsId, neighbourId, err) apiLogSourceError("routes_filtered", rsId, neighborId, err)
return nil, err return nil, err
} }
@ -107,11 +107,11 @@ func apiRoutesListNotExported(
return nil, err return nil, err
} }
neighbourId := params.ByName("neighbourId") neighborId := params.ByName("neighborId")
source := AliceConfig.Sources[rsId].getInstance() source := AliceConfig.Sources[rsId].getInstance()
result, err := source.RoutesNotExported(neighbourId) result, err := source.RoutesNotExported(neighborId)
if err != nil { if err != nil {
apiLogSourceError("routes_not_exported", rsId, neighbourId, err) apiLogSourceError("routes_not_exported", rsId, neighborId, err)
return nil, err return nil, err
} }