Compare commits
4 Commits
db-updates
...
resend-sdk
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6590cbf4be | ||
|
|
61a8c5fe8b | ||
|
|
c79136a06e | ||
|
|
1c196cae9f |
14
README.md
14
README.md
@@ -99,20 +99,6 @@ to the database, and dispatches Discord notifications.
|
|||||||
Firebase, communicates with the API via fetch, and renders the address/alert
|
Firebase, communicates with the API via fetch, and renders the address/alert
|
||||||
management UI.
|
management UI.
|
||||||
|
|
||||||
## TODO
|
|
||||||
|
|
||||||
- [ ] Switch frontend package manager from npm to yarn (per repo policy)
|
|
||||||
- [ ] Rename `go.mod` module path from `github.com/kjannette/koin-ping` to
|
|
||||||
`sneak.berlin/go/koin-ping` (per repo policy)
|
|
||||||
- [ ] Move database migrations to `internal/db/migrations/` and embed them in
|
|
||||||
the binary
|
|
||||||
- [ ] Pin all Docker base images by `@sha256` in Dockerfile
|
|
||||||
- [ ] Install `golangci-lint` locally and pass `make lint`
|
|
||||||
- [ ] Add vitest unit tests for the React frontend
|
|
||||||
- [ ] Add a `make db-reset` / `make migrate` target for schema management
|
|
||||||
- [ ] Set HTTP server read/write timeouts (currently unbounded)
|
|
||||||
- [ ] Replace `log.Printf` calls with structured `log/slog`
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT. See [LICENSE](LICENSE).
|
MIT. See [LICENSE](LICENSE).
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// serverReadTimeoutSeconds is the maximum duration to read a request.
|
// max duration to read a request.
|
||||||
serverReadTimeoutSeconds = 5
|
serverReadTimeoutSeconds = 5
|
||||||
// serverWriteTimeoutSeconds is the maximum duration to write a response.
|
// maxiduration to write a response.
|
||||||
serverWriteTimeoutSeconds = 10
|
serverWriteTimeoutSeconds = 10
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ func main() {
|
|||||||
mux.Handle("DELETE "+b+"/addresses/{addressId}",
|
mux.Handle("DELETE "+b+"/addresses/{addressId}",
|
||||||
middleware.Authenticate(http.HandlerFunc(addressHandler.Remove)))
|
middleware.Authenticate(http.HandlerFunc(addressHandler.Remove)))
|
||||||
|
|
||||||
// Authenticated routes — alert rules
|
// Authenticated routes for alert rules
|
||||||
mux.Handle("POST "+b+"/addresses/{addressId}/alerts",
|
mux.Handle("POST "+b+"/addresses/{addressId}/alerts",
|
||||||
middleware.Authenticate(http.HandlerFunc(alertRuleHandler.Create)))
|
middleware.Authenticate(http.HandlerFunc(alertRuleHandler.Create)))
|
||||||
mux.Handle("GET "+b+"/addresses/{addressId}/alerts",
|
mux.Handle("GET "+b+"/addresses/{addressId}/alerts",
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ require (
|
|||||||
github.com/jackc/puddle/v2 v2.2.2 // indirect
|
github.com/jackc/puddle/v2 v2.2.2 // indirect
|
||||||
github.com/joho/godotenv v1.5.1 // indirect
|
github.com/joho/godotenv v1.5.1 // indirect
|
||||||
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
|
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
|
||||||
|
github.com/resend/resend-go/v3 v3.1.1 // indirect
|
||||||
github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect
|
github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect
|
||||||
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
|
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
|
||||||
go.opentelemetry.io/contrib/detectors/gcp v1.39.0 // indirect
|
go.opentelemetry.io/contrib/detectors/gcp v1.39.0 // indirect
|
||||||
|
|||||||
@@ -92,6 +92,8 @@ github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1
|
|||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
|
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
|
||||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
|
github.com/resend/resend-go/v3 v3.1.1 h1:Uwpf/tZU+O/r/3nMWE6zUAMIG9dX/vTBS3wlQzYJKSw=
|
||||||
|
github.com/resend/resend-go/v3 v3.1.1/go.mod h1:iI7VA0NoGjWvsNii5iNC5Dy0llsI3HncXPejhniYzwE=
|
||||||
github.com/spiffe/go-spiffe/v2 v2.6.0 h1:l+DolpxNWYgruGQVV0xsfeya3CsC7m8iBzDnMpsbLuo=
|
github.com/spiffe/go-spiffe/v2 v2.6.0 h1:l+DolpxNWYgruGQVV0xsfeya3CsC7m8iBzDnMpsbLuo=
|
||||||
github.com/spiffe/go-spiffe/v2 v2.6.0/go.mod h1:gm2SeUoMZEtpnzPNs2Csc0D/gX33k1xIx7lEzqblHEs=
|
github.com/spiffe/go-spiffe/v2 v2.6.0/go.mod h1:gm2SeUoMZEtpnzPNs2Csc0D/gX33k1xIx7lEzqblHEs=
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
|
|||||||
Reference in New Issue
Block a user