summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/config/config.go5
-rw-r--r--internal/discovery/discovery.go6
2 files changed, 11 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 04132ee..5ac01c4 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -33,6 +33,11 @@ func (c *Config) Discovery() *discovery.Discovery {
return &c.V2.Discovery
}
+// HasSecureInternet returns whether or not the configuration has a secure internet server
+func (c *Config) HasSecureInternet() bool {
+ return c.V2.HasSecureInternet()
+}
+
// Save saves the state file to disk
func (c *Config) Save() error {
if err := util.EnsureDirectory(c.directory); err != nil {
diff --git a/internal/discovery/discovery.go b/internal/discovery/discovery.go
index fe72e7c..ad083b3 100644
--- a/internal/discovery/discovery.go
+++ b/internal/discovery/discovery.go
@@ -147,6 +147,12 @@ func (discovery *Discovery) MarkOrganizationsExpired() {
discovery.OrganizationList.Timestamp = time.Time{}
}
+// MarkServersExpired marks the servers as expired
+func (discovery *Discovery) MarkServersExpired() {
+ // Re-initialize the timestamp to zero
+ discovery.ServerList.Timestamp = time.Time{}
+}
+
// DetermineOrganizationsUpdate returns a boolean indicating whether or not the discovery organizations should be updated
// https://github.com/eduvpn/documentation/blob/v3/SERVER_DISCOVERY.md
// - [IMPLEMENTED] on "first launch" when offering the search for "Institute Access" and "Organizations";