Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Username string Password string BaseURL string Hostname string Client *http.Client }
API is a utility for communicating with the Mullvad API
func (*API) GetWireguardPeers ¶
func (a *API) GetWireguardPeers() (WireguardPeerList, error)
GetWireguardPeers fetches a list of wireguard peers from the API and returns it
func (*API) PostWireguardConnections ¶ added in v1.2.4
func (a *API) PostWireguardConnections(keys ConnectedKeysMap) error
PostWireguardConnections posts the number of connected wireguard keys to the API
type ConnectedKeysMap ¶ added in v1.2.4
ConnectedKeysMap contains connected keys and their respective numer of keys
type WireguardPeer ¶
type WireguardPeer struct { IPv4 string `json:"ipv4"` IPv6 string `json:"ipv6"` Ports []int `json:"ports"` Cities []string `json:"cities,omitempty"` Pubkey string `json:"pubkey"` }
WireguardPeer is a wireguard peer
type WireguardPeerList ¶
type WireguardPeerList []WireguardPeer
WireguardPeerList is a list of Wireguard peers
Click to show internal directories.
Click to hide internal directories.