Initial commit

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 13:57:10 +08:00
co-authored by Claude Opus 5
commit 8679200f41
1897 changed files with 257900 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
package dataReport
import (
"testing"
)
func TestReportEvent(t *testing.T) {
reportAppId := "11"
// 创建一个广告点击
event := &CommonField{
UID: "user_123",
EventID: GenerateGlobalEventID(),
Event: EventTypeAdClick,
Channel: "666",
AppID: reportAppId,
//SID string `json:"sid"` // 会话ID
//ClientTS int64 `json:"client_ts"` // 客户端时间戳
Device: "Android",
DeviceID: "device_12345",
UserAgent: "Mozilla/5.0",
DeviceBrand: "Huawei",
DeviceModel: "Mate 40",
IP: "192.168.0.1",
}
event.Payload = JsonRawMessage(AdClickEvent{
AdID: "1286400000000040", // 广告ID
})
config.ApiUrl = "https://api.shuifeng.cc"
list := []*CommonField{event}
BatchReport(list)
}