Commit graph

16 commits

Author SHA1 Message Date
Martin Hebnes Pedersen
f81e10cc44 Embed rmslist.json to use as fallback if offline 2025-08-12 10:24:34 +02:00
Martin Hebnes Pedersen
5aa5e7a4e3 Env vars for mocking Winlink API response 2025-06-26 07:01:03 +02:00
Martin Hebnes Pedersen
85fca6ccf2 Add init command with API-based account creation
Ref #491
2025-06-25 21:00:29 +02:00
Martin Hebnes Pedersen
1fcbb855de Implement additional CMS API endpoints
* /account/password/validate
* /account/add
2025-06-25 09:00:23 +02:00
Martin Hebnes Pedersen
24943c97db Refactor package cmsapi 2024-03-29 12:30:12 +01:00
Chris Keller
c6f3bfb2e6 Remove WINMOR support
Resolves #331.
2022-03-21 19:51:03 +01:00
Martin Hebnes Pedersen
441fda35c4 Graceful shutdown through context cancellation
By doing graceful shutdown, we're able to properly close all of the open
resources such as modem connections and ongoing sessions.

This will allow transport drivers controlling stateful TNCs (e.g.
ptc-go) to recover the initial TNC state before termination.

Resolves #314
2022-02-20 14:48:29 +01:00
Chris Keller
e68850056e Fix some Go linter errors
* Replace(..., -1) with ReplaceAll
* Variable names hiding packages
* Error messages start with lowercase and no end punctuation
* Don't `defer` in a loop
* Etc.
2021-08-20 21:35:21 +02:00
Martin Hebnes Pedersen
45df4d520c Avoid truncating rmslist cache on refresh failure 2021-06-14 21:06:35 +02:00
Martin Hebnes Pedersen
69eaf70397 Check that account exists before posting version
This was requested by Lee in WDT due to errors on their end when a
version update is received for a callsign without a valid account.

Closes #213
2020-09-12 19:29:56 +02:00
Martin Hebnes Pedersen
19532a5efd Let user override default Service Codes via config
New config field service_codes takes an array of strings, each string
should be a valid service code that is used when updating rmslist.

I've extended the rmslist cache to support this. We now have multiple
cache files, one for each combination of service codes.

Closes #162
2019-09-26 18:45:21 +02:00
Martin Hebnes Pedersen
d9784241ee Switch to api.winlink.org (https)
Closes #110
2017-12-08 19:15:46 +01:00
Martin Hebnes Pedersen
5676710664 Move rmslist API wrapper into internal/cmsapi
The old duplication made me miss a server.winlink.org (deprecated
Winlink hostname) reference.

Issue #104
2017-12-06 20:25:13 +01:00
Martin Hebnes Pedersen
da2a11e183 Winlink CMS hostname changed to cms.winlink.org
This change was announced by the WDT after they migrated to the new
AWS 'cloud' CMS. The old hostname (server.winlink.org) is expected to
be operational for at least one year.

In addition to changing the config defaults, this commit includes a
(temporary) function that will rewrite user's config to replace the
old hostname.

Closes #104
2017-11-09 22:58:39 +01:00
Martin Hebnes Pedersen
b9742b7461 Add missing copyright notice 2016-03-08 22:40:16 +01:00
Martin Hebnes Pedersen
36d33507c0 Post version and callsign to CMS Web Services 2016-03-08 20:18:34 +01:00