forked from p93542168/wheat-cache
fix(middle): update middleware
This commit is contained in:
parent
ea36d370a7
commit
0bdbe06376
|
@ -10,9 +10,9 @@ import (
|
|||
mapKey "gitee.com/timedb/wheatCache/plugins/map-key"
|
||||
)
|
||||
|
||||
func GetMiddlewareMap() map[string]middleware.MiddleToolsInterface {
|
||||
func GetMiddlewareMap() map[string]plugins.MiddleToolsInterface {
|
||||
|
||||
return map[string]middleware.MiddleToolsInterface{
|
||||
return map[string]plugins.MiddleToolsInterface{
|
||||
|
||||
"logMiddle": logMiddle.NewMiddleware(),
|
||||
"mapKey": mapKey.NewMiddleware(),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package middleware
|
||||
package plugins
|
||||
|
||||
type MiddleToolsInterface interface {
|
||||
Init()
|
||||
|
|
|
@ -3,7 +3,7 @@ package log_middle
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"gitee.com/timedb/wheatCache/middleware"
|
||||
"gitee.com/timedb/wheatCache/plugins"
|
||||
)
|
||||
|
||||
type A struct {
|
||||
|
@ -17,6 +17,6 @@ func (i *A) Exec(interface{}) (interface{}, error) {
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
func NewMiddleware() middleware.MiddleToolsInterface {
|
||||
func NewMiddleware() plugins.MiddleToolsInterface {
|
||||
return &A{}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package log_middle
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"gitee.com/timedb/wheatCache/middleware"
|
||||
"gitee.com/timedb/wheatCache/plugins"
|
||||
)
|
||||
|
||||
type ABB struct {
|
||||
|
@ -17,6 +17,6 @@ func (i *ABB) Exec(interface{}) (interface{}, error) {
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
func NewMiddleware() middleware.MiddleToolsInterface {
|
||||
func NewMiddleware() plugins.MiddleToolsInterface {
|
||||
return &ABB{}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue