refactor: move types into a single file for each package
This commit is contained in:
@@ -2,7 +2,6 @@ package pkg
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/gorilla/mux"
|
||||
"slices"
|
||||
"strings"
|
||||
)
|
||||
@@ -18,14 +17,6 @@ func getMiddleware(rules []string, middlewares []Middleware) (Middleware, error)
|
||||
return Middleware{}, errors.New("middleware not found with name: [" + strings.Join(rules, ";") + "]")
|
||||
}
|
||||
|
||||
type RoutePath struct {
|
||||
route Route
|
||||
path string
|
||||
rules []string
|
||||
middlewares []Middleware
|
||||
router *mux.Router
|
||||
}
|
||||
|
||||
func doesExist(tyName string) bool {
|
||||
middlewareList := []string{BasicAuth, JWTAuth, AccessMiddleware}
|
||||
if slices.Contains(middlewareList, tyName) {
|
||||
|
||||
Reference in New Issue
Block a user