-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (22 loc) · 1.17 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
protoc:
rm -f ./pkg/grpc/*.pb.go
protoc --go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
./pkg/grpc/*.proto
create-migration:
migrate create -ext sql -dir ./server/internal/adapters/postgres/migrations -seq $(name)
migrate-up:
migrate -source file://server/internal/adapters/postgres/migrations/ -database postgres://user:password@localhost:5432/gomoney?sslmode=disable up
migrate-down:
migrate -source file://server/internal/adapters/postgres/migrations/ -database postgres://user:password@localhost:5432/gomoney?sslmode=disable down
docker-rm:
docker rm gomoney-grpc-server gomoney-api-server gomoney-telegram-server gomoney-db gomoney-cache
docker rmi gomoney-api gomoney-server-dev gomoney-telegram
sqlc:
sqlc generate
mock-api:
mockgen -package mocks -destination ./api/internal/adapters/mock/mock_service.go -source ./api/internal/application/ports.go
mock-server:
mockgen -source ./server/internal/application/ports.go -destination ./server/internal/application/ports_mock.go -package application
swagger:
swag fmt & swag init -d ./api/internal/adapters/handlers/ -g ../../../cmd/main.go -o ./api/docs/ --parseDependency