Commit graph

14 commits

Author SHA1 Message Date
Ivan R. 5aa2cee5b1
chore: migrate to database/sql
Since I started simplifying, I decided to abandon ORM.

I won’t say that this makes much sense, everything works more or less as before.
Except that the size of the program has decreased slightly again, by about a megabyte.
2024-03-26 00:40:52 +05:00
Ivan R. 6d25c4e8af
feat!: migrate to net/http
With the release of Go 1.22, the standard library now has
all the necessary functions that allow us to abandon Gin.

I hope this rewrite will lower the entry barrier for new developers.
As a nice bonus, the size of the program has decreased from 20 to 15.4 MB.

To solve issue #81, request logging has been improved.
Now all errors are displayed in the logs.
2024-03-25 15:52:18 +05:00
Ivan R. 37e8663ac2
Add more settings, update readme and Dockerfile 2023-07-22 21:32:11 +05:00
Ivan R. de76c90f3c
Rename 'backend' module to 'database' 2023-07-22 15:24:01 +05:00
Ivan R. 3c9e30375e
Move API initialization 2023-07-22 15:19:04 +05:00
Ivan R. 2c08171c7a
Start using JWT tokens
I thought this was a good idea.
Pros: fewer database calls.
Cons: there is no way to revoke the token (except for changing the secret key).

I rewrote the authorization as a middleware. Request handlers no longer need to validate the user.
2023-07-22 13:42:43 +05:00
Ivan R. 7f42a90be6
Add simple config module 2023-07-22 11:33:14 +05:00
Ivan R. e1c99a6092
Format code with go fmt 2023-04-09 12:23:58 +05:00
Ivan R. a1be7e81b7
Add dockerfile 2023-04-09 12:13:57 +05:00
Ivan R. c668af5001
Add the ability to edit groups 2023-04-09 11:55:08 +05:00
Ivan R. bf4c52e68b
Move pages into separate modules 2023-04-09 11:22:48 +05:00
Ivan R. 16095e0254
Interrupt the execution of functions if the user is not authorized 2023-04-09 10:41:21 +05:00
Ivan R. c92fa6e9e0
Format code with go fmt 2023-04-06 10:37:48 +05:00
Ivan R. 16cd7aa635
Initial commit 2023-04-06 10:36:11 +05:00