mirror of
https://github.com/MeshCore-Beacon/beacon-server.git
synced 2026-10-20 16:52:58 +00:00
Merge upstream MeshMapper discovery into the 2.0 experiment
This commit is contained in:
+44
-29
@@ -597,16 +597,22 @@ const docTemplate = `{
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Filter by IATA code",
|
||||
"description": "Filter by IATA code: channels MeshMapper lists there, config channels scoped to a region containing it, and Beacon-wide config channels",
|
||||
"name": "iata",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Filter by IATA code(s), comma-separated e.g. YOW or YOW,YYZ",
|
||||
"description": "Filter by IATA code(s), comma-separated e.g. YOW or YOW,YYZ; same membership rule as iata",
|
||||
"name": "iatas",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "Only channels Beacon can (true) or cannot (false) decrypt; omit for all",
|
||||
"name": "keyKnown",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "last_seen epoch ms of last item for pagination; 0 starts from the beginning",
|
||||
@@ -2233,7 +2239,7 @@ const docTemplate = `{
|
||||
},
|
||||
"/scope-catalogues": {
|
||||
"get": {
|
||||
"description": "Configured sources only. Counts describe the source region, not individual nodes or links. No upstream request is made. An empty list means no configured importer; checkedAt=0 means no successful check. lastError or a past freshUntil marks stale metadata. Manual Beacon scopes and packet evidence are separate.",
|
||||
"description": "Discovered sources only. Counts describe the source region, not individual nodes or links. No upstream request is made. An empty list means no configured importer; checkedAt=0 means no successful check. lastError or a past freshUntil marks stale metadata. Manual Beacon scopes and packet evidence are separate.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -2247,7 +2253,7 @@ const docTemplate = `{
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.Catalogue"
|
||||
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.PublicScopeCatalogue"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2256,7 +2262,7 @@ const docTemplate = `{
|
||||
},
|
||||
"/scopes": {
|
||||
"get": {
|
||||
"description": "The unfiltered list includes stored imported names after an importer is disabled or a source is removed. Those historical identities are retained indefinitely; listing them does not establish observed traffic or current source membership.",
|
||||
"description": "Without filters, lists every stored scope name, including imported names retained after an importer is disabled or a source is removed. With IATA or region filters, lists only manual scopes configured for a matching region and imported scopes whose current MeshMapper catalogue includes a matching IATA; observed traffic does not add scopes.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -2288,7 +2294,16 @@ const docTemplate = `{
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_api_handlers.APIError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
@@ -2817,7 +2832,7 @@ const docTemplate = `{
|
||||
},
|
||||
"/stats/scopes": {
|
||||
"get": {
|
||||
"description": "Counts each packet, observer and node once per scope. IATA filters use retained observations for packets/observers and node IATA memberships for nodes. Without filters, returns global totals. Scopes with zero matching counts remain listed; an empty region returns an empty array.",
|
||||
"description": "Counts each packet, observer and node once per scope. IATA filters use retained observations for packets/observers and node IATA memberships for nodes. Without filters, returns global totals for every stored scope. With filters, lists only manual scopes configured for a matching region and imported scopes whose current MeshMapper catalogue includes a matching IATA; those remain listed with zero counts. An empty region returns an empty array.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -5465,7 +5480,27 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.Catalogue": {
|
||||
"github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.CatalogueScope": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"default": {
|
||||
"type": "integer"
|
||||
},
|
||||
"monitored": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"repeaters": {
|
||||
"type": "integer"
|
||||
},
|
||||
"wardriving": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.PublicScopeCatalogue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"checkedAt": {
|
||||
@@ -5500,26 +5535,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.CatalogueScope": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"default": {
|
||||
"type": "integer"
|
||||
},
|
||||
"monitored": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"repeaters": {
|
||||
"type": "integer"
|
||||
},
|
||||
"wardriving": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"internal_api_handlers.APIError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -5595,7 +5610,7 @@ const docTemplate = `{
|
||||
|
||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||
var SwaggerInfo = &swag.Spec{
|
||||
Version: "1.6.0",
|
||||
Version: "2.0.0",
|
||||
Host: "localhost:8080",
|
||||
BasePath: "/api/v1",
|
||||
Schemes: []string{"http", "https"},
|
||||
|
||||
+44
-29
@@ -15,7 +15,7 @@
|
||||
"license": {
|
||||
"name": "AGPL-3-or-later"
|
||||
},
|
||||
"version": "1.6.0"
|
||||
"version": "2.0.0"
|
||||
},
|
||||
"host": "localhost:8080",
|
||||
"basePath": "/api/v1",
|
||||
@@ -595,16 +595,22 @@
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Filter by IATA code",
|
||||
"description": "Filter by IATA code: channels MeshMapper lists there, config channels scoped to a region containing it, and Beacon-wide config channels",
|
||||
"name": "iata",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Filter by IATA code(s), comma-separated e.g. YOW or YOW,YYZ",
|
||||
"description": "Filter by IATA code(s), comma-separated e.g. YOW or YOW,YYZ; same membership rule as iata",
|
||||
"name": "iatas",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "Only channels Beacon can (true) or cannot (false) decrypt; omit for all",
|
||||
"name": "keyKnown",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "last_seen epoch ms of last item for pagination; 0 starts from the beginning",
|
||||
@@ -2231,7 +2237,7 @@
|
||||
},
|
||||
"/scope-catalogues": {
|
||||
"get": {
|
||||
"description": "Configured sources only. Counts describe the source region, not individual nodes or links. No upstream request is made. An empty list means no configured importer; checkedAt=0 means no successful check. lastError or a past freshUntil marks stale metadata. Manual Beacon scopes and packet evidence are separate.",
|
||||
"description": "Discovered sources only. Counts describe the source region, not individual nodes or links. No upstream request is made. An empty list means no configured importer; checkedAt=0 means no successful check. lastError or a past freshUntil marks stale metadata. Manual Beacon scopes and packet evidence are separate.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -2245,7 +2251,7 @@
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.Catalogue"
|
||||
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.PublicScopeCatalogue"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2254,7 +2260,7 @@
|
||||
},
|
||||
"/scopes": {
|
||||
"get": {
|
||||
"description": "The unfiltered list includes stored imported names after an importer is disabled or a source is removed. Those historical identities are retained indefinitely; listing them does not establish observed traffic or current source membership.",
|
||||
"description": "Without filters, lists every stored scope name, including imported names retained after an importer is disabled or a source is removed. With IATA or region filters, lists only manual scopes configured for a matching region and imported scopes whose current MeshMapper catalogue includes a matching IATA; observed traffic does not add scopes.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -2286,7 +2292,16 @@
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_api_handlers.APIError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
@@ -2815,7 +2830,7 @@
|
||||
},
|
||||
"/stats/scopes": {
|
||||
"get": {
|
||||
"description": "Counts each packet, observer and node once per scope. IATA filters use retained observations for packets/observers and node IATA memberships for nodes. Without filters, returns global totals. Scopes with zero matching counts remain listed; an empty region returns an empty array.",
|
||||
"description": "Counts each packet, observer and node once per scope. IATA filters use retained observations for packets/observers and node IATA memberships for nodes. Without filters, returns global totals for every stored scope. With filters, lists only manual scopes configured for a matching region and imported scopes whose current MeshMapper catalogue includes a matching IATA; those remain listed with zero counts. An empty region returns an empty array.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -5463,7 +5478,27 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.Catalogue": {
|
||||
"github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.CatalogueScope": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"default": {
|
||||
"type": "integer"
|
||||
},
|
||||
"monitored": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"repeaters": {
|
||||
"type": "integer"
|
||||
},
|
||||
"wardriving": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.PublicScopeCatalogue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"checkedAt": {
|
||||
@@ -5498,26 +5533,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.CatalogueScope": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"default": {
|
||||
"type": "integer"
|
||||
},
|
||||
"monitored": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"repeaters": {
|
||||
"type": "integer"
|
||||
},
|
||||
"wardriving": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"internal_api_handlers.APIError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
+42
-26
@@ -1492,7 +1492,20 @@ definitions:
|
||||
requires_restart:
|
||||
type: boolean
|
||||
type: object
|
||||
github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.Catalogue:
|
||||
github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.CatalogueScope:
|
||||
properties:
|
||||
default:
|
||||
type: integer
|
||||
monitored:
|
||||
type: boolean
|
||||
name:
|
||||
type: string
|
||||
repeaters:
|
||||
type: integer
|
||||
wardriving:
|
||||
type: boolean
|
||||
type: object
|
||||
github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.PublicScopeCatalogue:
|
||||
properties:
|
||||
checkedAt:
|
||||
type: integer
|
||||
@@ -1515,19 +1528,6 @@ definitions:
|
||||
url:
|
||||
type: string
|
||||
type: object
|
||||
github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.CatalogueScope:
|
||||
properties:
|
||||
default:
|
||||
type: integer
|
||||
monitored:
|
||||
type: boolean
|
||||
name:
|
||||
type: string
|
||||
repeaters:
|
||||
type: integer
|
||||
wardriving:
|
||||
type: boolean
|
||||
type: object
|
||||
internal_api_handlers.APIError:
|
||||
properties:
|
||||
code:
|
||||
@@ -1557,7 +1557,7 @@ info:
|
||||
name: AGPL-3-or-later
|
||||
termsOfService: https://github.com/MeshCore-Beacon/beacon-server
|
||||
title: MeshCore Beacon API
|
||||
version: 1.6.0
|
||||
version: 2.0.0
|
||||
paths:
|
||||
/admin/accounts:
|
||||
get:
|
||||
@@ -1939,14 +1939,21 @@ paths:
|
||||
in: query
|
||||
name: hash
|
||||
type: string
|
||||
- description: Filter by IATA code
|
||||
- description: 'Filter by IATA code: channels MeshMapper lists there, config
|
||||
channels scoped to a region containing it, and Beacon-wide config channels'
|
||||
in: query
|
||||
name: iata
|
||||
type: string
|
||||
- description: Filter by IATA code(s), comma-separated e.g. YOW or YOW,YYZ
|
||||
- description: Filter by IATA code(s), comma-separated e.g. YOW or YOW,YYZ;
|
||||
same membership rule as iata
|
||||
in: query
|
||||
name: iatas
|
||||
type: string
|
||||
- description: Only channels Beacon can (true) or cannot (false) decrypt; omit
|
||||
for all
|
||||
in: query
|
||||
name: keyKnown
|
||||
type: boolean
|
||||
- description: last_seen epoch ms of last item for pagination; 0 starts from
|
||||
the beginning
|
||||
in: query
|
||||
@@ -3064,7 +3071,7 @@ paths:
|
||||
- Routes
|
||||
/scope-catalogues:
|
||||
get:
|
||||
description: Configured sources only. Counts describe the source region, not
|
||||
description: Discovered sources only. Counts describe the source region, not
|
||||
individual nodes or links. No upstream request is made. An empty list means
|
||||
no configured importer; checkedAt=0 means no successful check. lastError or
|
||||
a past freshUntil marks stale metadata. Manual Beacon scopes and packet evidence
|
||||
@@ -3076,17 +3083,18 @@ paths:
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.Catalogue'
|
||||
$ref: '#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_meshmapper.PublicScopeCatalogue'
|
||||
type: array
|
||||
summary: Cached MeshMapper regional scope catalogues
|
||||
tags:
|
||||
- Scopes
|
||||
/scopes:
|
||||
get:
|
||||
description: The unfiltered list includes stored imported names after an importer
|
||||
is disabled or a source is removed. Those historical identities are retained
|
||||
indefinitely; listing them does not establish observed traffic or current
|
||||
source membership.
|
||||
description: Without filters, lists every stored scope name, including imported
|
||||
names retained after an importer is disabled or a source is removed. With
|
||||
IATA or region filters, lists only manual scopes configured for a matching
|
||||
region and imported scopes whose current MeshMapper catalogue includes a matching
|
||||
IATA; observed traffic does not add scopes.
|
||||
parameters:
|
||||
- description: Filter by IATA code(s), comma-separated
|
||||
in: query
|
||||
@@ -3106,7 +3114,13 @@ paths:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
type: object
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/internal_api_handlers.APIError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
@@ -3470,8 +3484,10 @@ paths:
|
||||
get:
|
||||
description: Counts each packet, observer and node once per scope. IATA filters
|
||||
use retained observations for packets/observers and node IATA memberships
|
||||
for nodes. Without filters, returns global totals. Scopes with zero matching
|
||||
counts remain listed; an empty region returns an empty array.
|
||||
for nodes. Without filters, returns global totals for every stored scope.
|
||||
With filters, lists only manual scopes configured for a matching region and
|
||||
imported scopes whose current MeshMapper catalogue includes a matching IATA;
|
||||
those remain listed with zero counts. An empty region returns an empty array.
|
||||
parameters:
|
||||
- description: Comma-separated IATA codes
|
||||
in: query
|
||||
|
||||
Reference in New Issue
Block a user