rename to beacon

This commit is contained in:
Enot (ded) Skelly committed 2026-06-05 08:10:43 -07:00
1 parent b72ce41606
commit a943660778
38 files changed
+1457 -1331

No files matched your search

+12 -12
View File
@@ -1,6 +1,6 @@
# MeshCore Tower
# MeshCore Beacon
MeshCore Tower is a MeshCore network observation backend. It connects to one or
MeshCore Beacon is a MeshCore network observation backend. It connects to one or
more MeshCore MQTT brokers, ingests LoRa packet traffic in real time, stores it
in PostgreSQL, and streams live events to WebSocket clients.
@@ -43,8 +43,8 @@ For deployment instructions including the frontend app, see the deployment docs.
## Project layout
```
tower-server/
├── cmd/tower/ entry point
beacon-server/
├── cmd/beacon/ entry point
├── db/
│ ├── migrations/ SQL schema (001_schema.sql)
│ ├── queries/ sqlc query definitions
@@ -101,8 +101,8 @@ tower-server/
### 1. Clone and configure
```bash
git clone https://github.com/MeshCore-Tower/tower-server.git
cd tower-server
git clone https://github.com/MeshCore-Beacon/beacon-server.git
cd beacon-server
cp env.example .env
cp config.yaml.example config.yaml
```
@@ -122,10 +122,10 @@ start via `docker-entrypoint-initdb.d`.
### 3. Run
```bash
go run ./cmd/tower
go run ./cmd/beacon
```
Tower will:
Beacon will:
- Load `.env` and `config.yaml`
- Connect to PostgreSQL and seed config data
@@ -173,7 +173,7 @@ regions:
# Channel keys for decrypting group messages.
channel_keys:
# Hashtag channels: Tower derives the PSK from the tag name automatically.
# Hashtag channels: Beacon derives the PSK from the tag name automatically.
# secret = SHA256("#tag")[:16], channel_hash = SHA256(secret)[0]
# Tag names should be provided without the # prefix.
hashtags:
@@ -367,7 +367,7 @@ sqlc generate
### API documentation (Swagger)
Tower uses [swaggo/swag](https://github.com/swaggo/swag) to generate OpenAPI
Beacon uses [swaggo/swag](https://github.com/swaggo/swag) to generate OpenAPI
documentation from annotations in the handler comments.
Start the server and open `http://localhost:8080/swagger/index.html`.
@@ -376,7 +376,7 @@ After adding or modifying any handler, regenerate the docs and commit the
updated `docs/` directory alongside your handler changes:
```bash
swag init -g cmd/tower/main.go -o docs --parseDependecy
swag init -g cmd/beacon/main.go -o docs --parseDependecy
```
Install swag:
@@ -411,7 +411,7 @@ For paginated responses use the generic page wrapper:
### Updating the IATA database
Tower includes a static IATA → country/continent mapping compiled into the
Beacon includes a static IATA → country/continent mapping compiled into the
binary, generated from the [OurAirports](https://ourairports.com/data/) public
dataset.
+14 -14
View File
@@ -12,27 +12,27 @@ import (
"syscall"
"time"
"github.com/MeshCore-Tower/tower-server/db"
_ "github.com/MeshCore-Tower/tower-server/docs"
"github.com/MeshCore-Tower/tower-server/internal/api/router"
"github.com/MeshCore-Tower/tower-server/internal/config"
"github.com/MeshCore-Tower/tower-server/internal/hub"
"github.com/MeshCore-Tower/tower-server/internal/iatadb"
"github.com/MeshCore-Tower/tower-server/internal/ingest"
"github.com/MeshCore-Tower/tower-server/internal/keystore"
"github.com/MeshCore-Tower/tower-server/internal/scopestore"
"github.com/MeshCore-Beacon/beacon-server/db"
_ "github.com/MeshCore-Beacon/beacon-server/docs"
"github.com/MeshCore-Beacon/beacon-server/internal/api/router"
"github.com/MeshCore-Beacon/beacon-server/internal/config"
"github.com/MeshCore-Beacon/beacon-server/internal/hub"
"github.com/MeshCore-Beacon/beacon-server/internal/iatadb"
"github.com/MeshCore-Beacon/beacon-server/internal/ingest"
"github.com/MeshCore-Beacon/beacon-server/internal/keystore"
"github.com/MeshCore-Beacon/beacon-server/internal/scopestore"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/joho/godotenv"
)
// @title MeshCore Tower API
// @title MeshCore Beacon API
// @version 1.0
// @description MeshCore network observation backend. Ingests LoRa packets from MQTT brokers, stores in PostgreSQL, and streams live events via WebSocket.
// @termsOfService https://github.com/MeshCore-Tower/tower-server
// @termsOfService https://github.com/MeshCore-Beacon/beacon-server
// @contact.name MeshCore Tower
// @contact.url https://github.com/MeshCore-Tower/tower-server
// @contact.name MeshCore Beacon
// @contact.url https://github.com/MeshCore-Beacon/beacon-server
// @license.name MIT
@@ -235,7 +235,7 @@ func main() {
}
go func() {
fmt.Printf("Tower listening on %s\n", addr)
fmt.Printf("Beacon listening on %s\n", addr)
if err := srv.ListenAndServe(); err != nil && err != http.ErrServerClosed {
log.Fatalf("server error: %v", err)
}
+3 -3
View File
@@ -1,4 +1,4 @@
# Tower configuration file
# Beacon configuration file
# Copy to config.yaml and adjust as needed.
iatas:
@@ -45,10 +45,10 @@ regions:
iatas: [YOW, YYZ]
channel_keys:
# Hashtag channels: Tower derives the PSK automatically from the tag name.
# Hashtag channels: Beacon derives the PSK automatically from the tag name.
# secret = SHA256("#tag")[:16], channel_hash = SHA256(secret)[0]
# Hashtag names should be provided without the # prefix.
# Tower prepends # automatically before deriving the key.
# Beacon prepends # automatically before deriving the key.
hashtags:
- meshcore
+3 -3
View File
@@ -7,9 +7,9 @@ import (
"strings"
"time"
sqlc "github.com/MeshCore-Tower/tower-server/db/sqlc"
"github.com/MeshCore-Tower/tower-server/internal/api"
"github.com/MeshCore-Tower/tower-server/internal/ingest"
sqlc "github.com/MeshCore-Beacon/beacon-server/db/sqlc"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/MeshCore-Beacon/beacon-server/internal/ingest"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
)
+2 -2
View File
@@ -3,8 +3,8 @@ package db
import (
"context"
sqlc "github.com/MeshCore-Tower/tower-server/db/sqlc"
"github.com/MeshCore-Tower/tower-server/internal/api"
sqlc "github.com/MeshCore-Beacon/beacon-server/db/sqlc"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
)
func (s *Store) UpsertIATADetails(ctx context.Context, iata string, name string, lat, lng *float64) error {
+1 -1
View File
@@ -1,5 +1,5 @@
-- ============================================================
-- Tower schema migration
-- Beacon schema migration
-- ============================================================
-- ============================================================
+3 -3
View File
@@ -10,9 +10,9 @@ import (
"strings"
"time"
sqlc "github.com/MeshCore-Tower/tower-server/db/sqlc"
"github.com/MeshCore-Tower/tower-server/internal/api"
"github.com/MeshCore-Tower/tower-server/internal/ingest"
sqlc "github.com/MeshCore-Beacon/beacon-server/db/sqlc"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/MeshCore-Beacon/beacon-server/internal/ingest"
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgtype"
)
+3 -3
View File
@@ -8,9 +8,9 @@ import (
"strings"
"time"
sqlc "github.com/MeshCore-Tower/tower-server/db/sqlc"
"github.com/MeshCore-Tower/tower-server/internal/api"
"github.com/MeshCore-Tower/tower-server/internal/ingest"
sqlc "github.com/MeshCore-Beacon/beacon-server/db/sqlc"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/MeshCore-Beacon/beacon-server/internal/ingest"
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgtype"
)
+3 -3
View File
@@ -11,9 +11,9 @@ import (
"strings"
"time"
sqlc "github.com/MeshCore-Tower/tower-server/db/sqlc"
"github.com/MeshCore-Tower/tower-server/internal/api"
"github.com/MeshCore-Tower/tower-server/internal/ingest"
sqlc "github.com/MeshCore-Beacon/beacon-server/db/sqlc"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/MeshCore-Beacon/beacon-server/internal/ingest"
"github.com/google/uuid"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
+2 -2
View File
@@ -3,8 +3,8 @@ package db
import (
"context"
sqlc "github.com/MeshCore-Tower/tower-server/db/sqlc"
"github.com/MeshCore-Tower/tower-server/internal/scopestore"
sqlc "github.com/MeshCore-Beacon/beacon-server/db/sqlc"
"github.com/MeshCore-Beacon/beacon-server/internal/scopestore"
)
func (s *Store) UpsertTransportScope(ctx context.Context, name, displayName string, transportKey, keyFingerprint []byte) error {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"context"
"time"
sqlc "github.com/MeshCore-Tower/tower-server/db/sqlc"
"github.com/MeshCore-Tower/tower-server/internal/api"
sqlc "github.com/MeshCore-Beacon/beacon-server/db/sqlc"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/jackc/pgx/v5/pgtype"
)
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"context"
"encoding/hex"
sqlc "github.com/MeshCore-Tower/tower-server/db/sqlc"
"github.com/MeshCore-Tower/tower-server/internal/api"
sqlc "github.com/MeshCore-Beacon/beacon-server/db/sqlc"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgtype"
+139 -97
View File
@@ -9,10 +9,10 @@ const docTemplate = `{
"info": {
"description": "[[escape .Description]]",
"title": "[[.Title]]",
"termsOfService": "https://github.com/MeshCore-Tower/tower-server",
"termsOfService": "https://github.com/MeshCore-Beacon/beacon-server",
"contact": {
"name": "MeshCore Tower",
"url": "https://github.com/MeshCore-Tower/tower-server"
"name": "MeshCore Beacon",
"url": "https://github.com/MeshCore-Beacon/beacon-server"
},
"license": {
"name": "MIT"
@@ -83,7 +83,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_ChannelSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_ChannelSummary"
}
},
"400": {
@@ -123,7 +123,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Channel"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Channel"
}
},
"400": {
@@ -238,7 +238,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.IATA"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.IATA"
}
}
},
@@ -273,7 +273,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.IATA"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.IATA"
}
},
"404": {
@@ -465,7 +465,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_NodeSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_NodeSummary"
}
},
"400": {
@@ -505,7 +505,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Node"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Node"
}
},
"400": {
@@ -557,7 +557,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_PacketObservationSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_PacketObservationSummary"
}
},
"400": {
@@ -656,7 +656,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_ObserverSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_ObserverSummary"
}
},
"400": {
@@ -696,7 +696,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Observer"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Observer"
}
},
"400": {
@@ -748,7 +748,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_AdvertObservation"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_AdvertObservation"
}
},
"400": {
@@ -806,7 +806,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ObserverTelemetry"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverTelemetry"
}
},
"400": {
@@ -951,7 +951,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Packet"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Packet"
}
},
"400": {
@@ -990,7 +990,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.RegionSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.RegionSummary"
}
}
},
@@ -1025,7 +1025,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Region"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Region"
}
},
"400": {
@@ -1072,7 +1072,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ObservationPoint"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObservationPoint"
}
}
},
@@ -1106,7 +1106,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.StatsOverview"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.StatsOverview"
}
},
"500": {
@@ -1147,7 +1147,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PayloadBreakdownItem"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PayloadBreakdownItem"
}
}
},
@@ -1189,7 +1189,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.RadioPreset"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.RadioPreset"
}
}
},
@@ -1217,7 +1217,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ScopeStats"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ScopeStats"
}
}
},
@@ -1259,7 +1259,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.TopNode"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.TopNode"
}
}
},
@@ -1307,7 +1307,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.TopObserver"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.TopObserver"
}
}
},
@@ -1322,7 +1322,7 @@ const docTemplate = `{
}
},
"definitions": {
"github_com_MeshCore-Tower_tower-server_internal_api.AdvertObservation": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.AdvertObservation": {
"type": "object",
"properties": {
"heardAt": {
@@ -1343,6 +1343,7 @@ const docTemplate = `{
"type": "string"
},
"nodePublicKey": {
"description": "hex-encoded",
"type": "string"
},
"packetHash": {
@@ -1363,7 +1364,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Channel": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Channel": {
"type": "object",
"properties": {
"channelHash": {
@@ -1371,14 +1372,14 @@ const docTemplate = `{
"type": "string"
},
"hashtag": {
"description": "tag name without # prefix",
"description": "tag name without # prefix; non-nil only for hashtag channels",
"type": "string"
},
"id": {
"type": "integer"
},
"isHashtag": {
"description": "true if derived from a hashtag PSK",
"description": "true if key was derived from a hashtag PSK",
"type": "boolean"
},
"keyFingerprint": {
@@ -1386,23 +1387,23 @@ const docTemplate = `{
"type": "string"
},
"keyKnown": {
"description": "true if Tower has a decryption key",
"description": "true if Beacon has a decryption key for this channel",
"type": "boolean"
},
"lastSeen": {
"description": "epoch ms",
"description": "epoch ms, time of most recent message",
"type": "integer"
},
"messageCount": {
"type": "integer"
},
"name": {
"description": "display name, nil if not set",
"description": "display name from config or nil",
"type": "string"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ChannelSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ChannelSummary": {
"type": "object",
"properties": {
"channelHash": {
@@ -1413,24 +1414,24 @@ const docTemplate = `{
"type": "integer"
},
"isHashtag": {
"description": "true if derived from a hashtag PSK",
"description": "true if key was derived from a hashtag PSK",
"type": "boolean"
},
"keyKnown": {
"description": "true if Tower has a decryption key",
"description": "true if Beacon has a decryption key for this channel",
"type": "boolean"
},
"lastSeen": {
"description": "epoch ms",
"description": "epoch ms, time of most recent message",
"type": "integer"
},
"name": {
"description": "display name, nil if not set",
"description": "display name from config or nil",
"type": "string"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.IATA": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.IATA": {
"type": "object",
"properties": {
"displayName": {
@@ -1447,10 +1448,11 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Node": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Node": {
"type": "object",
"properties": {
"defaultScope": {
"description": "most recently matched transport scope name e.g. \"#bc\"",
"type": "string"
},
"firstSeen": {
@@ -1458,15 +1460,17 @@ const docTemplate = `{
"type": "integer"
},
"iatas": {
"description": "IATAs where this node has been heard, with last heard timestamps",
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.NodeIATA"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.NodeIATA"
}
},
"id": {
"type": "string"
},
"isObserver": {
"description": "true if this node is also a known observer",
"type": "boolean"
},
"lastAdvertAt": {
@@ -1478,13 +1482,15 @@ const docTemplate = `{
"type": "integer"
},
"lat": {
"description": "decimal degrees, from advert AppData",
"type": "number"
},
"lng": {
"description": "decimal degrees, from advert AppData",
"type": "number"
},
"locationSource": {
"description": "e.g. \"advert\", \"manual\"",
"description": "\"advert\" or \"manual\"",
"type": "string"
},
"metadata": {
@@ -1498,33 +1504,35 @@ const docTemplate = `{
"type": "string"
},
"nodeType": {
"description": "1=companion, 2=repeater, 3=room server",
"description": "1=companion, 2=repeater, 3=room_server, 4=sensor",
"type": "integer"
},
"nodeTypeName": {
"type": "string"
},
"observerId": {
"description": "UUID of the associated observer row, if any",
"type": "string"
},
"publicKey": {
"description": "hex-encoded public key",
"description": "hex-encoded Ed25519 public key",
"type": "string"
},
"radio": {
"description": "shorthand: \"freqMhz,bwKhz,sf\" e.g. \"910.5,62.5,7\"",
"type": "string"
},
"supportsMultibytePaths": {
"description": "firmware \u003e= 1.14.0",
"description": "firmware \u003e= 1.14.0; detected via path hash size",
"type": "boolean"
},
"supportsMultibyteTraces": {
"description": "firmware \u003e= 1.11.0",
"description": "firmware \u003e= 1.11.0; detected via trace hash size",
"type": "boolean"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.NodeIATA": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.NodeIATA": {
"type": "object",
"properties": {
"iata": {
@@ -1536,60 +1544,67 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.NodeSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.NodeSummary": {
"type": "object",
"properties": {
"defaultScope": {
"description": "most recently matched transport scope name e.g. \"#bc\"",
"type": "string"
},
"iatas": {
"description": "IATAs where this node has been heard, with last heard timestamps",
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.NodeIATA"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.NodeIATA"
}
},
"id": {
"type": "string"
},
"isObserver": {
"description": "true if this node is also a known observer",
"type": "boolean"
},
"lat": {
"description": "decimal degrees, from advert AppData",
"type": "number"
},
"lng": {
"description": "decimal degrees, from advert AppData",
"type": "number"
},
"name": {
"type": "string"
},
"nodeType": {
"description": "1=companion, 2=repeater, 3=room server",
"description": "1=companion, 2=repeater, 3=room_server, 4=sensor",
"type": "integer"
},
"nodeTypeName": {
"type": "string"
},
"observerId": {
"description": "UUID of the associated observer row, if any",
"type": "string"
},
"publicKey": {
"description": "hex-encoded public key",
"description": "hex-encoded Ed25519 public key",
"type": "string"
},
"radio": {
"description": "shorthand: \"freqMhz,bwKhz,sf\" e.g. \"910.5,62.5,7\"",
"type": "string"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ObservationPoint": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ObservationPoint": {
"type": "object",
"properties": {
"activeObservers": {
"type": "integer"
},
"hour": {
"description": "epoch ms, start of bucket",
"description": "epoch ms, start of the 1-hour bucket",
"type": "integer"
},
"iata": {
@@ -1603,7 +1618,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Observer": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Observer": {
"type": "object",
"properties": {
"batteryLevel": {
@@ -1614,7 +1629,7 @@ const docTemplate = `{
"description": "broker names this observer has been seen on",
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ObserverBroker"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverBroker"
}
},
"displayName": {
@@ -1702,7 +1717,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ObserverBroker": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverBroker": {
"type": "object",
"properties": {
"lastPacketAt": {
@@ -1719,7 +1734,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ObserverSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverSummary": {
"type": "object",
"properties": {
"displayName": {
@@ -1754,7 +1769,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ObserverTelemetry": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverTelemetry": {
"type": "object",
"properties": {
"interval": {
@@ -1763,7 +1778,7 @@ const docTemplate = `{
"points": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ObserverTelemetryPoint"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverTelemetryPoint"
}
},
"range": {
@@ -1771,7 +1786,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ObserverTelemetryPoint": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverTelemetryPoint": {
"type": "object",
"properties": {
"airtimeRxPct": {
@@ -1801,25 +1816,30 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Packet": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Packet": {
"type": "object",
"properties": {
"channelHash": {
"description": "hex-encoded single byte; non-nil for group_text/group_data",
"type": "string"
},
"decrypted": {
"description": "true if group text was successfully decrypted",
"type": "boolean"
},
"firstHeardAt": {
"description": "epoch ms",
"type": "integer"
},
"firstToLastMs": {
"description": "ms between first and last observation",
"type": "integer"
},
"header": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketHeader"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketHeader"
},
"lastHeardAt": {
"description": "epoch ms",
"type": "integer"
},
"observationCount": {
@@ -1828,10 +1848,11 @@ const docTemplate = `{
"observations": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketObservationDetail"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketObservationDetail"
}
},
"originPubkey": {
"description": "hex-encoded; nil when not extractable from payload",
"type": "string"
},
"packetHash": {
@@ -1844,46 +1865,55 @@ const docTemplate = `{
}
},
"rawPayload": {
"description": "hex-encoded payload bytes (excludes header and path)",
"type": "string"
},
"resolvedRoute": {
"description": "trace packets only: resolved intended route",
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ResolvedHop"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ResolvedHop"
}
},
"scope": {
"description": "matched transport scope name e.g. \"#bc\"",
"type": "string"
},
"transportCodes": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketTransportCodes"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketTransportCodes"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.PacketHeader": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.PacketHeader": {
"type": "object",
"properties": {
"payloadType": {
"description": "bits 2-5",
"type": "integer"
},
"payloadTypeName": {
"description": "advert, request, group_text, etc.",
"type": "string"
},
"payloadVersion": {
"description": "bits 6-7",
"type": "integer"
},
"raw": {
"description": "hex-encoded single byte",
"type": "string"
},
"routeType": {
"description": "bits 0-1",
"type": "integer"
},
"routeTypeName": {
"description": "FLOOD, DIRECT, TRANSPORT_FLOOD, TRANSPORT_DIRECT",
"type": "string"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.PacketObservationDetail": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.PacketObservationDetail": {
"type": "object",
"properties": {
"heardAt": {
@@ -1903,22 +1933,24 @@ const docTemplate = `{
"type": "string"
},
"pathBytes": {
"description": "hex-encoded",
"description": "hex-encoded accumulated path hashes",
"type": "string"
},
"pathLength": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketPathLength"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketPathLength"
},
"propagationTimeMs": {
"description": "ms since first observation; 0 for first",
"type": "integer"
},
"radio": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketRadio"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketRadio"
},
"resolvedPath": {
"description": "per-observation resolved path hashes",
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ResolvedHop"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ResolvedHop"
}
},
"rssi": {
@@ -1932,7 +1964,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.PacketObservationSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.PacketObservationSummary": {
"type": "object",
"properties": {
"heardAt": {
@@ -1967,21 +1999,24 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.PacketPathLength": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.PacketPathLength": {
"type": "object",
"properties": {
"hashSize": {
"description": "per-hop hash size in bytes (1, 2, or 3)",
"type": "integer"
},
"hopCount": {
"description": "number of path hashes present",
"type": "integer"
},
"raw": {
"description": "hex-encoded single byte",
"type": "string"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.PacketRadio": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.PacketRadio": {
"type": "object",
"properties": {
"bandwidthKhz": {
@@ -1998,7 +2033,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.PacketTransportCodes": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.PacketTransportCodes": {
"type": "object",
"properties": {
"regionCode": {
@@ -2009,7 +2044,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_AdvertObservation": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_AdvertObservation": {
"type": "object",
"properties": {
"hasMore": {
@@ -2018,7 +2053,7 @@ const docTemplate = `{
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.AdvertObservation"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.AdvertObservation"
}
},
"nextCursor": {
@@ -2026,7 +2061,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_ChannelSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_ChannelSummary": {
"type": "object",
"properties": {
"hasMore": {
@@ -2035,7 +2070,7 @@ const docTemplate = `{
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ChannelSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ChannelSummary"
}
},
"nextCursor": {
@@ -2043,7 +2078,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_NodeSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_NodeSummary": {
"type": "object",
"properties": {
"hasMore": {
@@ -2052,7 +2087,7 @@ const docTemplate = `{
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.NodeSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.NodeSummary"
}
},
"nextCursor": {
@@ -2060,7 +2095,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_ObserverSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_ObserverSummary": {
"type": "object",
"properties": {
"hasMore": {
@@ -2069,7 +2104,7 @@ const docTemplate = `{
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ObserverSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverSummary"
}
},
"nextCursor": {
@@ -2077,7 +2112,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_PacketObservationSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_PacketObservationSummary": {
"type": "object",
"properties": {
"hasMore": {
@@ -2086,7 +2121,7 @@ const docTemplate = `{
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketObservationSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketObservationSummary"
}
},
"nextCursor": {
@@ -2094,7 +2129,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.PayloadBreakdownItem": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.PayloadBreakdownItem": {
"type": "object",
"properties": {
"count": {
@@ -2108,16 +2143,18 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.RadioPreset": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.RadioPreset": {
"type": "object",
"properties": {
"count": {
"description": "number of observers or nodes on this preset in this IATA",
"type": "integer"
},
"iata": {
"type": "string"
},
"preset": {
"description": "\"freqMhz,bwKhz,sf\" e.g. \"910.525,62.5,7\"",
"type": "string"
},
"sourceType": {
@@ -2126,7 +2163,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Region": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Region": {
"type": "object",
"properties": {
"centerLat": {
@@ -2163,7 +2200,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.RegionSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.RegionSummary": {
"type": "object",
"properties": {
"id": {
@@ -2178,22 +2215,23 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ResolvedHop": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ResolvedHop": {
"type": "object",
"properties": {
"confidence": {
"description": "\"high\", \"low\", \"unknown\"",
"description": "\"high\", \"ambiguous\", or \"none\"",
"type": "string"
},
"nodes": {
"description": "empty for \"none\", one for \"high\", multiple for \"ambiguous\"",
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ResolvedNode"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ResolvedNode"
}
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ResolvedNode": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ResolvedNode": {
"type": "object",
"properties": {
"id": {
@@ -2209,29 +2247,33 @@ const docTemplate = `{
"type": "string"
},
"publicKey": {
"description": "hex-encoded prefix",
"description": "hex-encoded prefix used for resolution",
"type": "string"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ScopeStats": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ScopeStats": {
"type": "object",
"properties": {
"name": {
"description": "normalized scope name e.g. \"#bc\"",
"type": "string"
},
"nodeCount": {
"description": "distinct nodes with this as their default scope",
"type": "integer"
},
"observerCount": {
"description": "distinct observers that forwarded packets in this scope",
"type": "integer"
},
"packetCount": {
"description": "distinct packets matched to this scope",
"type": "integer"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.StatsOverview": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.StatsOverview": {
"type": "object",
"properties": {
"activeIatas": {
@@ -2252,7 +2294,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.TopNode": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.TopNode": {
"type": "object",
"properties": {
"iata": {
@@ -2279,7 +2321,7 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.TopObserver": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.TopObserver": {
"type": "object",
"properties": {
"displayName": {
@@ -2370,7 +2412,7 @@ var SwaggerInfo = &swag.Spec{
Host: "localhost:8080",
BasePath: "/api/v1",
Schemes: []string{"http", "https"},
Title: "MeshCore Tower API",
Title: "MeshCore Beacon API",
Description: "MeshCore network observation backend. Ingests LoRa packets from MQTT brokers, stores in PostgreSQL, and streams live events via WebSocket.",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
+139 -97
View File
@@ -6,11 +6,11 @@
"swagger": "2.0",
"info": {
"description": "MeshCore network observation backend. Ingests LoRa packets from MQTT brokers, stores in PostgreSQL, and streams live events via WebSocket.",
"title": "MeshCore Tower API",
"termsOfService": "https://github.com/MeshCore-Tower/tower-server",
"title": "MeshCore Beacon API",
"termsOfService": "https://github.com/MeshCore-Beacon/beacon-server",
"contact": {
"name": "MeshCore Tower",
"url": "https://github.com/MeshCore-Tower/tower-server"
"name": "MeshCore Beacon",
"url": "https://github.com/MeshCore-Beacon/beacon-server"
},
"license": {
"name": "MIT"
@@ -81,7 +81,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_ChannelSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_ChannelSummary"
}
},
"400": {
@@ -121,7 +121,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Channel"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Channel"
}
},
"400": {
@@ -236,7 +236,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.IATA"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.IATA"
}
}
},
@@ -271,7 +271,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.IATA"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.IATA"
}
},
"404": {
@@ -463,7 +463,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_NodeSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_NodeSummary"
}
},
"400": {
@@ -503,7 +503,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Node"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Node"
}
},
"400": {
@@ -555,7 +555,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_PacketObservationSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_PacketObservationSummary"
}
},
"400": {
@@ -654,7 +654,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_ObserverSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_ObserverSummary"
}
},
"400": {
@@ -694,7 +694,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Observer"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Observer"
}
},
"400": {
@@ -746,7 +746,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_AdvertObservation"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_AdvertObservation"
}
},
"400": {
@@ -804,7 +804,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ObserverTelemetry"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverTelemetry"
}
},
"400": {
@@ -949,7 +949,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Packet"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Packet"
}
},
"400": {
@@ -988,7 +988,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.RegionSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.RegionSummary"
}
}
},
@@ -1023,7 +1023,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Region"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Region"
}
},
"400": {
@@ -1070,7 +1070,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ObservationPoint"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObservationPoint"
}
}
},
@@ -1104,7 +1104,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.StatsOverview"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.StatsOverview"
}
},
"500": {
@@ -1145,7 +1145,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PayloadBreakdownItem"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PayloadBreakdownItem"
}
}
},
@@ -1187,7 +1187,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.RadioPreset"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.RadioPreset"
}
}
},
@@ -1215,7 +1215,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ScopeStats"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ScopeStats"
}
}
},
@@ -1257,7 +1257,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.TopNode"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.TopNode"
}
}
},
@@ -1305,7 +1305,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.TopObserver"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.TopObserver"
}
}
},
@@ -1320,7 +1320,7 @@
}
},
"definitions": {
"github_com_MeshCore-Tower_tower-server_internal_api.AdvertObservation": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.AdvertObservation": {
"type": "object",
"properties": {
"heardAt": {
@@ -1341,6 +1341,7 @@
"type": "string"
},
"nodePublicKey": {
"description": "hex-encoded",
"type": "string"
},
"packetHash": {
@@ -1361,7 +1362,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Channel": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Channel": {
"type": "object",
"properties": {
"channelHash": {
@@ -1369,14 +1370,14 @@
"type": "string"
},
"hashtag": {
"description": "tag name without # prefix",
"description": "tag name without # prefix; non-nil only for hashtag channels",
"type": "string"
},
"id": {
"type": "integer"
},
"isHashtag": {
"description": "true if derived from a hashtag PSK",
"description": "true if key was derived from a hashtag PSK",
"type": "boolean"
},
"keyFingerprint": {
@@ -1384,23 +1385,23 @@
"type": "string"
},
"keyKnown": {
"description": "true if Tower has a decryption key",
"description": "true if Beacon has a decryption key for this channel",
"type": "boolean"
},
"lastSeen": {
"description": "epoch ms",
"description": "epoch ms, time of most recent message",
"type": "integer"
},
"messageCount": {
"type": "integer"
},
"name": {
"description": "display name, nil if not set",
"description": "display name from config or nil",
"type": "string"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ChannelSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ChannelSummary": {
"type": "object",
"properties": {
"channelHash": {
@@ -1411,24 +1412,24 @@
"type": "integer"
},
"isHashtag": {
"description": "true if derived from a hashtag PSK",
"description": "true if key was derived from a hashtag PSK",
"type": "boolean"
},
"keyKnown": {
"description": "true if Tower has a decryption key",
"description": "true if Beacon has a decryption key for this channel",
"type": "boolean"
},
"lastSeen": {
"description": "epoch ms",
"description": "epoch ms, time of most recent message",
"type": "integer"
},
"name": {
"description": "display name, nil if not set",
"description": "display name from config or nil",
"type": "string"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.IATA": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.IATA": {
"type": "object",
"properties": {
"displayName": {
@@ -1445,10 +1446,11 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Node": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Node": {
"type": "object",
"properties": {
"defaultScope": {
"description": "most recently matched transport scope name e.g. \"#bc\"",
"type": "string"
},
"firstSeen": {
@@ -1456,15 +1458,17 @@
"type": "integer"
},
"iatas": {
"description": "IATAs where this node has been heard, with last heard timestamps",
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.NodeIATA"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.NodeIATA"
}
},
"id": {
"type": "string"
},
"isObserver": {
"description": "true if this node is also a known observer",
"type": "boolean"
},
"lastAdvertAt": {
@@ -1476,13 +1480,15 @@
"type": "integer"
},
"lat": {
"description": "decimal degrees, from advert AppData",
"type": "number"
},
"lng": {
"description": "decimal degrees, from advert AppData",
"type": "number"
},
"locationSource": {
"description": "e.g. \"advert\", \"manual\"",
"description": "\"advert\" or \"manual\"",
"type": "string"
},
"metadata": {
@@ -1496,33 +1502,35 @@
"type": "string"
},
"nodeType": {
"description": "1=companion, 2=repeater, 3=room server",
"description": "1=companion, 2=repeater, 3=room_server, 4=sensor",
"type": "integer"
},
"nodeTypeName": {
"type": "string"
},
"observerId": {
"description": "UUID of the associated observer row, if any",
"type": "string"
},
"publicKey": {
"description": "hex-encoded public key",
"description": "hex-encoded Ed25519 public key",
"type": "string"
},
"radio": {
"description": "shorthand: \"freqMhz,bwKhz,sf\" e.g. \"910.5,62.5,7\"",
"type": "string"
},
"supportsMultibytePaths": {
"description": "firmware \u003e= 1.14.0",
"description": "firmware \u003e= 1.14.0; detected via path hash size",
"type": "boolean"
},
"supportsMultibyteTraces": {
"description": "firmware \u003e= 1.11.0",
"description": "firmware \u003e= 1.11.0; detected via trace hash size",
"type": "boolean"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.NodeIATA": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.NodeIATA": {
"type": "object",
"properties": {
"iata": {
@@ -1534,60 +1542,67 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.NodeSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.NodeSummary": {
"type": "object",
"properties": {
"defaultScope": {
"description": "most recently matched transport scope name e.g. \"#bc\"",
"type": "string"
},
"iatas": {
"description": "IATAs where this node has been heard, with last heard timestamps",
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.NodeIATA"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.NodeIATA"
}
},
"id": {
"type": "string"
},
"isObserver": {
"description": "true if this node is also a known observer",
"type": "boolean"
},
"lat": {
"description": "decimal degrees, from advert AppData",
"type": "number"
},
"lng": {
"description": "decimal degrees, from advert AppData",
"type": "number"
},
"name": {
"type": "string"
},
"nodeType": {
"description": "1=companion, 2=repeater, 3=room server",
"description": "1=companion, 2=repeater, 3=room_server, 4=sensor",
"type": "integer"
},
"nodeTypeName": {
"type": "string"
},
"observerId": {
"description": "UUID of the associated observer row, if any",
"type": "string"
},
"publicKey": {
"description": "hex-encoded public key",
"description": "hex-encoded Ed25519 public key",
"type": "string"
},
"radio": {
"description": "shorthand: \"freqMhz,bwKhz,sf\" e.g. \"910.5,62.5,7\"",
"type": "string"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ObservationPoint": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ObservationPoint": {
"type": "object",
"properties": {
"activeObservers": {
"type": "integer"
},
"hour": {
"description": "epoch ms, start of bucket",
"description": "epoch ms, start of the 1-hour bucket",
"type": "integer"
},
"iata": {
@@ -1601,7 +1616,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Observer": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Observer": {
"type": "object",
"properties": {
"batteryLevel": {
@@ -1612,7 +1627,7 @@
"description": "broker names this observer has been seen on",
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ObserverBroker"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverBroker"
}
},
"displayName": {
@@ -1700,7 +1715,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ObserverBroker": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverBroker": {
"type": "object",
"properties": {
"lastPacketAt": {
@@ -1717,7 +1732,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ObserverSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverSummary": {
"type": "object",
"properties": {
"displayName": {
@@ -1752,7 +1767,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ObserverTelemetry": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverTelemetry": {
"type": "object",
"properties": {
"interval": {
@@ -1761,7 +1776,7 @@
"points": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ObserverTelemetryPoint"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverTelemetryPoint"
}
},
"range": {
@@ -1769,7 +1784,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ObserverTelemetryPoint": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverTelemetryPoint": {
"type": "object",
"properties": {
"airtimeRxPct": {
@@ -1799,25 +1814,30 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Packet": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Packet": {
"type": "object",
"properties": {
"channelHash": {
"description": "hex-encoded single byte; non-nil for group_text/group_data",
"type": "string"
},
"decrypted": {
"description": "true if group text was successfully decrypted",
"type": "boolean"
},
"firstHeardAt": {
"description": "epoch ms",
"type": "integer"
},
"firstToLastMs": {
"description": "ms between first and last observation",
"type": "integer"
},
"header": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketHeader"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketHeader"
},
"lastHeardAt": {
"description": "epoch ms",
"type": "integer"
},
"observationCount": {
@@ -1826,10 +1846,11 @@
"observations": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketObservationDetail"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketObservationDetail"
}
},
"originPubkey": {
"description": "hex-encoded; nil when not extractable from payload",
"type": "string"
},
"packetHash": {
@@ -1842,46 +1863,55 @@
}
},
"rawPayload": {
"description": "hex-encoded payload bytes (excludes header and path)",
"type": "string"
},
"resolvedRoute": {
"description": "trace packets only: resolved intended route",
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ResolvedHop"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ResolvedHop"
}
},
"scope": {
"description": "matched transport scope name e.g. \"#bc\"",
"type": "string"
},
"transportCodes": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketTransportCodes"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketTransportCodes"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.PacketHeader": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.PacketHeader": {
"type": "object",
"properties": {
"payloadType": {
"description": "bits 2-5",
"type": "integer"
},
"payloadTypeName": {
"description": "advert, request, group_text, etc.",
"type": "string"
},
"payloadVersion": {
"description": "bits 6-7",
"type": "integer"
},
"raw": {
"description": "hex-encoded single byte",
"type": "string"
},
"routeType": {
"description": "bits 0-1",
"type": "integer"
},
"routeTypeName": {
"description": "FLOOD, DIRECT, TRANSPORT_FLOOD, TRANSPORT_DIRECT",
"type": "string"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.PacketObservationDetail": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.PacketObservationDetail": {
"type": "object",
"properties": {
"heardAt": {
@@ -1901,22 +1931,24 @@
"type": "string"
},
"pathBytes": {
"description": "hex-encoded",
"description": "hex-encoded accumulated path hashes",
"type": "string"
},
"pathLength": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketPathLength"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketPathLength"
},
"propagationTimeMs": {
"description": "ms since first observation; 0 for first",
"type": "integer"
},
"radio": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketRadio"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketRadio"
},
"resolvedPath": {
"description": "per-observation resolved path hashes",
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ResolvedHop"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ResolvedHop"
}
},
"rssi": {
@@ -1930,7 +1962,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.PacketObservationSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.PacketObservationSummary": {
"type": "object",
"properties": {
"heardAt": {
@@ -1965,21 +1997,24 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.PacketPathLength": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.PacketPathLength": {
"type": "object",
"properties": {
"hashSize": {
"description": "per-hop hash size in bytes (1, 2, or 3)",
"type": "integer"
},
"hopCount": {
"description": "number of path hashes present",
"type": "integer"
},
"raw": {
"description": "hex-encoded single byte",
"type": "string"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.PacketRadio": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.PacketRadio": {
"type": "object",
"properties": {
"bandwidthKhz": {
@@ -1996,7 +2031,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.PacketTransportCodes": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.PacketTransportCodes": {
"type": "object",
"properties": {
"regionCode": {
@@ -2007,7 +2042,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_AdvertObservation": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_AdvertObservation": {
"type": "object",
"properties": {
"hasMore": {
@@ -2016,7 +2051,7 @@
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.AdvertObservation"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.AdvertObservation"
}
},
"nextCursor": {
@@ -2024,7 +2059,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_ChannelSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_ChannelSummary": {
"type": "object",
"properties": {
"hasMore": {
@@ -2033,7 +2068,7 @@
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ChannelSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ChannelSummary"
}
},
"nextCursor": {
@@ -2041,7 +2076,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_NodeSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_NodeSummary": {
"type": "object",
"properties": {
"hasMore": {
@@ -2050,7 +2085,7 @@
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.NodeSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.NodeSummary"
}
},
"nextCursor": {
@@ -2058,7 +2093,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_ObserverSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_ObserverSummary": {
"type": "object",
"properties": {
"hasMore": {
@@ -2067,7 +2102,7 @@
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ObserverSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverSummary"
}
},
"nextCursor": {
@@ -2075,7 +2110,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_PacketObservationSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_PacketObservationSummary": {
"type": "object",
"properties": {
"hasMore": {
@@ -2084,7 +2119,7 @@
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketObservationSummary"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketObservationSummary"
}
},
"nextCursor": {
@@ -2092,7 +2127,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.PayloadBreakdownItem": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.PayloadBreakdownItem": {
"type": "object",
"properties": {
"count": {
@@ -2106,16 +2141,18 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.RadioPreset": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.RadioPreset": {
"type": "object",
"properties": {
"count": {
"description": "number of observers or nodes on this preset in this IATA",
"type": "integer"
},
"iata": {
"type": "string"
},
"preset": {
"description": "\"freqMhz,bwKhz,sf\" e.g. \"910.525,62.5,7\"",
"type": "string"
},
"sourceType": {
@@ -2124,7 +2161,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.Region": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.Region": {
"type": "object",
"properties": {
"centerLat": {
@@ -2161,7 +2198,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.RegionSummary": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.RegionSummary": {
"type": "object",
"properties": {
"id": {
@@ -2176,22 +2213,23 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ResolvedHop": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ResolvedHop": {
"type": "object",
"properties": {
"confidence": {
"description": "\"high\", \"low\", \"unknown\"",
"description": "\"high\", \"ambiguous\", or \"none\"",
"type": "string"
},
"nodes": {
"description": "empty for \"none\", one for \"high\", multiple for \"ambiguous\"",
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ResolvedNode"
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ResolvedNode"
}
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ResolvedNode": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ResolvedNode": {
"type": "object",
"properties": {
"id": {
@@ -2207,29 +2245,33 @@
"type": "string"
},
"publicKey": {
"description": "hex-encoded prefix",
"description": "hex-encoded prefix used for resolution",
"type": "string"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.ScopeStats": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.ScopeStats": {
"type": "object",
"properties": {
"name": {
"description": "normalized scope name e.g. \"#bc\"",
"type": "string"
},
"nodeCount": {
"description": "distinct nodes with this as their default scope",
"type": "integer"
},
"observerCount": {
"description": "distinct observers that forwarded packets in this scope",
"type": "integer"
},
"packetCount": {
"description": "distinct packets matched to this scope",
"type": "integer"
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.StatsOverview": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.StatsOverview": {
"type": "object",
"properties": {
"activeIatas": {
@@ -2250,7 +2292,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.TopNode": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.TopNode": {
"type": "object",
"properties": {
"iata": {
@@ -2277,7 +2319,7 @@
}
}
},
"github_com_MeshCore-Tower_tower-server_internal_api.TopObserver": {
"github_com_MeshCore-Beacon_beacon-server_internal_api.TopObserver": {
"type": "object",
"properties": {
"displayName": {
+175 -133
View File
@@ -1,6 +1,6 @@
basePath: /api/v1
definitions:
github_com_MeshCore-Tower_tower-server_internal_api.AdvertObservation:
github_com_MeshCore-Beacon_beacon-server_internal_api.AdvertObservation:
properties:
heardAt:
description: epoch ms
@@ -15,6 +15,7 @@ definitions:
nodeName:
type: string
nodePublicKey:
description: hex-encoded
type: string
packetHash:
description: hex-encoded
@@ -28,35 +29,35 @@ definitions:
snr:
type: number
type: object
github_com_MeshCore-Tower_tower-server_internal_api.Channel:
github_com_MeshCore-Beacon_beacon-server_internal_api.Channel:
properties:
channelHash:
description: hex-encoded single-byte hash
type: string
hashtag:
description: 'tag name without # prefix'
description: 'tag name without # prefix; non-nil only for hashtag channels'
type: string
id:
type: integer
isHashtag:
description: true if derived from a hashtag PSK
description: true if key was derived from a hashtag PSK
type: boolean
keyFingerprint:
description: first 8 bytes of SHA256(key), hex-encoded
type: string
keyKnown:
description: true if Tower has a decryption key
description: true if Beacon has a decryption key for this channel
type: boolean
lastSeen:
description: epoch ms
description: epoch ms, time of most recent message
type: integer
messageCount:
type: integer
name:
description: display name, nil if not set
description: display name from config or nil
type: string
type: object
github_com_MeshCore-Tower_tower-server_internal_api.ChannelSummary:
github_com_MeshCore-Beacon_beacon-server_internal_api.ChannelSummary:
properties:
channelHash:
description: hex-encoded single-byte hash
@@ -64,19 +65,19 @@ definitions:
id:
type: integer
isHashtag:
description: true if derived from a hashtag PSK
description: true if key was derived from a hashtag PSK
type: boolean
keyKnown:
description: true if Tower has a decryption key
description: true if Beacon has a decryption key for this channel
type: boolean
lastSeen:
description: epoch ms
description: epoch ms, time of most recent message
type: integer
name:
description: display name, nil if not set
description: display name from config or nil
type: string
type: object
github_com_MeshCore-Tower_tower-server_internal_api.IATA:
github_com_MeshCore-Beacon_beacon-server_internal_api.IATA:
properties:
displayName:
type: string
@@ -87,20 +88,23 @@ definitions:
lon:
type: number
type: object
github_com_MeshCore-Tower_tower-server_internal_api.Node:
github_com_MeshCore-Beacon_beacon-server_internal_api.Node:
properties:
defaultScope:
description: most recently matched transport scope name e.g. "#bc"
type: string
firstSeen:
description: epoch ms
type: integer
iatas:
description: IATAs where this node has been heard, with last heard timestamps
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.NodeIATA'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.NodeIATA'
type: array
id:
type: string
isObserver:
description: true if this node is also a known observer
type: boolean
lastAdvertAt:
description: epoch ms, nil if no advert received
@@ -109,11 +113,13 @@ definitions:
description: epoch ms
type: integer
lat:
description: decimal degrees, from advert AppData
type: number
lng:
description: decimal degrees, from advert AppData
type: number
locationSource:
description: e.g. "advert", "manual"
description: '"advert" or "manual"'
type: string
metadata:
description: raw JSONB metadata
@@ -123,25 +129,27 @@ definitions:
name:
type: string
nodeType:
description: 1=companion, 2=repeater, 3=room server
description: 1=companion, 2=repeater, 3=room_server, 4=sensor
type: integer
nodeTypeName:
type: string
observerId:
description: UUID of the associated observer row, if any
type: string
publicKey:
description: hex-encoded public key
description: hex-encoded Ed25519 public key
type: string
radio:
description: 'shorthand: "freqMhz,bwKhz,sf" e.g. "910.5,62.5,7"'
type: string
supportsMultibytePaths:
description: firmware >= 1.14.0
description: firmware >= 1.14.0; detected via path hash size
type: boolean
supportsMultibyteTraces:
description: firmware >= 1.11.0
description: firmware >= 1.11.0; detected via trace hash size
type: boolean
type: object
github_com_MeshCore-Tower_tower-server_internal_api.NodeIATA:
github_com_MeshCore-Beacon_beacon-server_internal_api.NodeIATA:
properties:
iata:
type: string
@@ -149,43 +157,50 @@ definitions:
description: epoch ms
type: integer
type: object
github_com_MeshCore-Tower_tower-server_internal_api.NodeSummary:
github_com_MeshCore-Beacon_beacon-server_internal_api.NodeSummary:
properties:
defaultScope:
description: most recently matched transport scope name e.g. "#bc"
type: string
iatas:
description: IATAs where this node has been heard, with last heard timestamps
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.NodeIATA'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.NodeIATA'
type: array
id:
type: string
isObserver:
description: true if this node is also a known observer
type: boolean
lat:
description: decimal degrees, from advert AppData
type: number
lng:
description: decimal degrees, from advert AppData
type: number
name:
type: string
nodeType:
description: 1=companion, 2=repeater, 3=room server
description: 1=companion, 2=repeater, 3=room_server, 4=sensor
type: integer
nodeTypeName:
type: string
observerId:
description: UUID of the associated observer row, if any
type: string
publicKey:
description: hex-encoded public key
description: hex-encoded Ed25519 public key
type: string
radio:
description: 'shorthand: "freqMhz,bwKhz,sf" e.g. "910.5,62.5,7"'
type: string
type: object
github_com_MeshCore-Tower_tower-server_internal_api.ObservationPoint:
github_com_MeshCore-Beacon_beacon-server_internal_api.ObservationPoint:
properties:
activeObservers:
type: integer
hour:
description: epoch ms, start of bucket
description: epoch ms, start of the 1-hour bucket
type: integer
iata:
type: string
@@ -194,7 +209,7 @@ definitions:
uniquePackets:
type: integer
type: object
github_com_MeshCore-Tower_tower-server_internal_api.Observer:
github_com_MeshCore-Beacon_beacon-server_internal_api.Observer:
properties:
batteryLevel:
description: volts, nil if mains powered
@@ -202,7 +217,7 @@ definitions:
brokers:
description: broker names this observer has been seen on
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ObserverBroker'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverBroker'
type: array
displayName:
description: friendly name from /status messages
@@ -265,7 +280,7 @@ definitions:
uptimeSeconds:
type: integer
type: object
github_com_MeshCore-Tower_tower-server_internal_api.ObserverBroker:
github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverBroker:
properties:
lastPacketAt:
description: epoch ms, last packet received via this broker; 0 if none
@@ -277,7 +292,7 @@ definitions:
description: broker name e.g. "mqtt1"
type: string
type: object
github_com_MeshCore-Tower_tower-server_internal_api.ObserverSummary:
github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverSummary:
properties:
displayName:
description: friendly name from /status messages
@@ -302,18 +317,18 @@ definitions:
description: '"online" or "offline" derived from last_status_at'
type: string
type: object
github_com_MeshCore-Tower_tower-server_internal_api.ObserverTelemetry:
github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverTelemetry:
properties:
interval:
type: string
points:
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ObserverTelemetryPoint'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverTelemetryPoint'
type: array
range:
type: string
type: object
github_com_MeshCore-Tower_tower-server_internal_api.ObserverTelemetryPoint:
github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverTelemetryPoint:
properties:
airtimeRxPct:
type: number
@@ -333,27 +348,33 @@ definitions:
uptimeSeconds:
type: integer
type: object
github_com_MeshCore-Tower_tower-server_internal_api.Packet:
github_com_MeshCore-Beacon_beacon-server_internal_api.Packet:
properties:
channelHash:
description: hex-encoded single byte; non-nil for group_text/group_data
type: string
decrypted:
description: true if group text was successfully decrypted
type: boolean
firstHeardAt:
description: epoch ms
type: integer
firstToLastMs:
description: ms between first and last observation
type: integer
header:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketHeader'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketHeader'
lastHeardAt:
description: epoch ms
type: integer
observationCount:
type: integer
observations:
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketObservationDetail'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketObservationDetail'
type: array
originPubkey:
description: hex-encoded; nil when not extractable from payload
type: string
packetHash:
type: string
@@ -362,32 +383,41 @@ definitions:
type: integer
type: array
rawPayload:
description: hex-encoded payload bytes (excludes header and path)
type: string
resolvedRoute:
description: 'trace packets only: resolved intended route'
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ResolvedHop'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ResolvedHop'
type: array
scope:
description: matched transport scope name e.g. "#bc"
type: string
transportCodes:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketTransportCodes'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketTransportCodes'
type: object
github_com_MeshCore-Tower_tower-server_internal_api.PacketHeader:
github_com_MeshCore-Beacon_beacon-server_internal_api.PacketHeader:
properties:
payloadType:
description: bits 2-5
type: integer
payloadTypeName:
description: advert, request, group_text, etc.
type: string
payloadVersion:
description: bits 6-7
type: integer
raw:
description: hex-encoded single byte
type: string
routeType:
description: bits 0-1
type: integer
routeTypeName:
description: FLOOD, DIRECT, TRANSPORT_FLOOD, TRANSPORT_DIRECT
type: string
type: object
github_com_MeshCore-Tower_tower-server_internal_api.PacketObservationDetail:
github_com_MeshCore-Beacon_beacon-server_internal_api.PacketObservationDetail:
properties:
heardAt:
description: epoch ms
@@ -401,17 +431,19 @@ definitions:
observerName:
type: string
pathBytes:
description: hex-encoded
description: hex-encoded accumulated path hashes
type: string
pathLength:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketPathLength'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketPathLength'
propagationTimeMs:
description: ms since first observation; 0 for first
type: integer
radio:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketRadio'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketRadio'
resolvedPath:
description: per-observation resolved path hashes
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ResolvedHop'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ResolvedHop'
type: array
rssi:
type: integer
@@ -420,7 +452,7 @@ definitions:
sourceBroker:
type: string
type: object
github_com_MeshCore-Tower_tower-server_internal_api.PacketObservationSummary:
github_com_MeshCore-Beacon_beacon-server_internal_api.PacketObservationSummary:
properties:
heardAt:
description: epoch ms
@@ -444,16 +476,19 @@ definitions:
snr:
type: number
type: object
github_com_MeshCore-Tower_tower-server_internal_api.PacketPathLength:
github_com_MeshCore-Beacon_beacon-server_internal_api.PacketPathLength:
properties:
hashSize:
description: per-hop hash size in bytes (1, 2, or 3)
type: integer
hopCount:
description: number of path hashes present
type: integer
raw:
description: hex-encoded single byte
type: string
type: object
github_com_MeshCore-Tower_tower-server_internal_api.PacketRadio:
github_com_MeshCore-Beacon_beacon-server_internal_api.PacketRadio:
properties:
bandwidthKhz:
type: number
@@ -464,69 +499,69 @@ definitions:
spreadFactor:
type: integer
type: object
github_com_MeshCore-Tower_tower-server_internal_api.PacketTransportCodes:
github_com_MeshCore-Beacon_beacon-server_internal_api.PacketTransportCodes:
properties:
regionCode:
type: integer
subRegionCode:
type: integer
type: object
github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_AdvertObservation:
properties:
hasMore:
type: boolean
items:
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.AdvertObservation'
type: array
nextCursor:
type: integer
type: object
github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_ChannelSummary:
properties:
hasMore:
type: boolean
items:
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ChannelSummary'
type: array
nextCursor:
type: integer
type: object
github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_NodeSummary:
properties:
hasMore:
type: boolean
items:
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.NodeSummary'
type: array
nextCursor:
type: integer
type: object
github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_ObserverSummary:
properties:
hasMore:
type: boolean
items:
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ObserverSummary'
type: array
nextCursor:
type: integer
type: object
? github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_PacketObservationSummary
? github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_AdvertObservation
: properties:
hasMore:
type: boolean
items:
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PacketObservationSummary'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.AdvertObservation'
type: array
nextCursor:
type: integer
type: object
github_com_MeshCore-Tower_tower-server_internal_api.PayloadBreakdownItem:
github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_ChannelSummary:
properties:
hasMore:
type: boolean
items:
items:
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ChannelSummary'
type: array
nextCursor:
type: integer
type: object
github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_NodeSummary:
properties:
hasMore:
type: boolean
items:
items:
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.NodeSummary'
type: array
nextCursor:
type: integer
type: object
github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_ObserverSummary:
properties:
hasMore:
type: boolean
items:
items:
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverSummary'
type: array
nextCursor:
type: integer
type: object
? github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_PacketObservationSummary
: properties:
hasMore:
type: boolean
items:
items:
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PacketObservationSummary'
type: array
nextCursor:
type: integer
type: object
github_com_MeshCore-Beacon_beacon-server_internal_api.PayloadBreakdownItem:
properties:
count:
type: integer
@@ -535,19 +570,21 @@ definitions:
payloadTypeName:
type: string
type: object
github_com_MeshCore-Tower_tower-server_internal_api.RadioPreset:
github_com_MeshCore-Beacon_beacon-server_internal_api.RadioPreset:
properties:
count:
description: number of observers or nodes on this preset in this IATA
type: integer
iata:
type: string
preset:
description: '"freqMhz,bwKhz,sf" e.g. "910.525,62.5,7"'
type: string
sourceType:
description: '"observer" or "node"'
type: string
type: object
github_com_MeshCore-Tower_tower-server_internal_api.Region:
github_com_MeshCore-Beacon_beacon-server_internal_api.Region:
properties:
centerLat:
description: map center latitude
@@ -573,7 +610,7 @@ definitions:
description: suggested map zoom level
type: integer
type: object
github_com_MeshCore-Tower_tower-server_internal_api.RegionSummary:
github_com_MeshCore-Beacon_beacon-server_internal_api.RegionSummary:
properties:
id:
type: integer
@@ -583,17 +620,18 @@ definitions:
description: URL-safe identifier e.g. "western-canada"
type: string
type: object
github_com_MeshCore-Tower_tower-server_internal_api.ResolvedHop:
github_com_MeshCore-Beacon_beacon-server_internal_api.ResolvedHop:
properties:
confidence:
description: '"high", "low", "unknown"'
description: '"high", "ambiguous", or "none"'
type: string
nodes:
description: empty for "none", one for "high", multiple for "ambiguous"
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ResolvedNode'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ResolvedNode'
type: array
type: object
github_com_MeshCore-Tower_tower-server_internal_api.ResolvedNode:
github_com_MeshCore-Beacon_beacon-server_internal_api.ResolvedNode:
properties:
id:
type: string
@@ -604,21 +642,25 @@ definitions:
name:
type: string
publicKey:
description: hex-encoded prefix
description: hex-encoded prefix used for resolution
type: string
type: object
github_com_MeshCore-Tower_tower-server_internal_api.ScopeStats:
github_com_MeshCore-Beacon_beacon-server_internal_api.ScopeStats:
properties:
name:
description: normalized scope name e.g. "#bc"
type: string
nodeCount:
description: distinct nodes with this as their default scope
type: integer
observerCount:
description: distinct observers that forwarded packets in this scope
type: integer
packetCount:
description: distinct packets matched to this scope
type: integer
type: object
github_com_MeshCore-Tower_tower-server_internal_api.StatsOverview:
github_com_MeshCore-Beacon_beacon-server_internal_api.StatsOverview:
properties:
activeIatas:
type: integer
@@ -632,7 +674,7 @@ definitions:
description: always 24 for now
type: integer
type: object
github_com_MeshCore-Tower_tower-server_internal_api.TopNode:
github_com_MeshCore-Beacon_beacon-server_internal_api.TopNode:
properties:
iata:
type: string
@@ -650,7 +692,7 @@ definitions:
observationCount:
type: integer
type: object
github_com_MeshCore-Tower_tower-server_internal_api.TopObserver:
github_com_MeshCore-Beacon_beacon-server_internal_api.TopObserver:
properties:
displayName:
type: string
@@ -682,14 +724,14 @@ definitions:
host: localhost:8080
info:
contact:
name: MeshCore Tower
url: https://github.com/MeshCore-Tower/tower-server
name: MeshCore Beacon
url: https://github.com/MeshCore-Beacon/beacon-server
description: MeshCore network observation backend. Ingests LoRa packets from MQTT
brokers, stores in PostgreSQL, and streams live events via WebSocket.
license:
name: MIT
termsOfService: https://github.com/MeshCore-Tower/tower-server
title: MeshCore Tower API
termsOfService: https://github.com/MeshCore-Beacon/beacon-server
title: MeshCore Beacon API
version: "1.0"
paths:
/brokers:
@@ -731,7 +773,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_ChannelSummary'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_ChannelSummary'
"400":
description: Bad Request
schema:
@@ -757,7 +799,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Channel'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Channel'
"400":
description: Bad Request
schema:
@@ -832,7 +874,7 @@ paths:
description: OK
schema:
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.IATA'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.IATA'
type: array
"404":
description: Not Found
@@ -855,7 +897,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.IATA'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.IATA'
"404":
description: Not Found
schema:
@@ -981,7 +1023,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_NodeSummary'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_NodeSummary'
"400":
description: Bad Request
schema:
@@ -1007,7 +1049,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Node'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Node'
"400":
description: Bad Request
schema:
@@ -1041,7 +1083,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_PacketObservationSummary'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_PacketObservationSummary'
"400":
description: Bad Request
schema:
@@ -1106,7 +1148,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_ObserverSummary'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_ObserverSummary'
"400":
description: Bad Request
schema:
@@ -1132,7 +1174,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Observer'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Observer'
"400":
description: Bad Request
schema:
@@ -1166,7 +1208,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Page-github_com_MeshCore-Tower_tower-server_internal_api_AdvertObservation'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Page-github_com_MeshCore-Beacon_beacon-server_internal_api_AdvertObservation'
"400":
description: Bad Request
schema:
@@ -1205,7 +1247,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ObserverTelemetry'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverTelemetry'
"400":
description: Bad Request
schema:
@@ -1301,7 +1343,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Packet'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Packet'
"400":
description: Bad Request
schema:
@@ -1327,7 +1369,7 @@ paths:
description: OK
schema:
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.RegionSummary'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.RegionSummary'
type: array
"404":
description: Not Found
@@ -1350,7 +1392,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.Region'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Region'
"400":
description: Bad Request
schema:
@@ -1380,7 +1422,7 @@ paths:
description: OK
schema:
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ObservationPoint'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObservationPoint'
type: array
"500":
description: Internal Server Error
@@ -1402,7 +1444,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.StatsOverview'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.StatsOverview'
"500":
description: Internal Server Error
schema:
@@ -1428,7 +1470,7 @@ paths:
description: OK
schema:
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.PayloadBreakdownItem'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.PayloadBreakdownItem'
type: array
"500":
description: Internal Server Error
@@ -1455,7 +1497,7 @@ paths:
description: OK
schema:
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.RadioPreset'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.RadioPreset'
type: array
"500":
description: Internal Server Error
@@ -1473,7 +1515,7 @@ paths:
description: OK
schema:
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.ScopeStats'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ScopeStats'
type: array
"500":
description: Internal Server Error
@@ -1500,7 +1542,7 @@ paths:
description: OK
schema:
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.TopNode'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.TopNode'
type: array
"500":
description: Internal Server Error
@@ -1531,7 +1573,7 @@ paths:
description: OK
schema:
items:
$ref: '#/definitions/github_com_MeshCore-Tower_tower-server_internal_api.TopObserver'
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.TopObserver'
type: array
"500":
description: Internal Server Error
+1 -1
View File
@@ -1,6 +1,6 @@
LISTEN_ADDR=:8080
POSTGRES_DSN=postgres://tower:tower@localhost:5432/tower?sslmode=disable
POSTGRES_DSN=postgres://beacon:beacon@localhost:5432/beacon?sslmode=disable
REDIS_ADDR=localhost:6379
+1 -1
View File
@@ -1,4 +1,4 @@
module github.com/MeshCore-Tower/tower-server
module github.com/MeshCore-Beacon/beacon-server
go 1.26.1
+1 -1
View File
@@ -19,7 +19,7 @@ type ChannelSummary struct {
ChannelHash string `json:"channelHash"` // hex-encoded single-byte hash
LastSeen int64 `json:"lastSeen"` // epoch ms, time of most recent message
IsHashtag bool `json:"isHashtag"` // true if key was derived from a hashtag PSK
KeyKnown bool `json:"keyKnown"` // true if Tower has a decryption key for this channel
KeyKnown bool `json:"keyKnown"` // true if Beacon has a decryption key for this channel
}
// Channel is the full channel representation including decryption metadata.
+1 -1
View File
@@ -3,7 +3,7 @@ package handlers
import (
"net/http"
"github.com/MeshCore-Tower/tower-server/internal/ingest"
"github.com/MeshCore-Beacon/beacon-server/internal/ingest"
"github.com/go-chi/chi/v5"
)
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"strconv"
"time"
"github.com/MeshCore-Tower/tower-server/internal/api"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/go-chi/chi/v5"
)
+1 -1
View File
@@ -3,7 +3,7 @@ package handlers
import (
"net/http"
"github.com/MeshCore-Tower/tower-server/internal/api"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/go-chi/chi/v5"
)
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"strconv"
"time"
"github.com/MeshCore-Tower/tower-server/internal/api"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/go-chi/chi/v5"
)
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"github.com/MeshCore-Tower/tower-server/internal/api"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/go-chi/chi/v5"
"github.com/google/uuid"
)
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"strconv"
"time"
"github.com/MeshCore-Tower/tower-server/internal/api"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/go-chi/chi/v5"
"github.com/google/uuid"
)
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"strconv"
"time"
"github.com/MeshCore-Tower/tower-server/internal/api"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/go-chi/chi/v5"
)
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"strconv"
"strings"
"github.com/MeshCore-Tower/tower-server/internal/api"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/go-chi/chi/v5"
)
+2 -2
View File
@@ -1,4 +1,4 @@
// Package handlers provides HTTP route handlers for the Tower REST API.
// Package handlers provides HTTP route handlers for the Beacon REST API.
package handlers
import (
@@ -8,7 +8,7 @@ import (
"strings"
)
// APIError is the standard error response shape for all Tower API endpoints.
// APIError is the standard error response shape for all Beacon API endpoints.
// Code is a stable snake_case identifier derived from the HTTP status text,
// safe to match against in client code. Message is a human-readable description.
type APIError struct {
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"strconv"
"time"
"github.com/MeshCore-Tower/tower-server/internal/api"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/go-chi/chi/v5"
)
+1 -1
View File
@@ -1,4 +1,4 @@
// Package api defines the response types and read interface for the Tower REST API.
// Package api defines the response types and read interface for the Beacon REST API.
package api
import (
+6 -6
View File
@@ -10,12 +10,12 @@ import (
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"github.com/MeshCore-Tower/tower-server/internal/api"
"github.com/MeshCore-Tower/tower-server/internal/api/handlers"
mw "github.com/MeshCore-Tower/tower-server/internal/api/middleware"
"github.com/MeshCore-Tower/tower-server/internal/hub"
"github.com/MeshCore-Tower/tower-server/internal/ingest"
"github.com/MeshCore-Tower/tower-server/internal/ws"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/MeshCore-Beacon/beacon-server/internal/api/handlers"
mw "github.com/MeshCore-Beacon/beacon-server/internal/api/middleware"
"github.com/MeshCore-Beacon/beacon-server/internal/hub"
"github.com/MeshCore-Beacon/beacon-server/internal/ingest"
"github.com/MeshCore-Beacon/beacon-server/internal/ws"
httpSwagger "github.com/swaggo/http-swagger"
)
+6 -6
View File
@@ -1,4 +1,4 @@
// Package config loads the Tower configuration file and seeds the database
// Package config loads the Beacon configuration file and seeds the database
// with regions, IATA overrides, and channel keys on startup.
package config
@@ -9,7 +9,7 @@ import (
"gopkg.in/yaml.v3"
)
// Config is the top-level structure of the Tower config file.
// Config is the top-level structure of the Beacon config file.
type Config struct {
IATAs map[string]IATAConfig `yaml:"iatas"`
Regions []RegionConfig `yaml:"regions"`
@@ -23,7 +23,7 @@ type Config struct {
// ScopeConfig defines a regional transport scope.
// Name can be provided with or without the # or $ prefix.
// Tower normalizes plain names by prepending #.
// Beacon normalizes plain names by prepending #.
type ScopeConfig struct {
Name string `yaml:"name"` // e.g. "bc", "#west", "$private"
}
@@ -80,7 +80,7 @@ func (d *duration) UnmarshalYAML(value *yaml.Node) error {
// keyed by the channel hash hex (e.g. "11" for 0x11).
type ChannelKeysConfig struct {
// Hashtags is a list of hashtag names (without the # prefix).
// Tower derives the PSK and channel hash automatically.
// Beacon derives the PSK and channel hash automatically.
Hashtags []string `yaml:"hashtags"`
// Keys maps channel hash hex → explicit key config.
@@ -113,7 +113,7 @@ type RegionConfig struct {
}
// IngestFilterConfig restricts which packets Tower stores based on the
// IngestFilterConfig restricts which packets Beacon stores based on the
// observer's IATA geographic location. Both filters are optional — if neither
// is set all IATAs are accepted. If both are set an IATA passes if it matches
// either (OR semantics).
@@ -132,7 +132,7 @@ type IngestFilterConfig struct {
// Load reads and parses the config file at path.
// Returns an empty Config (not an error) if the file does not exist,
// so Tower starts cleanly without a config file.
// so Beacon starts cleanly without a config file.
func Load(path string) (*Config, error) {
cfg := &Config{}
data, err := os.ReadFile(path)
+1 -1
View File
@@ -182,7 +182,7 @@ func (h *Hub) Broadcast(e Event) {
func (h *Hub) Run() {
// clients maps a *Client to the set of subscription IDs it holds.
// We use a map[*Client]struct{} for O(1) presence checks and O(n)
// broadcast — fine at the scale Tower targets.
// broadcast — fine at the scale Beacon targets.
clients := make(map[*Client]struct{})
for {
File diff suppressed because it is too large. Load diff
+5 -5
View File
@@ -33,10 +33,10 @@ import (
mqtt "github.com/eclipse/paho.mqtt.golang"
"github.com/google/uuid"
"github.com/MeshCore-Tower/tower-server/internal/api"
"github.com/MeshCore-Tower/tower-server/internal/hub"
"github.com/MeshCore-Tower/tower-server/internal/keystore"
"github.com/MeshCore-Tower/tower-server/internal/scopestore"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/MeshCore-Beacon/beacon-server/internal/hub"
"github.com/MeshCore-Beacon/beacon-server/internal/keystore"
"github.com/MeshCore-Beacon/beacon-server/internal/scopestore"
)
// Config holds the connection parameters for one broker.
@@ -176,7 +176,7 @@ func New(cfg Config, db DB, h *hub.Hub, keys ChannelKeyStore, scopes ScopeStore)
func (w *Worker) Start(ctx context.Context) {
opts := mqtt.NewClientOptions().
AddBroker(w.cfg.URL).
SetClientID(fmt.Sprintf("tower-%s", w.cfg.BrokerName)).
SetClientID(fmt.Sprintf("beacon-%s", w.cfg.BrokerName)).
SetUsername(w.cfg.Username).
SetPassword(w.cfg.Password).
SetAutoReconnect(true).
+2 -2
View File
@@ -12,8 +12,8 @@ import (
"strings"
"time"
"github.com/MeshCore-Tower/tower-server/internal/api"
"github.com/MeshCore-Tower/tower-server/internal/hub"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/MeshCore-Beacon/beacon-server/internal/hub"
"github.com/google/uuid"
"github.com/meshcore-go/meshcore-go"
)
+2 -2
View File
@@ -8,8 +8,8 @@ import (
"strings"
"time"
"github.com/MeshCore-Tower/tower-server/internal/hub"
"github.com/MeshCore-Tower/tower-server/internal/keystore"
"github.com/MeshCore-Beacon/beacon-server/internal/hub"
"github.com/MeshCore-Beacon/beacon-server/internal/keystore"
"github.com/meshcore-go/meshcore-go"
)
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"strings"
"time"
"github.com/MeshCore-Tower/tower-server/internal/hub"
"github.com/MeshCore-Beacon/beacon-server/internal/hub"
)
// UpdateObserverStatusParams carries the fields parsed from a /status message.
+2 -2
View File
@@ -30,8 +30,8 @@ import (
"github.com/coder/websocket"
"github.com/google/uuid"
"github.com/MeshCore-Tower/tower-server/internal/api"
"github.com/MeshCore-Tower/tower-server/internal/hub"
"github.com/MeshCore-Beacon/beacon-server/internal/api"
"github.com/MeshCore-Beacon/beacon-server/internal/hub"
)
const (