web_templates.mli 5.11 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
(**************************************************************************)
(*                                BELENIOS                                *)
(*                                                                        *)
(*  Copyright © 2012-2014 Inria                                           *)
(*                                                                        *)
(*  This program is free software: you can redistribute it and/or modify  *)
(*  it under the terms of the GNU Affero General Public License as        *)
(*  published by the Free Software Foundation, either version 3 of the    *)
(*  License, or (at your option) any later version, with the additional   *)
(*  exemption that compiling, linking, and/or using OpenSSL is allowed.   *)
(*                                                                        *)
(*  This program is distributed in the hope that it will be useful, but   *)
(*  WITHOUT ANY WARRANTY; without even the implied warranty of            *)
(*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *)
(*  Affero General Public License for more details.                       *)
(*                                                                        *)
(*  You should have received a copy of the GNU Affero General Public      *)
(*  License along with this program.  If not, see                         *)
(*  <http://www.gnu.org/licenses/>.                                       *)
(**************************************************************************)

Stephane Glondu's avatar
Stephane Glondu committed
22
open Web_signatures
23
24

val home : featured:(module WEB_ELECTION) list -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
25
val admin : elections:(module WEB_ELECTION) list -> (module AUTH_SERVICES) -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
26

27
28
val new_election : (module AUTH_SERVICES) -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val new_election_failure : [ `Exists | `Exception of exn ] -> (module AUTH_SERVICES) -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
29
30
31

val generic_error_page : string -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t

32
33
34
val election_setup_index : Uuidm.t list -> (module AUTH_SERVICES) -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup : Uuidm.t -> Web_common.setup_election -> (module AUTH_SERVICES) -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_questions : Uuidm.t -> Web_common.setup_election -> (module AUTH_SERVICES) -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
35
36
37
val election_setup_credentials : string -> string -> Web_common.setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val election_setup_trustee : string -> string -> Web_common.setup_election -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t

38
val election_home : (module WEB_ELECTION_) -> [ `Open | `Closed ] -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
39
40
val election_admin : (module WEB_ELECTION_) -> is_featured:bool -> [ `Open | `Closed ] -> (module AUTH_SERVICES) -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val update_credential : (module WEB_ELECTION_) -> (module AUTH_SERVICES) -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
41
val cast_raw : (module WEB_ELECTION_) -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
42
val cast_confirmation : (module WEB_ELECTION_) -> can_vote:bool -> string -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
43
val cast_confirmed : (module WEB_ELECTION_) -> result:[< `Error of Web_common.error | `Valid of string ] -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
44
val pretty_ballots : (module WEB_ELECTION_) -> string list -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
45

46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
val dummy :
  service:(unit, 'a, [< Eliom_service.post_service_kind ],
           [< Eliom_service.suff ], 'b,
           [< string Eliom_parameter.setoneradio ]
           Eliom_parameter.param_name,
           [< Eliom_service.registrable ],
           [< Eliom_service.non_ocaml_service ])
          Eliom_service.service ->
  (module AUTH_SERVICES) -> (module AUTH_LINKS) ->
  unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t

val password :
  service:(unit, 'a, [< Eliom_service.post_service_kind ],
           [< Eliom_service.suff ], 'b,
           [< string Eliom_parameter.setoneradio ]
           Eliom_parameter.param_name *
           [< string Eliom_parameter.setoneradio ]
           Eliom_parameter.param_name,
           [< Eliom_service.registrable ],
           [< Eliom_service.non_ocaml_service ])
          Eliom_service.service ->
  (module AUTH_SERVICES) -> (module AUTH_LINKS) ->
  unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t

val upload_password_db :
  service:(unit, 'a, [< Eliom_service.post_service_kind ],
           [< Eliom_service.suff ], 'b,
           [< Eliom_lib.file_info Eliom_parameter.setoneradio ]
           Eliom_parameter.param_name,
           [< Eliom_service.registrable ],
           [< Eliom_service.non_ocaml_service ])
          Eliom_service.service ->
  (module AUTH_SERVICES) -> (module AUTH_LINKS) ->
  unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t

val choose :
  (module AUTH_SERVICES) -> (module AUTH_LINKS) ->
  unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t