mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-04-03 02:45:52 +00:00
First step of Go rewrite — separates MQTT ingestion from the Node.js web server. Single static binary (no CGO) that connects to MQTT brokers, decodes MeshCore packets, and writes to the shared SQLite DB. Ported from JS: - decoder.js → decoder.go (header, path, all payload types, adverts) - computeContentHash → Go (SHA-256, path-independent) - db.js v3 schema → db.go (transmissions, observations, nodes, observers) - server.js MQTT logic → main.go (multi-broker, reconnect, IATA filter) 25 Go tests passing (golden fixtures from production + schema compat). No existing JS files modified. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
8 lines
105 B
Go
8 lines
105 B
Go
package main
|
|
|
|
import "time"
|
|
|
|
func unixTime(epoch int64) time.Time {
|
|
return time.Unix(epoch, 0)
|
|
}
|