From c9b7010082d780eafa4b185c280ab7138e6bc605 Mon Sep 17 00:00:00 2001 From: MrAlders0n Date: Wed, 30 Sep 2026 07:37:40 -0400 Subject: [PATCH] chore: regenerate sqlc and document saved-route evidence --- README.md | 6 +++++- db/sqlc/querier.go | 2 -- db/sqlc/queries.sql.go | 3 --- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3ecf2d5..cae5c80 100644 --- a/README.md +++ b/README.md @@ -570,4 +570,8 @@ The initial analytics archive migration includes unknown-type activity. Existing development previews that used the earlier draft require a separate operator repair; radio samples already discarded for those legacy rows cannot be recovered. -Saved-route evidence: see [the operator guide](https://github.com/MeshCore-Beacon/beacon-docs/blob/main/app_documentation/saved-route-evidence.md). +### Saved-route evidence + +`GET /api/v1/routes/{iata}/{pathKey}/observations` returns retained observations that match a saved +route's full path bytes, hash size and hop count within its IATA. `range` defaults to `24h` (max `720h`), +`limit` to 50 (max 200); page with `nextPageCursor` → `pageCursor`. Evidence expires with raw packets. diff --git a/db/sqlc/querier.go b/db/sqlc/querier.go index 1f80ab6..ef65fd7 100644 --- a/db/sqlc/querier.go +++ b/db/sqlc/querier.go @@ -89,8 +89,6 @@ type Querier interface { GetRegionIATAs(ctx context.Context, regionID int32) ([]string, error) GetRouteEvidenceRoute(ctx context.Context, arg GetRouteEvidenceRouteParams) (KnownRoute, error) GetScopeByName(ctx context.Context, name string) (GetScopeByNameRow, error) - // Copyright 2026 Beacon Contributors - // SPDX-License-Identifier: AGPL-3.0-or-later GetScopeCatalogue(ctx context.Context, arg GetScopeCatalogueParams) (MeshmapperScopeCatalogue, error) GetScopeNames(ctx context.Context) ([]string, error) // Aggregate matching observations once, separately from node memberships to avoid diff --git a/db/sqlc/queries.sql.go b/db/sqlc/queries.sql.go index e6fb1ed..3b3def7 100644 --- a/db/sqlc/queries.sql.go +++ b/db/sqlc/queries.sql.go @@ -1510,7 +1510,6 @@ func (q *Queries) GetScopeByName(ctx context.Context, name string) (GetScopeByNa } const getScopeCatalogue = `-- name: GetScopeCatalogue :one - SELECT iata, url, payload, etag, checked_at, attempted_at, next_attempt, last_error FROM meshmapper_scope_catalogues WHERE iata = $1 AND url = $2 ` @@ -1519,8 +1518,6 @@ type GetScopeCatalogueParams struct { Url string `json:"url"` } -// Copyright 2026 Beacon Contributors -// SPDX-License-Identifier: AGPL-3.0-or-later func (q *Queries) GetScopeCatalogue(ctx context.Context, arg GetScopeCatalogueParams) (MeshmapperScopeCatalogue, error) { row := q.db.QueryRow(ctx, getScopeCatalogue, arg.Iata, arg.Url) var i MeshmapperScopeCatalogue