fix(middle): update middleware

This commit is contained in:
Sodesnei 2021-10-04 20:54:08 +08:00
parent ea36d370a7
commit 0bdbe06376
4 changed files with 7 additions and 7 deletions

View File

@ -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(),

View File

@ -1,4 +1,4 @@
package middleware
package plugins
type MiddleToolsInterface interface {
Init()

View File

@ -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{}
}

View File

@ -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{}
}