William Perron
4c09153756
wip: implement embedded distributed tracing
10 months ago
William Perron
407d63d4e6
remove unused test function
11 months ago
William Perron
1097ce5fce
use table instead of view for better perf
11 months ago
William Perron
31f2813192
fix scheduled message emoji error
11 months ago
William Perron
171ef4ee98
Add `claimables` view to database
...
Materialize all claimable provinces into a view with a column for the
claim type. the `provinc` column contains duplicated rows but each row
contains a unique combination of province and claim type.
This makes it much easier to search possible conflicts, or to list the
availability of provinces.
11 months ago
William Perron
73c327d51b
update provinces table with latest version
...
Fixes #10
11 months ago
William Perron
60c5430594
add doc comment
11 months ago
William Perron
008d025fa0
apply correlation IDs to modal submits and message actions
11 months ago
William Perron
7f78dcdc67
fix tests
11 months ago
William Perron
0a9cc8d7e0
add correlation IDs and propagate ctx
11 months ago
William Perron
b287a95c31
fix bug in logging middleware
11 months ago
William Perron
07252229e0
add interactive button to cancel last minute
11 months ago
William Perron
b292db1050
refactor command logging middleware
11 months ago
William Perron
a38c27ded2
add debug info for each command with total latency
11 months ago
William Perron
04befc00f1
go fmt
11 months ago
William Perron
3d670c420d
optimize discord command registration for faster startup and shutdown
11 months ago
William Perron
c1d5e472f2
add last flush to /info command
11 months ago
William Perron
5cbaff0820
improve logging, use console writer
11 months ago
William Perron
f0c401f604
add tests
11 months ago
William Perron
b040694c2a
add basic audit log
12 months ago
William Perron
638083a755
Add absences feature set
...
## Add absences table and basic queries
* Add migration scripts
* Add queries to add, get and list absences
* Add tests for the above
* Add function to get the date of the next Monday
Also fixes potential bug in the build where the output binary would be
written to a file called `./bin` rather than a file named after the
source directory in a _directory_ called `./bin`.
## Add /schedule command
Adds the Discord slash command to get the schedule for the next few
weeks.
Also updates the required Go version to 1.21 to benefit from the new
`time.DateOnly` format that's gonna be used in the absences table.
## Add scheduled message every Saturday 5pm
Adds the `notify.go` file which manages the scheduling of the recurrent
message that will ping the group every week about the following game.
## Add /absent command
Adds command to register as absent for a specific date. The command
takes in one optional parameter for the date, if none is specified,
defaults to the next session.
12 months ago
William Perron
e9632dfaae
revert README.md
1 year ago
William Perron
aaf569cb69
add golang-migrate
1 year ago
William Perron
e7d12be4b8
avoid panic on uptime
...
Return 0 for darwin systems instead of panicking, and skip the test if
running on darwin.
1 year ago
William Perron
8578a8ad15
add darwin specific uptime variant -- not implemented and never will
1 year ago
William Perron
3f93fd3ba6
small updates to Dockerfile
2 years ago
dependabot[bot]
3e2014ed68
Bump golang.org/x/crypto from 0.0.0-20210421170649-83a5a9bb288b to 0.1.0 ( #19 )
...
Bumps [golang.org/x/crypto](https://github.com/golang/crypto ) from 0.0.0-20210421170649-83a5a9bb288b to 0.1.0.
- [Release notes](https://github.com/golang/crypto/releases )
- [Commits](https://github.com/golang/crypto/commits/v0.1.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/crypto
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years ago
William Perron
c454b92d41
Rename /ping to /info
...
Related to #17
Renames the `/ping` command to `/info` and adds the following
information to the Discord response
* Uptime of the server
* Total number of claims currently held
* Total number of unique players holding claims
2 years ago
William Perron
fb25f21472
update deps and tidy go.mod
2 years ago
William Perron
aa90a44117
smol refactors
2 years ago
William Perron
0497f10e9c
fix: get string value from sql.NullString
2 years ago
William Perron
5793278523
add query context with timeline
...
Also change the row column types to sql.NullString to handle cases where
null values were causing errors in row scanning.
2 years ago
William Perron
4dcbbaa226
fix lint
2 years ago
William Perron
b2d5332f67
WIP: command to run arbitrary selects
2 years ago
William Perron
bd490bc18f
make claim command case insensitive
...
Fixes #3
2 years ago
William Perron
ad22f31bcd
add CI workflow
...
* silence lint errors in certain errchecks
* golangci-lint: skip go installation step
* silence lint error in ResponseWriter Write call
Fixes #13
2 years ago
William Perron
99d527f83e
fix shared db conn in tests
2 years ago
William Perron
679b4136c8
Logging improvements
...
* add zerolog and update existing log references
* add log messages on operation failures
Fixes #14
2 years ago
William Perron
541e8691a9
Add claim details to conflicts output
...
Fixes #2
2 years ago
William Perron
955a2648dd
Add flush command
...
Fixes #8
2 years ago
William Perron
9e63f05ebc
Add describe-claim command
...
Fixes #5
2 years ago
William Perron
84df9458be
Add userid column to claims table
...
Fixes #11
2 years ago
William Perron
c2d8cf2b83
validate that both parameters are present for claim
...
Fixes #1
2 years ago
William Perron
0f9668704d
add `delete-claim` command ( #12 )
...
Closes #9
2 years ago
William Perron
702f3c9da3
add autocomplete for the claim function
2 years ago
William Perron
2a8a36058f
improve docs
2 years ago
William Perron
af2aef6825
update guild id in deployment config
2 years ago
William Perron
40b6f33ee2
add sqlite3 to Docker image
2 years ago
William Perron
da2cf94abf
use environment variable to inject discord app ID and guild ID
2 years ago
William Perron
14cfed1b98
set up litestream replication
2 years ago