Simple Go blog
- /auth
- /sign-up
POSTSignUp - /sign-in
POSTSignIn
- /sign-up
- /api
- /users
- /:user_id
GETGetUserById - /
GETGetAllUsers - /
PUTUpdateUserById 🧑auth - /
DELETEDeleteUserById 🧑auth
- /:user_id
- /posts
- /
POSTCreatePost 👑auth / admin - /
GETGetAllPosts - /:post_id
GETGetPostById - /:post_id
PUTUpdatePostById 👑auth / admin - /:post_id
DELETEDeleteUserById 👑auth / admin - /:post_id/comments
- /
POSTCreateCommentByPostId 🧑auth - /
GETGetCommentsByPostId
- /
- /
- /comments
- /:comment_id
PUTUpdateCommentById 🧑auth - /:comment_id
DELETEDeleteCommentById 🧑auth
- /:comment_id
- /users
- Go
1.21.4 - MySQL
8.0.34
| Name | Module | Version |
|---|---|---|
| gin | github.com/gin-gonic/gin | 1.9.1 |
| jwt | github.com/golang-jwt/jwt/v5 | 5.1.0 |
| viper | github.com/spf13/viper | 1.17.0 |
| logrus | github.com/sirupsen/logrus | 1.9.3 |
| sqlx | github.com/jmoiron/sqlx | 1.3.5 |
| mysql | github.com/go-sql-driver/mysql | 1.7.1 |
| crypto | golang.org/x/crypto | 0.15.0 |