module Eliom:Eliom.ml defines the functions you need to interact with the Eliommod module:sig..end
exception Eliom_Link_too_old
exception Eliom_Session_expired
exception Eliom_Wrong_parameter
exception Eliom_Typing_Error of (string * exn) list
val get_config : unit -> Simplexmlparser.xml list
Put your options between <eliom ...> and </eliom>
val sync : ('a -> 'b -> 'c -> 'd) -> 'a -> 'b -> 'c -> 'd Lwt.tlet sync f sp g p = Lwt.return (f sp g p)typesuff =[ `WithSuffix | `WithoutSuffix ]
typeservcoserv =[ `Coservice | `Service ]
typegetpost =[ `Get | `Post ]
typeattached_service_kind =[ `External | `Internal of servcoserv * getpost ]
typeget_attached_service_kind =[ `External | `Internal of servcoserv * [ `Get ] ]
typepost_attached_service_kind =[ `External | `Internal of servcoserv * [ `Post ] ]
typeinternal =[ `Internal of servcoserv * getpost ]
typeregistrable =[ `Registrable | `Unregistrable ]
type +'a a_s
type +'a na_s
typeservice_kind =[ `Attached of attached_service_kind a_s
| `Nonattached of getpost na_s ]
typeget_service_kind =[ `Attached of get_attached_service_kind a_s
| `Nonattached of [ `Get ] na_s ]
typepost_service_kind =[ `Attached of post_attached_service_kind a_s
| `Nonattached of [ `Post ] na_s ]
typeinternal_service_kind =[ `Attached of internal a_s
| `Nonattached of getpost na_s ]
typeattached =[ `Attached of attached_service_kind a_s ]
typenonattached =[ `Nonattached of getpost na_s ]
type ('a, 'b, +'c, +'d, +'e, +'f, +'g) service
'kind parameter is a subset of service_kind. 'get
and 'post are the type of GET and POST parameters.typeurl_path =string list
val string_of_url_path : url_path -> stringcoucou/ciao is represented by the list ["coucou";"ciao"]type server_params
val get_user_agent : server_params -> stringval get_full_url : server_params -> stringval get_ip : server_params -> stringval get_inet_addr : server_params -> Unix.inet_addrval get_all_get_params : server_params -> (string * string) listval get_get_params : server_params -> (string * string) listval get_all_post_params : server_params -> (string * string) listval get_post_params : server_params -> (string * string) list Lwt.tval get_current_path_string : server_params -> stringval get_current_path : server_params -> url_pathval get_hostname : server_params -> string optionval get_port : server_params -> intval get_other_get_params : server_params -> (string * string) listval get_suffix : server_params -> url_pathval get_exn : server_params -> exn listval get_config_file_charset : server_params -> string optionval get_cookies : server_params -> (string * string) listval set_user_timeout : server_params -> float option -> unitval unset_user_timeout : server_params -> unitval get_user_timeout : server_params -> float optionval set_user_persistent_timeout : server_params -> float option -> unitval unset_user_persistent_timeout : server_params -> unitval get_user_persistent_timeout : server_params -> float optionval set_user_expdate : server_params -> float option -> unitval get_user_expdate : server_params -> float optionval set_user_persistent_expdate : server_params -> float option -> unitval get_user_persistent_expdate : server_params -> float optionval set_global_timeout : ?sp:server_params -> float option -> unit~sp parameter.val get_global_timeout : ?sp:server_params -> unit -> float optionval get_default_timeout : unit -> float optionval set_global_persistent_timeout : ?sp:server_params -> float option -> unitval get_global_persistent_timeout : ?sp:server_params -> unit -> float optionval get_default_persistent_timeout : unit -> float optionval set_exn_handler : ?sp:server_params ->
(server_params -> exn -> Eliommod.result_to_send Lwt.t) -> unitval get_tmp_filename : Extensions.file_info -> stringval get_filesize : Extensions.file_info -> int64val get_original_filename : Extensions.file_info -> stringunit for a page without parameter.(int "myvalue") for a page that takes one parameter, of type int, called myvalue. (You must register a function of type int -> page).(int "myvalue" ** string "mystring") for a page that takes two parameters, one of type int called myvalue, and one of type string called mystring. (The function you will register has a parameter of type (int * string)).list "l" (int "myvalue" ** string "mystring") for a page that takes a list of pairs. (The function you will register has a parameter of type (int * string) list).type ('a, 'b) binsum =
| |
Inj1 of |
|||
| |
Inj2 of |
(* | Binary sums | *) |
type 'a param_name
type ('a, 'b, 'c) params_type
type 'a listnames = {
|
it : |
val int : string -> (int, [ `WithoutSuffix ], int param_name) params_typeint s tells that the page takes an integer as parameter, labeled sval float : string ->
(float, [ `WithoutSuffix ], float param_name) params_typefloat s tells that the page takes a floating point number as parameter, labeled sval string : string ->
(string, [ `WithoutSuffix ], string param_name) params_typestring s tells that the page takes a string as parameter, labeled sval bool : string -> (bool, [ `WithoutSuffix ], bool param_name) params_typebool s tells that the page takes a boolean as parameter, labeled s
(to use for example with boolean checkboxes)val file : string ->
(Extensions.file_info, [ `WithoutSuffix ],
Extensions.file_info param_name)
params_typefile s tells that the page takes a file as parameter, labeled sval radio_answer : string ->
(string option, [ `WithoutSuffix ], string option param_name)
params_typeradio_answer s tells that the page takes the result of a click on
a radio button as parameter.val unit : (unit, [ `WithoutSuffix ], unit param_name) params_typeval user_type : (string -> 'a) ->
('a -> string) ->
string -> ('a, [ `WithoutSuffix ], 'a param_name) params_typeuser_type s_to_t t_to_s s tells that the page take a parameter, labeled s, and that the server will have to use s_to_t and t_to_s to make the conversion from and to string.val sum : ('a, [ `WithoutSuffix ], 'b) params_type ->
('a, [ `WithoutSuffix ], 'b) params_type ->
(('a, 'a) binsum, [ `WithoutSuffix ], 'b * 'b) params_typeval prod : ('a, [ `WithoutSuffix ], 'b) params_type ->
('c, [ `Endsuffix | `WithoutSuffix ], 'd) params_type ->
('a * 'c, [ `WithoutSuffix ], 'b * 'd) params_type** aboveval opt : ('a, [ `WithoutSuffix ], 'b) params_type ->
('a option, [ `WithoutSuffix ], 'b) params_typeval list : string ->
('a, [ `WithoutSuffix ], 'b) params_type ->
('a list, [ `WithoutSuffix ], 'b listnames) params_typeval (**) : ('a, [ `WithoutSuffix ], 'b) params_type ->
('c, [< `Endsuffix | `WithoutSuffix ], 'd) params_type ->
('a * 'c, [ `WithoutSuffix ], 'b * 'd) params_typeval regexp : Netstring_pcre.regexp ->
string ->
string ->
(string, [ `WithoutSuffix ], string param_name) params_typeregexp r d s tells that the page takes a string that matches r
as parameter, labeled s, and that will be rewritten in dval suffix : ('a, [< `Endsuffix | `WithoutSuffix ], 'b) params_type ->
('a, [ `WithSuffix ], 'b) params_typeregister_new_service)val all_suffix : string ->
(string list, [ `Endsuffix ], string list param_name) params_typeval all_suffix_string : string param_name ->
(string, [ `Endsuffix ], string param_name) params_typeval all_suffix_user : (string -> 'a) ->
('a -> string) ->
string -> ('a, [ `Endsuffix ], 'a param_name) params_typeval all_suffix_regexp : Netstring_pcre.regexp ->
string ->
string -> (string, [ `Endsuffix ], string param_name) params_typeval suffix_prod : ('a, [< `Endsuffix | `WithoutSuffix ], 'b) params_type ->
('c, [ `WithoutSuffix ], 'd) params_type ->
('a * 'c, [ `WithSuffix ], 'b * 'd) params_typeregister_new_service). e.g. suffix (int "i" ** string "s")val static_dir : server_params ->
(string list, unit,
[> `Attached of [> `Internal of [> `Service ] * [> `Get ] ] a_s ],
[ `WithSuffix ], string list param_name, unit param_name,
[> `Unregistrable ])
serviceval new_service : ?sp:server_params ->
url:url_path ->
get_params:('a, [< suff ] as 'b, 'c) params_type ->
unit ->
('a, unit,
[> `Attached of [> `Internal of [> `Service ] * [> `Get ] ] a_s ], 'b,
'c, unit param_name, [> `Registrable ])
servicenew_service ~url:p ~get_params:pa () creates an service associated to the url_path p and that takes the parameters pa.
If you specify ~suffix:true, your service will match all requests from client beginning by path. You can have access to the suffix of the URL using suffix or suffix_only. For example new_service ["mysite";"mywiki"] ~suffix:true suffix_only will match all the URL of the shape http://myserver/mysite/mywiki/thesuffix
If you want to create dynamically a new service during session,
you must add the ~sp parameter (current server parameters)
val new_external_service : url:url_path ->
get_params:('a, [< suff ] as 'b, 'c) params_type ->
post_params:('d, [ `WithoutSuffix ], 'e) params_type ->
unit ->
('a, 'd, [> `Attached of [> `External ] a_s ], 'b, 'c, 'e,
[> `Unregistrable ])
serviceval new_coservice : ?max_use:int ->
?timeout:float ->
fallback:(unit, unit,
[ `Attached of [ `Internal of [ `Service ] * [ `Get ] ] a_s ],
[ `WithoutSuffix ], unit param_name, unit param_name,
[< registrable ])
service ->
get_params:('a, [ `WithoutSuffix ], 'b) params_type ->
unit ->
('a, unit,
[> `Attached of [> `Internal of [> `Coservice ] * [> `Get ] ] a_s ],
[ `WithoutSuffix ], 'b, unit param_name, [> `Registrable ])
serviceval new_coservice' : ?max_use:int ->
?timeout:float ->
get_params:('a, [ `WithoutSuffix ], 'b) params_type ->
unit ->
('a, unit, [> `Nonattached of [> `Get ] na_s ], [ `WithoutSuffix ], 'b,
unit param_name, [> `Registrable ])
serviceval new_post_service : ?sp:server_params ->
fallback:('a, unit,
[ `Attached of
[ `Internal of [ `Coservice | `Service ] * [ `Get ] ] a_s ],
[< suff ] as 'b, 'c, unit param_name,
[< `Registrable ])
service ->
post_params:('d, [ `WithoutSuffix ], 'e) params_type ->
unit ->
('a, 'd,
[> `Attached of
[> `Internal of [ `Coservice | `Service ] * [> `Post ] ] a_s ],
'b, 'c, 'e, [> `Registrable ])
servicefallback is the same service without POST parameters.
You can create an service with POST parameters if the same service does not exist
without POST parameters. Thus, the user can't bookmark a page that does not
exist.val new_post_coservice : ?max_use:int ->
?timeout:float ->
fallback:('a, unit,
[ `Attached of
[ `Internal of [< `Coservice | `Service ] * [ `Get ] ]
a_s ],
[< suff ] as 'b, 'c, unit param_name,
[< `Registrable ])
service ->
post_params:('d, [ `WithoutSuffix ], 'e) params_type ->
unit ->
('a, 'd,
[> `Attached of [> `Internal of [> `Coservice ] * [> `Post ] ] a_s ],
'b, 'c, 'e, [> `Registrable ])
serviceval new_post_coservice' : ?max_use:int ->
?timeout:float ->
post_params:('a, [ `WithoutSuffix ], 'b) params_type ->
unit ->
(unit, 'a, [> `Nonattached of [> `Post ] na_s ], [ `WithoutSuffix ],
unit param_name, 'b, [> `Registrable ])
serviceval preapply : ('a, 'b, [> `Attached of 'd a_s ] as 'c, [< suff ], 'e, 'f, 'g)
service ->
'a ->
(unit, 'b, 'c, [ `WithoutSuffix ], unit param_name, 'f,
[ `Unregistrable ])
serviceval make_string_uri : ('a, unit, [< get_service_kind ], [< suff ], 'b,
unit param_name, [< registrable ])
service -> server_params -> 'a -> stringmodule type REGCREATE =sig..end
module type FORMCREATE =sig..end
module type ELIOMFORMSIG =sig..end
module type ELIOMREGSIG1 =sig..end
module type ELIOMREGSIG =sig..end
module type ELIOMSIG =sig..end
module MakeRegister:
module MakeForms:functor (Pages:FORMCREATE) ->ELIOMFORMSIGwith type form_content_elt = Pages.form_content_elt and type form_content_elt_list = Pages.form_content_elt_list and type form_elt = Pages.form_elt and type a_content_elt = Pages.a_content_elt and type a_content_elt_list = Pages.a_content_elt_list and type a_elt = Pages.a_elt and type a_elt_list = Pages.a_elt_list and type div_content_elt = Pages.div_content_elt and type div_content_elt_list = Pages.div_content_elt_list and type uri = Pages.uri and type link_elt = Pages.link_elt and type script_elt = Pages.script_elt and type textarea_elt = Pages.textarea_elt and type select_elt = Pages.select_elt and type input_elt = Pages.input_elt and type pcdata_elt = Pages.pcdata_elt and type a_attrib_t = Pages.a_attrib_t and type form_attrib_t = Pages.form_attrib_t and type input_attrib_t = Pages.input_attrib_t and type textarea_attrib_t = Pages.textarea_attrib_t and type select_attrib_t = Pages.select_attrib_t and type link_attrib_t = Pages.link_attrib_t and type script_attrib_t = Pages.script_attrib_t and type input_type_t = Pages.input_type_t
module type XHTMLFORMSSIG =sig..end
module Xhtml:sig..end
module Blocks:sig..end
module SubXhtml:
module HtmlText:ELIOMSIGwith type page = string and type form_content_elt = string and type form_content_elt_list = string and type form_elt = string and type a_content_elt = string and type a_content_elt_list = string and type a_elt = string and type a_elt_list = string and type div_content_elt = string and type div_content_elt_list = string and type uri = string and type link_elt = string and type script_elt = string and type textarea_elt = string and type select_elt = string and type input_elt = string and type pcdata_elt = string and type a_attrib_t = string and type form_attrib_t = string and type input_attrib_t = string and type textarea_attrib_t = string and type select_attrib_t = string and type link_attrib_t = string and type script_attrib_t = string and type input_type_t = string
module CssText:ELIOMREGSIGwith type page = string
module Text:ELIOMREGSIGwith type page = string * string
module Actions:ELIOMREGSIGwith type page = exn list
module Unit:ELIOMREGSIGwith type page = unit
module Redirections:ELIOMREGSIGwith type page = string
module Files:ELIOMREGSIGwith type page = string
module Any:ELIOMREGSIGwith type page = Eliommod.result_to_send
type 'a table
val create_table : ?sp:server_params -> unit -> 'a table~sp parameterval get_session_data : 'a table -> server_params -> 'a optionval set_session_data : 'a table -> server_params -> 'a -> unitval remove_session_data : 'a table -> server_params -> unittype 'a persistent_table
val create_persistent_table : string -> 'a persistent_tableval get_persistent_data : 'a persistent_table -> server_params -> 'a option Lwt.tval set_persistent_data : 'a persistent_table -> server_params -> 'a -> unit Lwt.tval remove_persistent_data : 'a persistent_table -> server_params -> unit Lwt.tval close_persistent_session : server_params -> unit Lwt.tval close_volatile_session : server_params -> unitval close_session : server_params -> unit Lwt.t