mirror of
https://github.com/hanzoai/insights.git
synced 2026-11-03 00:52:32 +00:00
Modules declare go 1.27.1 and the build images follow. go fix applied the modernizers, and the ptr helper went once new(expr) could say it; omitzero is not applied, since it changes what the JSON says. Co-authored-by: Hanzo Dev <[email protected]>
32 lines
751 B
Go
32 lines
751 B
Go
package sse
|
|
|
|
import "time"
|
|
|
|
type EventMsg struct {
|
|
UUID string `json:"uuid"`
|
|
Timestamp any `json:"timestamp"`
|
|
DistinctID string `json:"distinct_id"`
|
|
PersonID string `json:"person_id"`
|
|
Event string `json:"event"`
|
|
Properties map[string]any `json:"properties"`
|
|
ReceivedAt time.Time
|
|
}
|
|
|
|
type GeoEventMsg struct {
|
|
Lat float64 `json:"lat"`
|
|
Lng float64 `json:"lng"`
|
|
CountryCode string `json:"country_code"`
|
|
DistinctID string `json:"distinct_id"`
|
|
Count uint `json:"count"`
|
|
ReceivedAt time.Time
|
|
}
|
|
|
|
type StatsMsg struct {
|
|
UsersOnProduct int `json:"users_on_product"`
|
|
ActiveRecordings int `json:"active_recordings"`
|
|
}
|
|
|
|
type StatsErrorMsg struct {
|
|
Err error
|
|
}
|