9 Commits

Author SHA1 Message Date
Iain Sproat 20b5b7fdc3 chore(deps): bump go dependencies (#37)
* chore(deps): bump go dependencies

* chore(deps): bump version of git in Dockerfile builder

* downgrade to previous release candidate of git
2024-06-18 08:54:15 +01:00
Iain Sproat c2457d9061 chore(deps): upgrade go mod deps (#35)
* chore(deps): upgrade go mod deps
* go mod tidy
2024-05-02 16:34:55 +01:00
Iain Sproat 6ff13d331f chore(deps): go get update (#34)
* chore(deps): go get update
* go mod tidy
2024-04-03 16:34:59 +01:00
Iain Sproat a328544e11 chore(deps): bump go dependencies (#30) 2024-01-29 11:58:00 +00:00
Iain Sproat 035505cb0e chore(deps): bump dependencies (#29) 2024-01-03 19:03:24 +00:00
Iain Sproat 5de0c11f44 chore(deps): bump dependencies (#28)
* chore(deps): bumps numerous dependencies to latest versions
- addresses snyk vulnerabilities
* Bump dockerfile packages
2023-08-08 07:06:14 +01:00
Iain Sproat e7fcdec23d chore(deps): bump all dependencies (#27)
* chore(deps): bumps all go dependencies to latest as of 2023-03-16
* chore(deps): bump version of git to 2.38.4-r1
2023-03-16 18:42:25 +00:00
Iain Sproat 3cf3536256 chore(deps): bump all dependencies (#26)
* chore(deps): bump all dependencies
* chore(docker): bump dependencies
2023-02-07 08:49:24 +00:00
Iain Sproat b4a48fd928 Refactor and productionise (#6)
* Adds development instructions to README
* Replaces deprecated io/ioutil with io package
* Catch all thrown errors and handle them.
  - not catching errors could result in unknown behaviour
* Fix gofmt formatting issues
* Refactor to allow http client to be provided
  - default client does not have timeout etc., we may instead wish to provide a custom http client.
* Refactor to something closer to the standard go layout
  - separates alert forwarder into separate package to allow for testing/reuse
* Split out types, and split Discord client into its own package
* Renaming of symbols for readability
  - no need to abbreviate words in modern IDEs
* remove go-vet hook as it is broken when go files are not in root directory
* unit tests for ~90% coverage
* Update picture in README
* Return error status codes to caller in event of error from Discord
* Remove panic, replace with error status code response and log message. Improve the status codes that are returned to provide more context on what has occurred.
* Graceful shutdown of server, including signal handling
* Integration tests
  - mocks Discord server
  - tests Happy case and a couple of unhappy cases
  - most edge conditions are otherwise tested in unit tests
* CheckWebHook should return errors instead of logging
  - additional checks in tests for nil objects
  - attempt to solve integration test pollution by using different port numbers to prevent potential collision
  - Temporarily comment out test causing interaction pollution with other tests
* structured logging
* feat(exponential backoff): Added to Discord client
* Serve prometheus metrics
  - Monitoring for the discord client
* adds correlation ID to logging
* refactors the mock http client to allow it to work with instrumentation for monitoring
* Helm chart service monitor
* Improved flag and env var parsing
* Application version passed in via build args
* Order of precedence of configuration configuration file<environment variable<command line
* Mounts secret to file instead of in environment variable
* Adds build tag to integration tests to prevent them being run as a unit test
2022-11-14 09:46:27 +00:00