From 3252d7f9d683e42aee6fbf4ace6230bc19996780 Mon Sep 17 00:00:00 2001 From: Jeroen Wijenbergh Date: Thu, 19 Feb 2026 10:58:43 +0100 Subject: Docs API: Re-gen from exports --- docs/md/apidocs.md | 49 ++++++++++++++++++++----------------------------- 1 file changed, 20 insertions(+), 29 deletions(-) diff --git a/docs/md/apidocs.md b/docs/md/apidocs.md index 2769a27..1b386a5 100644 --- a/docs/md/apidocs.md +++ b/docs/md/apidocs.md @@ -1,8 +1,6 @@ This document was automatically generated from the exports/exports.go file # About the API -package main implements the main exported API to be used by other languages - Some notes: - Errors are returned as JSON c strings. The JSON type is defined in @@ -289,7 +287,7 @@ Example Output: Signature: ```go -func DiscoOrganizations(c C.uintptr_t, search *C.char) (*C.char, *C.char) +func DiscoOrganizations(c C.uintptr_t, cache C.int, search *C.char) (*C.char, *C.char) ``` DiscoOrganizations gets the organizations from discovery, returned as @@ -297,6 +295,8 @@ DiscoOrganizations gets the organizations from discovery, returned as - `c` is the Cookie that needs to be passed. Create a new Cookie using `CookieNew` + - `cache` indicates whether or not the cache should only be used, meaning + no network call - `search` is the search string for filtering the list. If any of the words in the `search` query is not contained in @@ -357,7 +357,7 @@ Example Output: Signature: ```go -func DiscoServers(c C.uintptr_t, search *C.char) (*C.char, *C.char) +func DiscoServers(c C.uintptr_t, cache C.int, search *C.char) (*C.char, *C.char) ``` DiscoServers gets the servers from discovery, returned as @@ -365,6 +365,8 @@ DiscoServers gets the servers from discovery, returned as - `c` is the Cookie that needs to be passed. Create a new Cookie using `CookieNew` + - `cache` indicates whether or not the cache should only be used, meaning + no network call - `search` is the search string for filtering the list. If any of the words in the search query is not contained in any of @@ -412,22 +414,6 @@ Example Output: ] } , null -## DiscoveryStartup -Signature: - -```go -func DiscoveryStartup(refresh C.RefreshList) *C.char -``` - -DiscoveryStartup does a discovery request in the background. - - - The `refresh` argument is a callback that is called when the refreshing - is done. - -When this callback is thus called, the app SHOULD refresh the server list -of the already configured servers. This DiscoveryStartup function MUST be -called after calling `Register`. - ## ExpiryTimes Signature: @@ -651,6 +637,20 @@ ProxyguardPeerIPs gets the Peer IPs configured by ProxyGuard Example Input: Example Output: ```["1.1.1.1"], null``` +## ProxyguardRestart +Signature: + +```go +func ProxyguardRestart(proxyH C.uintptr_t) *C.char +``` + +ProxyguardRestart restarts ProxyGuard, call this when a network change +happens + +Example Input: ```ProxyguardRestart(proxyHandle)``` + +Example Output: ```"failed restarting ProxyGuard"``` + ## ProxyguardTunnel Signature: @@ -671,7 +671,6 @@ func Register( version *C.char, configDirectory *C.char, cb C.StateCB, - debug C.int, ) *C.char ``` @@ -692,14 +691,6 @@ state and the data for the state as JSON. - This callback returns non-zero if the state transition is handled. This is used to check if the client handles the needed transitions -`debug`, if non-zero, enables debugging mode for the library, this means: - - - Log everything in debug mode, so you can get more detail of what is - going on - - - Write the state graph to a file in the configDirectory. This can be used - to create a FSM png file with mermaid https://mermaid.js.org/ - After registering, the FSM is initialized and the state transition `MAIN` should have been completed If some error occurs during registering, it is returned as a `types/error/error.go Error` -- cgit v1.2.3