38 lines
756 B
Go
38 lines
756 B
Go
![]() |
package proto
|
||
|
|
||
|
const (
|
||
|
NtfClickHouseSqlId = "write_clickhouse_sql"
|
||
|
ReqInsertClickHouseId = "insert_clickhouse"
|
||
|
ReqGetOnlineFlowId = "get_online_flow_clickhouse"
|
||
|
)
|
||
|
|
||
|
type NtfClickHouseSql struct {
|
||
|
UId int64 `json:"u"`
|
||
|
Sql string `json:"a"`
|
||
|
}
|
||
|
|
||
|
type ReqInsertClickHouse struct {
|
||
|
TableName string `json:"t"`
|
||
|
Values map[string]interface{} `json:"v"`
|
||
|
}
|
||
|
|
||
|
type ReqGetOnlineFlow struct {
|
||
|
// 日期 (20060102)
|
||
|
Date string `json:"d"`
|
||
|
// 时间戳
|
||
|
TimeStamp int64 `json:"t"`
|
||
|
}
|
||
|
|
||
|
type RspGetOnlineFlow struct {
|
||
|
Err string `json:"e"`
|
||
|
Flows []OnlineFlow `json:"f"`
|
||
|
}
|
||
|
|
||
|
type OnlineFlow struct {
|
||
|
Time int64 `json:"t"`
|
||
|
Api int `json:"a"`
|
||
|
Date string `json:"d"`
|
||
|
Online int64 `json:"o"`
|
||
|
Onplay int64 `json:"op"`
|
||
|
}
|