模块化上传驱动,使用泛型优化工具库降低冗余

This commit is contained in:
孟帅
2023-06-02 20:29:08 +08:00
parent fdc48b9335
commit 62ecbb7f26
96 changed files with 1276 additions and 1483 deletions

View File

@@ -12,27 +12,33 @@ build:
@cd ../web && yarn build && \cp -rf ./dist/* ../server$(ADMIN_RESOURCE_PATH)
@echo "y" | gf build
# 通过热编译启动所有服务
.PHONY: all
all:
gf run main.go --args "all"
.PHONY: http
http:
gf run main.go --args "http"
.PHONY: queue
queue:
gf run main.go --args "queue"
.PHONY: cron
cron:
gf run main.go --args "cron"
.PHONY: auth
auth:
gf run main.go --args "auth"
# 启动web服务
.PHONY: web
web:
@@ -44,11 +50,20 @@ web:
refresh:
@go run main.go tools -m=casbin -a1=refresh
# 清理casbin权限
.PHONY: clear
clear:
@go run main.go tools -m=casbin -a1=clear
# 运行代码质量分析工具
# https://github.com/ywanbing/golangci
.PHONY: ci
ci:
golangci-lint run
.PHONY: killmain
killmain:
@kill -9 $(ps -ef|grep main|grep -v grep|awk '{print $2}')
@@ -79,11 +94,13 @@ cli.install:
dao: cli.install
@gf gen dao
# Generate Go files for Service.
.PHONY: service
service: cli.install
@gf gen service
# Build image, deploy image and yaml to current kubectl environment and make port forward to local machine.
.PHONY: start
start:
@@ -92,6 +109,7 @@ start:
make deploy; \
make port;
# Build docker image.
.PHONY: image
image: cli.install