summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/client.go8
-rw-r--r--client/server.go4
-rw-r--r--types/protocol/protocol.go2
-rw-r--r--types/types.go20
4 files changed, 17 insertions, 17 deletions
diff --git a/client/client.go b/client/client.go
index 49c8bc1..c788cb2 100644
--- a/client/client.go
+++ b/client/client.go
@@ -299,10 +299,10 @@ func (c *Client) ExpiryTimes() (*types.Expiry, error) {
cT := b.CountdownTime()
nT := b.NotificationTimes()
return &types.Expiry{
- StartTime: b.StartTime.Unix(),
- EndTime: b.EndTime.Unix(),
- ButtonTime: bT,
- CountdownTime: cT,
+ StartTime: b.StartTime.Unix(),
+ EndTime: b.EndTime.Unix(),
+ ButtonTime: bT,
+ CountdownTime: cT,
NotificationTimes: nT,
}, nil
}
diff --git a/client/server.go b/client/server.go
index 74f441a..a0de9f3 100644
--- a/client/server.go
+++ b/client/server.go
@@ -16,7 +16,7 @@ import (
// TODO: This should not be reliant on an internal type
func getTokens(tok oauth.Token) types.Tokens {
return types.Tokens{
- Access: tok.Access,
+ Access: tok.Access,
Refresh: tok.Refresh,
Expires: tok.ExpiredTimestamp.Unix(),
}
@@ -62,7 +62,7 @@ func (c *Client) getConfigAuth(srv server.Server, preferTCP bool, t types.Tokens
VPNConfig: cfg.Config,
Protocol: protocol.New(cfg.Type),
DefaultGateway: p.DefaultGateway,
- Tokens: getTokens(cfg.Tokens),
+ Tokens: getTokens(cfg.Tokens),
}
return pCfg, nil
diff --git a/types/protocol/protocol.go b/types/protocol/protocol.go
index d165105..6e003f7 100644
--- a/types/protocol/protocol.go
+++ b/types/protocol/protocol.go
@@ -12,7 +12,7 @@ const (
)
func New(p string) Protocol {
- switch(p) {
+ switch p {
case "openvpn":
return OpenVPN
case "wireguard":
diff --git a/types/types.go b/types/types.go
index 99b997e..4161108 100644
--- a/types/types.go
+++ b/types/types.go
@@ -70,17 +70,17 @@ type DiscoveryServer struct {
}
type Expiry struct {
- StartTime int64 `json:"start_time"`
- EndTime int64 `json:"end_time"`
- ButtonTime int64 `json:"button_time"`
- CountdownTime int64 `json:"countdown_time"`
+ StartTime int64 `json:"start_time"`
+ EndTime int64 `json:"end_time"`
+ ButtonTime int64 `json:"button_time"`
+ CountdownTime int64 `json:"countdown_time"`
NotificationTimes []int64 `json:"notification_times"`
}
type Profile struct {
- Identifier string `json:"identifier"`
- DisplayName map[string]string `json:"display_name,omitempty"`
- Protocols []protocol.Protocol `json:"supported_protocols"`
+ Identifier string `json:"identifier"`
+ DisplayName map[string]string `json:"display_name,omitempty"`
+ Protocols []protocol.Protocol `json:"supported_protocols"`
}
type Profiles struct {
@@ -118,10 +118,10 @@ type ServerList struct {
}
type Configuration struct {
- VPNConfig string `json:"config"`
+ VPNConfig string `json:"config"`
Protocol protocol.Protocol `json:"protocol"`
- DefaultGateway bool `json:"default_gateway"`
- Tokens Tokens `json:"tokens"`
+ DefaultGateway bool `json:"default_gateway"`
+ Tokens Tokens `json:"tokens"`
}
type ServerType int8