summaryrefslogtreecommitdiff
path: root/bin/taler_urls.py
blob: c4f587b5af6f4a5f8e5ef91f40263f1219eec2de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
taler_urls = dict(
    online = dict(
        donations = "https://donations.{}.taler.net/",
        blog = "https://blog.{}.taler.net/",
        bank = "https://bank.{}.taler.net/",
        backoffice = "https://backoffice.{}.taler.net/",
        exchange = "https://exchange.{}.taler.net/",
        merchant_backend = "http://backend.{}.taler.net/",
        landing = "https://{}.taler.net/",
        survey = "http://survey.{}.taler.net/",
        auditor = "http://auditor.{}.taler.net/",
        sync = "http://sync.{}.taler.net/"
    )

    offline = dict(
        donations = "http://localhost:5880/",
        blog = "http://localhost:5881/",
        bank = "http://localhost:5882/",
        backoffice = "http://localhost:5883/",
        exchange = "http://localhost:5884/",
        merchant_backend = "http://localhost:5885/",
        landing = "http://localhost:5886/",
        survey = "http://localhost:5887/",
        auditor = "http://localhost:5888/",
        sync = "http://localhost:5889/"
    )
)

def get_urls(envname):
    if envname == "local":
        return taler_urls["offline"]
    return dict((k, v.format(envname))
        for k, v in taler_urls["online"].items()
    )