https://github.com/sartim/gin_user_service
User Service API using Gin Framework
https://github.com/sartim/gin_user_service
gin go golang gorm rest-api
Last synced: about 1 month ago
JSON representation
User Service API using Gin Framework
- Host: GitHub
- URL: https://github.com/sartim/gin_user_service
- Owner: sartim
- Created: 2023-01-05T16:24:57.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-04T09:36:18.000Z (over 2 years ago)
- Last Synced: 2025-02-16T08:43:47.193Z (over 1 year ago)
- Topics: gin, go, golang, gorm, rest-api
- Language: Go
- Homepage:
- Size: 118 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# User Service
User service running on Gin Framework.
[](https://go.dev)
[](https://github.com/sartim/gin_user_service/actions/workflows/master.yml)
### Setup
###### Make migrations
$ go run ./cmd main.go --action=create-tables
###### Drop tables
$ go run ./cmd main.go --action=drop-tables
###### Create super user
$ go run ./cmd main.go --action=create-super_user
###### Running unittests
$ go test -v ./tests
##### Running coverage
$ go test -v ./tests -coverprofile=coverage.out
$ go tool cover -html=coverage.out
###### Run server
$ go run main.go --action=run-server
### Install requirements
$ go mod init gin-shop-api
$ go get github.com/gin-gonic/gin
$ go get gorm.io/gorm
$ go get gorm.io/driver/postgres
$ go get github.com/joho/godotenv
$ go get github.com/golang-jwt/jwt/v4
$ go get github.com/google/uuid
$ go get github.com/stretchr/testify/assert