diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-02-12 19:18:05 +0100 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2024-02-19 14:15:07 +0100 |
| commit | 74e36f0ead717105f26087c2cab08b41ba5a7ce8 (patch) | |
| tree | 1eb2b7516bea705c9b5a50ce0965e170414ed880 /exports/exports.go | |
| parent | 682d70091af2044ff6d8b350da9dff13163232e2 (diff) | |
All: Document everything to pass revive lint
Diffstat (limited to 'exports/exports.go')
| -rw-r--r-- | exports/exports.go | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/exports/exports.go b/exports/exports.go index ea4d4bd..4e08e95 100644 --- a/exports/exports.go +++ b/exports/exports.go @@ -26,7 +26,7 @@ typedef void (*TokenSetter)(const char* server_id, int server_type, const char* static long long int get_read_rx_bytes(ReadRxBytes read) { - return read(); + return read(); } static int call_callback(StateCB callback, int oldstate, int newstate, void* data) { @@ -34,11 +34,12 @@ static int call_callback(StateCB callback, int oldstate, int newstate, void* dat } static void call_token_getter(TokenGetter getter, const char* server_id, int server_type, char* out, size_t len) { - getter(server_id, server_type, out, len); + getter(server_id, server_type, out, len); } static void call_token_setter(TokenSetter setter, const char* server_id, int server_type, const char* tokens) { - setter(server_id, server_type, tokens); + setter(server_id, server_type, tokens); +} } */ import "C" @@ -58,6 +59,7 @@ import ( srvtypes "github.com/eduvpn/eduvpn-common/types/server" ) +// VPNState is the current state of the library var VPNState *client.Client func getCError(err error) *C.char { @@ -884,10 +886,10 @@ func StartFailover(c C.uintptr_t, gateway *C.char, mtu C.int, readRxBytes C.Read // This proxies WireGuard UDP connections over TCP. // These input variables can be gotten from the configuration that is retrieved using the `proxy` JSON key // -// - `c` is the cookie -// - `listen` is the ip:port of the local udp connection, this is what is set to the WireGuard endpoint -// - `tcpsp` is the TCP source port -// - `peer` is the ip:port of the remote server +// - `c` is the cookie +// - `listen` is the ip:port of the local udp connection, this is what is set to the WireGuard endpoint +// - `tcpsp` is the TCP source port +// - `peer` is the ip:port of the remote server // // If the proxy cannot be started it returns an error // @@ -1059,8 +1061,8 @@ func SetTokenHandler(getter C.TokenGetter, setter C.TokenSetter) *C.char { // // - Send a reply to a state transition (ASK_PROFILE and ASK_LOCATION) // -// Functions that take a cookie have it as the first argument - +// # Functions that take a cookie have it as the first argument +// // Example Input: ```CookieNew()``` // // Example Output: ```5``` |
