feat: Major refactor, implement web, caching, better tests and build files

* Update golang version to 1.24
* Update multiarch Dockerfile to be more ISA agnostic
* Refactor existing code and properly structure project into modules
* Get rid of global variables except where necessary (go:embed)
* Add default values to Config
* Add webserver with templates to finally correctly serve videos and gifs
* Add tiny caching library to decrease api load and improve latency
* Improve Webhook data preparation by filtering out redundant links
  from the tweet text and properly attaching videos and gifs in separate
  webhook request by utilising new webserver
* Improve tests for filter function
* Improve bake definition for easier CI integration
This commit is contained in:
Manuel 2025-03-18 19:22:00 +01:00
parent 7562b86894
commit 21d580d1a6
Signed by: Manuel
GPG key ID: 4085037435E1F07A
24 changed files with 752 additions and 209 deletions

12
go.mod generated
View file

@ -1,15 +1,17 @@
module git.snrd.eu/sunred/discord-tweeter
go 1.21
go 1.23.0
toolchain go1.24.1
require (
github.com/BurntSushi/toml v1.3.2
github.com/imperatrona/twitter-scraper v0.0.0-20240425221339-715658ada4d9
github.com/BurntSushi/toml v1.5.0
github.com/imperatrona/twitter-scraper v0.0.16
github.com/jmoiron/sqlx v1.4.0
github.com/mattn/go-sqlite3 v1.14.22
github.com/mattn/go-sqlite3 v1.14.24
)
require (
github.com/AlexEidt/Vidio v1.5.1 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/net v0.37.0 // indirect
)