payment: note that Stripe has instituted an additional 1% fee for non-US cards
[hcoop/portal.git] / stats.sig
1 signature STATS =
2 sig
3 type host = {ssl : bool, (* Is it HTTPS? *)
4 hostname : string, (* Internet hostname *)
5 id : string} (* Name of stats directory *)
6
7 val getWebbw : int -> {total : int,
8 vhosts: {host : host, size : int} list,
9 users : {user : string, hosts : host list, size : int} list}
10 (* Get web bandwidth usage stats. The argument tells how many months ago
11 * to look for the data. The return gives the total b/w usage, a mapping from
12 * vhosts to kilobytes, and a mapping from usernames to their vhosts and bandwidth
13 * totals. *)
14
15 val getWebbwUser : {user : string, last : int} -> {total : int,
16 vhosts : {host : host, size : int} list}
17
18 type disk = {uname : string, (* UNIX username *)
19 kbs : int} (* Number of kilobytes space used *)
20
21 val getDiskUsage : unit -> disk list
22 (* Get /home disk usage statistics, in descending blocks order. *)
23 end