chore(middleware): update middle
This commit is contained in:
parent
04cb2a1ed1
commit
ae5a0531d8
2
makefile
2
makefile
|
@ -13,6 +13,7 @@ build:
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install:
|
install:
|
||||||
|
@make gen-middleware
|
||||||
@make build
|
@make build
|
||||||
|
|
||||||
.PHONY: dev
|
.PHONY: dev
|
||||||
|
@ -27,5 +28,6 @@ gen-struct:
|
||||||
gen-protobuf:
|
gen-protobuf:
|
||||||
@python3 ./shell/gen_protobuf.py
|
@python3 ./shell/gen_protobuf.py
|
||||||
|
|
||||||
|
.PHONY: gen-middleware
|
||||||
gen-middleware:
|
gen-middleware:
|
||||||
@python3 ./shell/gen_middleware.py
|
@python3 ./shell/gen_middleware.py
|
||||||
|
|
|
@ -5,17 +5,16 @@ package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitee.com/timedb/wheatCache/middleware"
|
"gitee.com/timedb/wheatCache/middleware"
|
||||||
|
|
||||||
logMiddle "gitee.com/timedb/wheatCache/middleware/log-middle"
|
|
||||||
mapKey "gitee.com/timedb/wheatCache/middleware/map-key"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
logMiddle "gitee.com/timedb/wheatCache/middleware/log-middle"
|
||||||
|
mapKey "gitee.com/timedb/wheatCache/middleware/map-key"
|
||||||
|
)
|
||||||
|
|
||||||
func GetMiddlewareMap() map[string]middleware.MiddlewareInterface {
|
func GetMiddlewareMap() map[string]middleware.MiddlewareInterface {
|
||||||
|
|
||||||
return map[string]middleware.MiddlewareInterface{
|
return map[string]middleware.MiddlewareInterface{
|
||||||
|
|
||||||
"logMiddle":logMiddle.NewMiddleware(),
|
"logMiddle": logMiddle.NewMiddleware(),
|
||||||
"mapKey":mapKey.NewMiddleware(),
|
"mapKey": mapKey.NewMiddleware(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue