-
Notifications
You must be signed in to change notification settings - Fork 2
/
router.go
100 lines (86 loc) · 3.54 KB
/
router.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
package router
import (
"github.com/gin-gonic/gin"
"github.com/bragfoo/saman/backend/api/controller"
"github.com/bragfoo/saman/backend/api/global"
)
func Server(router *gin.RouterGroup, g *global.G) {
conf := g.Conf
v1 := router.Group("/" + conf.Api.Version)
// GET
v1.GET("/platformFans", controller.GetPlatFans(g))
v1.GET("platformType", controller.GetPlatType(g))
v1.GET("/event", controller.GetEvent(g))
v1.GET("/mobileData", controller.GetMobileData(g))
v1.GET("/appUGC", controller.GetUGC(g))
v1.GET("/playAmount", controller.GetVideoPlayAmount(g))
v1.GET("/video", controller.GetVideo(g))
v1.GET("/videoSource", controller.GetVideoSource(g))
v1.GET("/channel", controller.GetChannel(g))
v1.GET("/appData", controller.GetAppData(g))
v1.GET("/talent", controller.GetTalent(g))
v1.GET("/skill", controller.GetSkill(g))
v1.GET("/appUGCTotal", controller.GetUGCTotal(g))
v1.GET("/platPlayAmount", controller.GetPlatPlayAmount(g))
v1.GET("/weeklyPlay", controller.GetWeeklyPlayAmount(g))
// POST
v1.POST("/platformFans", controller.PostPlatFans(g))
v1.POST("/event", controller.PostEvent(g))
v1.POST("/mobileData", controller.PostMobileData(g))
v1.POST("/appUGC", controller.PostUGC(g))
v1.POST("/playAmount", controller.PostVideoPlayAmount(g))
v1.POST("/video", controller.PostVideo(g))
v1.POST("/channel", controller.PostChannel(g))
v1.POST("/appData", controller.PostAppData(g))
v1.POST("/talent", controller.PostTalent(g))
v1.POST("/skill", controller.PostSkill(g))
v1.POST("/upload", controller.Upload(g))
//PUT
v1.PUT("/platformFans", controller.PutPlatFans(g))
v1.PUT("/event", controller.PutEvent(g))
v1.PUT("/mobileData", controller.PutMobileData(g))
v1.PUT("/appUGC", controller.PutUGC(g))
v1.PUT("/playAmount", controller.PutVideoPlayAmount(g))
v1.PUT("/video", controller.PutVideo(g))
v1.PUT("/channel", controller.PutChannel(g))
v1.PUT("/appData", controller.PutAppData(g))
v1.PUT("/talent", controller.PutTalent(g))
v1.PUT("/skill", controller.PutSkill(g))
//DELETE
v1.DELETE("/platformFans", controller.GetPing(g))
v1.DELETE("/event", controller.GetPing(g))
v1.DELETE("/mobileData", controller.GetPing(g))
v1.DELETE("/appUGC", controller.GetPing(g))
v1.DELETE("/playAmount", controller.GetPing(g))
v1.DELETE("/video", controller.GetPing(g))
v1.DELETE("/channel", controller.GetPing(g))
v1.DELETE("/appData", controller.GetPing(g))
v1.DELETE("/talent", controller.GetPing(g))
v1.DELETE("/skill", controller.GetPing(g))
//DELETE_BY_ID
v1.DELETE("/platformFans/:ids", controller.DelPlatFans(g))
v1.DELETE("/event/:ids", controller.DelEvent(g))
v1.DELETE("/mobileData/:ids", controller.DelMobileData(g))
v1.DELETE("/appUGC/:ids", controller.DelUGC(g))
v1.DELETE("/playAmount/:ids", controller.DelVideoPlayAmount(g))
v1.DELETE("/video/:ids", controller.DelVideo(g))
v1.DELETE("/channel/:ids", controller.DelChannel(g))
v1.DELETE("/appData/:ids", controller.DelAppData(g))
v1.DELETE("/talent/:ids", controller.DelTalent(g))
v1.DELETE("/skill/:ids", controller.DelSkill(g))
//upload
upload := v1.Group("/upload")
upload.POST("/fans", controller.UploadFans(g))
upload.POST("/video", controller.UploadVideo(g))
upload.POST("/newMedia", controller.Upload(g))
upload.POST("/charts", controller.UploadCharts(g))
//liner
liner := v1.Group("/liner")
liner.GET("/platPercentage", controller.GetGrowPercentage(g))
liner.GET("/playAmount", controller.GetLinerPlayAmountByPlat(g))
//test
test := router.Group("/test")
test.GET("/one", controller.GetPlatType(g))
utils := v1.Group("/utils")
utils.GET("/ids", controller.GetIds(g))
}