diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-03-20 13:59:06 +0100 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2023-09-25 09:43:37 +0200 |
| commit | 3618f2337bf0099d1fe8e4782cda3677ea4175be (patch) | |
| tree | 638fa68f28c20178a729ef991e470d8d8aa9ee64 /internal/server/servers.go | |
| parent | 8ccb4486cdb03cd3b10606b4bd77b7bcb4107e6d (diff) | |
Types: Split discovery into its own package
Diffstat (limited to 'internal/server/servers.go')
| -rw-r--r-- | internal/server/servers.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/server/servers.go b/internal/server/servers.go index 9a9e413..60c993d 100644 --- a/internal/server/servers.go +++ b/internal/server/servers.go @@ -1,7 +1,7 @@ package server import ( - "github.com/eduvpn/eduvpn-common/types" + discotypes "github.com/eduvpn/eduvpn-common/types/discovery" "github.com/go-errors/errors" ) @@ -20,8 +20,8 @@ func (ss *Servers) HasSecureInternet() bool { } func (ss *Servers) AddSecureInternet( - secureOrg *types.DiscoveryOrganization, - secureServer *types.DiscoveryServer, + secureOrg *discotypes.Organization, + secureServer *discotypes.Server, ) (Server, error) { // If we have specified an organization ID // We also need to get an authorization template @@ -60,7 +60,7 @@ func (ss *Servers) GetCurrentServer() (Server, error) { } func (ss *Servers) addInstituteAndCustom( - discoServer *types.DiscoveryServer, + discoServer *discotypes.Server, isCustom bool, ) (Server, error) { URL := discoServer.BaseURL @@ -92,13 +92,13 @@ func (ss *Servers) addInstituteAndCustom( } func (ss *Servers) AddInstituteAccessServer( - instituteServer *types.DiscoveryServer, + instituteServer *discotypes.Server, ) (Server, error) { return ss.addInstituteAndCustom(instituteServer, false) } func (ss *Servers) AddCustomServer( - customServer *types.DiscoveryServer, + customServer *discotypes.Server, ) (Server, error) { return ss.addInstituteAndCustom(customServer, true) } @@ -108,7 +108,7 @@ func (ss *Servers) GetSecureLocation() string { } func (ss *Servers) SetSecureLocation( - chosenLocationServer *types.DiscoveryServer, + chosenLocationServer *discotypes.Server, ) error { // Make sure to add the current location |
