Install:
git clone https://github.com/judascrow/cojspcl-api.git
cp .env.example .env
- RESTful API
- Gin
- Gorm
- Gin-Swagger
- Log-Zap
- Gin-Jwt
- Casbin
Migrate & Seed :
go run main.go create seed
Run :
go run main.go
Host: localhost:8000
Base Path: /api/v1
Done | Method | URI | authorize | comment |
---|---|---|---|---|
✅ | GET | /healthcheck | No | Check Status Service |
Done | Method | URI | authorize | comment |
---|---|---|---|---|
✅ | POST | /auth/login | No | Log in |
✅ | POST | /auth/register | No | Register |
✅ | GET | /auth/me | Yes | Me User |
Done | Method | URI | authorize | comment |
---|---|---|---|---|
✅ | GET | /users | Yes | List Users |
✅ | GET | /users/:slug | Yes | Get User by Slug |
✅ | POST | /users | Yes | Create User |
✅ | PUT | /users/:slug | Yes | Update User |
✅ | DELETE | /users/:slug | Yes | Delete User |
✅ | POST | /users/:slug/password | Yes | Change Password |
✅ | POST | /users/:slug/avatar | Yes | Upload Avatar |
Done | Method | URI | authorize | comment |
---|---|---|---|---|
✅ | GET | /roles | Yes | List Roles |
Generate command: swag init
URL: http://localhost:8000/api/v1/swagger/index.html
URL: http://localhost:8000/upload
Update
./git.sh "COMMENT"