packages feed

keysafe-0.20160922: Servers.hs

{- Copyright 2016 Joey Hess <id@joeyh.name>
 -
 - Licensed under the GNU AGPL version 3 or higher.
 -}

module Servers where

import Types.Server
import Servant.Client

serverUrls :: Server -> [BaseUrl]
serverUrls srv = map go (serverAddress srv)
  where
	go (ServerAddress addr port) = BaseUrl Http addr port ""

networkServers :: [Server]
networkServers =
	[ Server (ServerName "keysafe.joeyh.name")
		[ServerAddress "vzgrspuxbtnlrtup.onion" 4242]
	-- Purism server is not yet deployed, but planned.
	, Server (ServerName "keysafe.puri.sm")
		[]
	-- Unknown yet who will provide this server, but allocate it now
	-- so keysafe can start queuing uploads to it.
	, Server (ServerName "thirdserver")
		[]
	]