blob: b4e6a3604dc3621b9b46c5299e430f8d3f3068f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package urls
import (
"sync"
"cafe/types"
"github.com/gofiber/fiber/v2"
)
type registeredRoute struct {
method types.HTTPMethod
path string
handler fiber.Handler
namespace string
name string
fullPath string
}
type routeRegistry struct {
mutex sync.Mutex
currentNamespace string
routes map[string]registeredRoute
}
var registry = &routeRegistry{
routes: make(map[string]registeredRoute),
}
|