summaryrefslogtreecommitdiff
path: root/types/server/server.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2023-04-12 22:57:01 +0200
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2023-09-25 09:43:37 +0200
commit4d228ba2084eb810d0cc33308893b00d1bb3eb02 (patch)
treefa311181d73c243e295b6a502a3434f4a62e3446 /types/server/server.go
parentd9c775f710508f9dc29139cc8714122114893531 (diff)
Types Server: Implement required ask transition needed for client
Diffstat (limited to 'types/server/server.go')
-rw-r--r--types/server/server.go16
1 files changed, 15 insertions, 1 deletions
diff --git a/types/server/server.go b/types/server/server.go
index 354c27d..1578f29 100644
--- a/types/server/server.go
+++ b/types/server/server.go
@@ -1,7 +1,10 @@
// package server defines public types that have to deal with the VPN server
package server
-import "github.com/eduvpn/eduvpn-common/types/protocol"
+import (
+ "github.com/eduvpn/eduvpn-common/types/cookie"
+ "github.com/eduvpn/eduvpn-common/types/protocol"
+)
// Type gives the type of server
type Type int8
@@ -17,6 +20,17 @@ const (
TypeCustom
)
+// RequiredAskTransition represents the data that is sent when a transition is required to be handled and the go library needs data from the client
+// This data can be a profile selection or secure internet location selection
+type RequiredAskTransition struct {
+ // C is the cookie which is needed for replying to the library, see CookieReply in exports/exports.go
+ // If this cookie is omitted, it is a protocol error
+ C *cookie.Cookie `json:"cookie,omitempty"`
+ // Data is the data associated to the transition, e.g. the list of profiles (Profiles struct)
+ // or the list of secure internet locations ([]string)
+ Data interface{} `json:"data"`
+}
+
// Expiry is the struct that gives the time at which certain expiry elements should be shown
type Expiry struct {
// StartTime is the start time of the VPN in Unix