From 9ce4e4458794290755c68a180125acc68ab84038 Mon Sep 17 00:00:00 2001 From: Jeroen Wijenbergh Date: Wed, 8 May 2024 11:49:19 +0200 Subject: Server: Add a way to pass OAuth start time --- docs/src/api/functiondocs.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/src/api/functiondocs.md b/docs/src/api/functiondocs.md index 42013ce..58134f7 100644 --- a/docs/src/api/functiondocs.md +++ b/docs/src/api/functiondocs.md @@ -56,7 +56,7 @@ the whole UI around it. The SetState and InState functions are useful for this ## AddServer Signature: ```go -func AddServer(c C.uintptr_t, _type C.int, id *C.char, ni C.int) *C.char +func AddServer(c C.uintptr_t, _type C.int, id *C.char, ot *C.longlong) *C.char ``` AddServer adds a server to the eduvpn-common server list `c` is the cookie that is used for cancellation. Create a cookie first with CookieNew. @@ -76,8 +76,11 @@ in types/server/server.go Type `ni` stands for non-interactive. If non-zero, any state transitions will not be run. -This `ni` flag is useful for preprovisioned servers. For normal usage, -you want to set this to zero (meaning: False) +This `ot` flag is useful for preprovisioned servers; set this to non-null to +non-interactively add a server. This flag represents the Unix time OAuth was +last triggered, if the server needs to be added non-interactively but there +is no token structure, set this to zero (integer) or the current Unix time. +This value will be overwritten once OAuth is triggered. If the server cannot be added it returns the error as types/error/error.go Error. Note that the server is removed when an error has occured -- cgit v1.2.3