diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-11-28 11:18:14 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-11-28 11:18:42 +0100 |
| commit | e9f8db8ee8fccf60e58deb1d72766f94a053bb16 (patch) | |
| tree | ffa5a9be67717ecc8ff7bdc03d5f96028facb0e3 /client/server.go | |
| parent | b4ff890ec2b459148d893499a34a6d2954530369 (diff) | |
Document: Add comments for most functions and packages
Errors and test files still need to be done. Also some getters are
changed by removing the 'get' prefix
Diffstat (limited to 'client/server.go')
| -rw-r--r-- | client/server.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/server.go b/client/server.go index 12e5932..5b1a32b 100644 --- a/client/server.go +++ b/client/server.go @@ -121,7 +121,7 @@ func (client *Client) SetSecureLocation(countryCode string) error { return client.handleError(errorMessage, LetsConnectNotSupportedError{}) } - server, serverErr := client.Discovery.GetServerByCountryCode(countryCode, "secure_internet") + server, serverErr := client.Discovery.ServerByCountryCode(countryCode, "secure_internet") if serverErr != nil { client.goBackInternal() return client.handleError(errorMessage, serverErr) @@ -221,7 +221,7 @@ func (client *Client) AddInstituteServer(url string) (server.Server, error) { // FIXME: Do nothing with discovery here as the client already has it // So pass a server as the parameter - instituteServer, discoErr := client.Discovery.GetServerByURL(url, "institute_access") + instituteServer, discoErr := client.Discovery.ServerByURL(url, "institute_access") if discoErr != nil { client.goBackInternal() return nil, client.handleError(errorMessage, discoErr) @@ -273,7 +273,7 @@ func (client *Client) AddSecureInternetHomeServer(orgID string) (server.Server, client.FSM.GoTransition(StateLoadingServer) // Get the secure internet URL from discovery - secureOrg, secureServer, discoErr := client.Discovery.GetSecureHomeArgs(orgID) + secureOrg, secureServer, discoErr := client.Discovery.SecureHomeArgs(orgID) if discoErr != nil { client.goBackInternal() return nil, client.handleError(errorMessage, discoErr) @@ -480,7 +480,7 @@ func (client *Client) GetConfigCustomServer(url string, preferTCP bool) (string, // askSecureLocation asks the user to choose a Secure Internet location by moving the FSM to the STATE_ASK_LOCATION state. func (client *Client) askSecureLocation() error { errorMessage := "failed settings secure location" - locations := client.Discovery.GetSecureLocationList() + locations := client.Discovery.SecureLocationList() // Ask for the location in the callback goTransitionErr := client.FSM.GoTransitionRequired(StateAskLocation, locations) |
