-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Moved structs into new file: models.go.
* Moved constants into new file: constants.go. * Changed name to GoLuas. * Added DynamoDB client code. * Refactored much of codebase into separate functions. * Added error handling. * Added fares API. * Added v1 API support. * Added Easter egg ;)
- Loading branch information
1 parent
35e6eb4
commit a861a7d
Showing
4 changed files
with
301 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
.idea | ||
.vscode | ||
GetLuas | ||
GetLuas.zip | ||
GoLuas | ||
GoLuas.zip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package main | ||
|
||
const awsRegion string = "eu-west-1" | ||
const dynamoDBTable string = "GoLuasStops" | ||
const logPrefixError string = "ERROR" | ||
const logPrefixInfo string = "INFO" | ||
const responseMessageInvalidRequest string = `{"message": "Invalid request"}` | ||
const responseMessageGeneralFaresError string = `{"message": "General error getting fares"}` | ||
const responseMessageGeneralTimesError string = `{"message": "General error getting times"}` | ||
const responseMessageImATeapot string = `{"message": "Your request to brew coffee with this server has failed. This HTCPCP server is a teapot. The requested entity body is short and stout. Tip me over and pour me out."}` | ||
const responseMessageUnknownStop string = `{"message": "Unknown stop"}` | ||
const rpaForecastURLV1 string = "http://luasforecasts.rpa.ie/xml/get.ashx?encrypt=false&ver=1&" | ||
const rpaForecastURLV2 string = "http://luasforecasts.rpa.ie/xml/get.ashx?encrypt=false&ver=2&" |
Oops, something went wrong.