Initial commit

This commit is contained in:
Donny
2019-04-22 20:46:32 +08:00
commit 49ab8aadd1
25441 changed files with 4055000 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
package http
import (
"strconv"
"time"
"go-common/library/ecode"
bm "go-common/library/net/http/blademaster"
)
// reportInfoc infoc
func reportInfoc(c *bm.Context) {
var (
params = c.Request.Form
err error
)
eventID := params.Get("event_id")
eventType := params.Get("event_type")
// header
buvid := params.Get("buvid")
fts := params.Get("fts")
if _, err = strconv.ParseInt(fts, 10, 64); err != nil {
c.JSON(nil, ecode.RequestErr)
return
}
messageInfo := params.Get("message_info")
if eventID == "" || eventType == "" || buvid == "" || messageInfo == "" {
c.JSON(nil, ecode.RequestErr)
return
}
c.JSON(nil, dataflowSvr.Report(c, eventID, eventType, buvid, fts, messageInfo, time.Now()))
}