generated from CyanAsterisk/.github
-
-
Notifications
You must be signed in to change notification settings - Fork 42
/
middleware.go
58 lines (47 loc) · 1.01 KB
/
middleware.go
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Code generated by hertz generator.
package Trip
import (
"github.com/CyanAsterisk/FreeCar/server/cmd/api/biz/router/common"
"github.com/CyanAsterisk/FreeCar/server/shared/consts"
"github.com/cloudwego/hertz/pkg/app"
)
func rootMw() []app.HandlerFunc {
return common.CommonMW()
}
func _adminMw() []app.HandlerFunc {
return []app.HandlerFunc{
common.PasetoAuth(consts.Admin),
}
}
func _tripMw() []app.HandlerFunc {
// your code...
return nil
}
func _get_lltripsMw() []app.HandlerFunc {
// your code...
return nil
}
func _getsometripsMw() []app.HandlerFunc {
// your code...
return nil
}
func _createtripMw() []app.HandlerFunc {
return []app.HandlerFunc{
common.PasetoAuth(consts.User),
}
}
func _gettripMw() []app.HandlerFunc {
return []app.HandlerFunc{
common.PasetoAuth(consts.User),
}
}
func _gettripsMw() []app.HandlerFunc {
return []app.HandlerFunc{
common.PasetoAuth(consts.User),
}
}
func _updatetripMw() []app.HandlerFunc {
return []app.HandlerFunc{
common.PasetoAuth(consts.User),
}
}