summaryrefslogtreecommitdiff
path: root/internal/server/time.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2024-02-12 19:18:05 +0100
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2024-02-19 14:15:07 +0100
commit74e36f0ead717105f26087c2cab08b41ba5a7ce8 (patch)
tree1eb2b7516bea705c9b5a50ce0965e170414ed880 /internal/server/time.go
parent682d70091af2044ff6d8b350da9dff13163232e2 (diff)
All: Document everything to pass revive lint
Diffstat (limited to 'internal/server/time.go')
-rw-r--r--internal/server/time.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/server/time.go b/internal/server/time.go
index 4e54ef6..7369f47 100644
--- a/internal/server/time.go
+++ b/internal/server/time.go
@@ -28,6 +28,7 @@ func RenewButtonTime(st time.Time, et time.Time) int64 {
return t.Unix()
}
+// CountdownTime returns the time when the countdown timer should be shown
func CountdownTime(st time.Time, et time.Time) int64 {
d := et.Sub(st)
@@ -44,6 +45,8 @@ func CountdownTime(st time.Time, et time.Time) int64 {
return t.Unix()
}
+// NotificationTimes returns the list when the app should
+// show a notification when the VPN is (about to) expire(d)
func NotificationTimes(st time.Time, et time.Time) []int64 {
last := []time.Duration{
time.Duration(0),