package eliom

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val __eliom__compilation_unit_id__8wyVC6 : string
include module type of struct include Types end
type get = Types.get =
  1. | Get_method
type put = Types.put =
  1. | Put_method
type post = Types.post =
  1. | Post_method
type delete = Types.delete =
  1. | Delete_method
type co = Types.co =
  1. | Co
type non_co = Types.non_co =
  1. | Non_co
type ext = Types.ext =
  1. | Ext
type non_ext = Types.non_ext =
  1. | Non_ext
type http = Types.http =
  1. | Http_ret
type 'a ocaml = 'a Types.ocaml =
  1. | Ocaml of 'a
type non_ocaml = Types.non_ocaml =
  1. | Non_ocaml
type reg = Types.reg =
  1. | Reg
type non_reg = Types.non_reg =
  1. | Non_reg
type ('get, 'tipo, 'gn) params = ('get, 'tipo, 'gn) Eliom_parameter.params_type constraint 'tipo = [< `WithSuffix | `WithoutSuffix ]

Method specification

type ('m, _, _, _, _, _, _) meth = ('m, _, _, _, _, _, _) Types.meth =
  1. | Get : ('gp, 'tipo, 'gn) params -> (get, 'gp, 'gn, unit, unit, 'tipo, unit) meth
  2. | Post : ('gp, 'tipo, 'gn) params * ('pp, [ `WithoutSuffix ], 'pn) params -> (post, 'gp, 'gn, 'pp, 'pn, 'tipo, 'gp) meth
  3. | Put : ('gp, 'tipo, 'gn) params -> (put, 'gp, 'gn, Eliom_parameter.raw_post_data, Eliom_parameter.no_param_name, 'tipo, unit) meth
  4. | Delete : ('gp, 'tipo, 'gn) params -> (delete, 'gp, 'gn, Eliom_parameter.raw_post_data, Eliom_parameter.no_param_name, 'tipo, unit) meth

Method specification datatype

An Eliom service (see Eliom_service_sigs.S.t) can respond to one of the following HTTP methods:

  • GET (Get g)
  • POST (Post (g, p))
  • PUT (Put g)
  • DELETE (Delete g)

In all cases, the service parameters need to be provided (see Eliom_parameter_sigs.S). POST (Post (g, p)) services accept both GET (g) and POST (p) parameters. For the other methods, only GET (g) parameters apply.

The type parameters are used to impose various type constraints, and are not necessarily of interest to the programmer. Their technical meaning is as follows.

  • 0-th param : method
  • params 1-4 : GET and POST parameter types and names
  • param 5 : suffix parameters permitted or not
  • param 6 : non-unit only for the Post (g, p) case when g is not unit ; used to force unit GET parameters when needed
type 'm which_meth = 'm Types.which_meth =
  1. | Get' : get which_meth
  2. | Post' : post which_meth
  3. | Put' : put which_meth
  4. | Delete' : delete which_meth

Like meth but without the parameters

module Url = Eliom_lib.Url
type suff = [
  1. | `WithSuffix
  2. | `WithoutSuffix
]
val params_of_meth : 'm 'gp 'gn 'pp 'pn 'x. ('m, 'gp, 'gn, 'pp, 'pn, [< `WithSuffix | `WithoutSuffix ] as 'a, 'x) meth -> ('gp, 'a, 'gn) params * ('pp, [ `WithoutSuffix ], 'pn) params
val which_meth_internal : 'm 'gp 'gn 'pp 'pn 'tipo 'x. ('m, 'gp, 'gn, 'pp, 'pn, 'tipo, 'x) meth -> 'm which_meth
val is_post : 'm 'gp 'gn 'pp 'pn 'x. ('m, 'gp, 'gn, 'pp, 'pn, [< `WithSuffix | `WithoutSuffix ], 'x) meth -> bool
val is_post' : 'm. 'm which_meth -> bool
type reload_fun =
  1. | Rf_keep
  2. | Rf_client_fun
type att = {
  1. prefix : string;
  2. subpath : Url.path;
  3. fullpath : Url.path;
  4. get_name : Eliom_common.att_key_serv;
  5. post_name : Eliom_common.att_key_serv;
  6. redirect_suffix : bool;
  7. priority : int;
}
type non_att = {
  1. na_name : Eliom_common.na_key_serv;
  2. keep_get_na_params : bool;
}
type 'a attached_info =
  1. | Attached : att -> att attached_info
  2. | Nonattached : non_att -> non_att attached_info
type send_appl_content =
  1. | XNever
  2. | XAlways
  3. | XSame_appl of string * string option
    (*

    Whether the service is capable to send application content or not. (application content has type Eliom_service.eliom_appl_answer: content of the application container, or xhr redirection ...). A link towards a service with send_appl_content = XNever will always answer a regular http frame (this will stop the application if used in a regular link or form, but not with XHR). XAlways means "for all applications" (like redirections/actions). XSame_appl means "only for this application". If there is a client side application, and the service has XAlways or XSame_appl when it is the same application, then the link (or form or change_page) will expect application content.

    *)
type service_kind = [
  1. | `Service
  2. | `AttachedCoservice
  3. | `NonattachedCoservice
  4. | `External
]
type ('get, 'post, 'meth, 'attached, 'co, 'ext, 'reg, +'tipo, 'getnames, 'postnames, 'rt) t = {
  1. pre_applied_parameters : (string * Eliommod_parameters.param) list Eliom_lib.String.Table.t * (string * Eliommod_parameters.param) list;
  2. get_params_type : ('get, 'tipo, 'getnames) Eliom_parameter.params_type;
  3. post_params_type : ('post, [ `WithoutSuffix ], 'postnames) Eliom_parameter.params_type;
  4. max_use : int option;
  5. timeout : float option;
  6. meth : 'meth which_meth;
  7. kind : service_kind;
  8. info : 'attached attached_info;
  9. https : bool;
  10. keep_nl_params : [ `All | `Persistent | `None ];
  11. mutable send_appl_content : send_appl_content;
  12. mutable client_fun : ('get -> 'post -> result Lwt.t) option ref Eliom_client_value.t option;
  13. mutable reload_fun : reload_fun;
  14. service_mark : (unit, unit, 'meth, 'attached, 'co, 'ext, 'reg, suff, unit, unit, unit) t Eliom_common.wrapper;
} constraint 'tipo = [< suff ]
and result =
  1. | No_contents
  2. | Dom of Js_of_ocaml.Dom_html.element Js_of_ocaml.Js.t
  3. | Redirect : (unit, unit, get, _, _, _, _, [ `WithoutSuffix ], unit, unit, non_ocaml) t -> result
  4. | Reload_action of {
    1. hidden : bool;
    2. https : bool;
    }
val pre_wrap : ('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ] as 'h, 'i, 'j, 'k) t -> ('a, 'b, 'c, 'd, 'l, 'm, 'n, 'h, 'i, 'j, 'o) t
type unit_service = (unit, unit, get, att, non_co, non_ext, non_reg, [ `WithoutSuffix ], unit, unit, non_ocaml) t
val service_mark : unit -> unit
val info : ('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ], 'h, 'i, 'j) t -> 'd attached_info
val pre_applied_parameters : ('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ], 'h, 'i, 'j) t -> (string * Eliommod_parameters.param) list Eliom_lib.String.Table.t * (string * Eliommod_parameters.param) list
val get_params_type : ('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ] as 'h, 'i, 'j, 'k) t -> ('a, 'h, 'i) Eliom_parameter.params_type
val post_params_type : ('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ], 'h, 'i, 'j) t -> ('b, [ `WithoutSuffix ], 'i) Eliom_parameter.params_type
val prefix : att -> string
val sub_path : att -> Url.path
val redirect_suffix : att -> bool
val full_path : att -> Url.path
val get_name : att -> Eliom_common.att_key_serv
val post_name : att -> Eliom_common.att_key_serv
val na_keep_get_na_params : non_att -> bool
val max_use : ('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ], 'h, 'i, 'j) t -> int option
val timeout : ('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ], 'h, 'i, 'j) t -> float option
val https : ('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ], 'h, 'i, 'j) t -> bool
val priority : att -> int
val _eliom_fragment_8wyVC61 : ('eliom_inferred_type_get_1 -> 'eliom_inferred_type_post_0 -> result Lwt.t) Eliom_client_value.t -> ('eliom_inferred_type_get_1 -> 'eliom_inferred_type_post_0 -> result Lwt.t) option ref
val internal_set_client_fun : service:('get, 'post, 'a, 'b, 'c, 'd, 'e, [< suff ], 'f, 'g, 'h) t -> ('get -> 'post -> result Lwt.t) Eliom_client_value.t -> unit
val is_external : ('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ], 'h, 'i, 'j) t -> bool
val default_priority : int
val meth : ('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ], 'h, 'i, 'j) t -> 'c which_meth
val change_get_num : ('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ] as 'h, 'i, 'j, 'k) t -> att -> Eliom_common.att_key_serv -> ('a, 'b, 'c, att, 'l, 'm, 'n, 'h, 'i, 'j, 'o) t
val static_dir_ : ?https:bool -> unit -> (string list, unit, get, att, 'a, 'b, 'c, [ `WithSuffix ], [ `One of string list ] Eliom_parameter.param_name, unit, 'd) t

Static directories *

val static_dir : unit -> (string list, unit, get, att, 'a, 'b, 'c, [ `WithSuffix ], [ `One of string list ] Eliom_parameter.param_name, unit, 'd) t
val https_static_dir : unit -> (string list, unit, get, att, 'a, 'b, 'c, [ `WithSuffix ], [ `One of string list ] Eliom_parameter.param_name, unit, 'd) t
val get_static_dir_ : ?https:bool -> ?keep_nl_params:[ `All | `None | `Persistent ] -> get_params:('a, [ `WithoutSuffix ], 'b) Eliom_parameter.params_type -> unit -> (string list * 'a, unit, get, att, 'c, 'd, 'e, [ `WithSuffix ], [ `One of string list ] Eliom_parameter.param_name * 'b, unit, 'f) t
val static_dir_with_params : ?keep_nl_params:[ `All | `None | `Persistent ] -> get_params:('a, [ `WithoutSuffix ], 'b) Eliom_parameter.params_type -> unit -> (string list * 'a, unit, get, att, 'c, 'd, 'e, [ `WithSuffix ], [ `One of string list ] Eliom_parameter.param_name * 'b, unit, 'f) t
val https_static_dir_with_params : ?keep_nl_params:[ `All | `None | `Persistent ] -> get_params:('a, [ `WithoutSuffix ], 'b) Eliom_parameter.params_type -> unit -> (string list * 'a, unit, get, att, 'c, 'd, 'e, [ `WithSuffix ], [ `One of string list ] Eliom_parameter.param_name * 'b, unit, 'f) t
val send_appl_content : ('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ], 'h, 'i, 'j) t -> send_appl_content
val set_send_appl_content : ('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ], 'h, 'i, 'j) t -> send_appl_content -> unit
val append_suffix : 'a list -> 'a list -> 'a list
val _eliom_fragment_8wyVC62 : (('eliom_inferred_type_a_8, 'eliom_inferred_type_a_19, 'eliom_inferred_type_c_10, att, 'eliom_inferred_type_d_11, 'eliom_inferred_type_e_12, 'eliom_inferred_type_f_13, [< suff ], 'eliom_inferred_type_g_14, 'eliom_inferred_type_h_15, 'eliom_inferred_type_i_16) t * 'eliom_inferred_type_a_8) -> (unit -> 'eliom_inferred_type_a_19 -> result Lwt.t) option ref
val preapply : service:('a, 'b, 'c, att, 'd, 'e, 'f, [< suff ], 'g, 'h, 'i) t -> 'a -> (unit, 'b, 'c, att, 'j, 'k, 'l, [ `WithoutSuffix ], unit, 'h, 'm) t
val reload_action_aux : bool -> (unit, unit, get, non_att, 'a, 'b, 'c, [ `WithoutSuffix ], unit, unit, 'd) t
val reload_action : (unit, unit, get, non_att, 'a, 'b, 'c, [ `WithoutSuffix ], unit, unit, 'd) t
val reload_action_https : (unit, unit, get, non_att, 'a, 'b, 'c, [ `WithoutSuffix ], unit, unit, 'd) t
val reload_action_hidden_aux : bool -> (unit, unit, get, non_att, 'a, 'b, 'c, [ `WithoutSuffix ], unit, unit, 'd) t
val reload_action_hidden : (unit, unit, get, non_att, 'a, 'b, 'c, [ `WithoutSuffix ], unit, unit, 'd) t
val reload_action_https_hidden : (unit, unit, get, non_att, 'a, 'b, 'c, [ `WithoutSuffix ], unit, unit, 'd) t
val _eliom_fragment_8wyVC63 : ('eliom_inferred_type_a_35, 'eliom_inferred_type_c_34, 'eliom_inferred_type_c_23, 'eliom_inferred_type_d_24, 'eliom_inferred_type_e_25, 'eliom_inferred_type_f_26, 'eliom_inferred_type_g_27, [< suff ], 'eliom_inferred_type_h_28, 'eliom_inferred_type_i_29, 'eliom_inferred_type_j_30) t -> (('eliom_inferred_type_a_35 * 'eliom_inferred_type_b_36) -> 'eliom_inferred_type_c_34 -> result Lwt.t) option ref
val add_non_localized_get_parameters : params:('a, [ `WithoutSuffix ], 'b) Eliom_parameter.non_localized_params -> service:('c, 'd, 'e, 'f, 'g, 'h, 'i, [< suff ] as 'j, 'k, 'l, 'm) t -> ('c * 'a, 'd, 'e, 'f, 'n, 'o, 'p, 'j, 'k * 'b, 'l, 'q) t
val _eliom_fragment_8wyVC64 : ('eliom_inferred_type_a_55, 'eliom_inferred_type_b_53, 'eliom_inferred_type_c_42, 'eliom_inferred_type_d_43, 'eliom_inferred_type_e_44, 'eliom_inferred_type_f_45, 'eliom_inferred_type_g_46, [< suff ], 'eliom_inferred_type_h_47, 'eliom_inferred_type_i_48, 'eliom_inferred_type_j_49) t -> ('eliom_inferred_type_a_55 -> ('eliom_inferred_type_b_53 * 'eliom_inferred_type_c_54) -> result Lwt.t) option ref
val add_non_localized_post_parameters : params:('a, [ `WithoutSuffix ], 'b) Eliom_parameter.non_localized_params -> service:('c, 'd, 'e, 'f, 'g, 'h, 'i, [< suff ] as 'j, 'k, 'l, 'm) t -> ('c, 'd * 'a, 'e, 'f, 'n, 'o, 'p, 'j, 'k, 'l * 'b, 'q) t
val keep_nl_params : ('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ], 'h, 'i, 'j) t -> [ `All | `None | `Persistent ]
val untype : ('get, 'post, 'meth, 'attached, 'co, 'ext, 'tipo, [< suff ] as 'a, 'postnames, 'register, 'b) t -> ('get, 'post, 'meth, 'attached, 'co, 'ext, 'tipo, 'a, 'postnames, 'register, 'c) t
type (_, _, _) path_option =
  1. | Path : Eliom_lib.Url.path -> (att, non_co, _) path_option
  2. | No_path : (non_att, co, unit) path_option
val eliom_appl_answer_content_type : string
val uniqueid : unit -> int
val new_state : unit -> string
val default_csrf_scope : [< Eliom_common.user_scope ] option -> Eliom_common.user_scope
exception Unreachable_exn
val attached_info : ('a, 'b, 'c, att, 'd, 'e, 'f, [< suff ], 'g, 'h, 'i) t -> att
val non_attached_info : ('a, 'b, 'c, non_att, 'd, 'e, 'f, [< suff ], 'g, 'h, 'i) t -> non_att
val no_client_fun : unit -> 'a option ref Eliom_client_value.t option
val main_service : https:bool -> prefix:string -> path:Url.path -> site_dir:string list -> kind:service_kind -> meth:'a which_meth -> ?redirect_suffix:bool -> ?keep_nl_params:[ `All | `None | `Persistent ] -> ?priority:int -> get_params:('b, [< suff ] as 'c, 'd) Eliom_parameter.params_type -> post_params:('e, [ `WithoutSuffix ], 'f) Eliom_parameter.params_type -> reload_fun:reload_fun -> unit -> ('b, 'e, 'a, att, 'g, 'h, 'i, 'c, 'd, 'f, 'j) t

Create a main service (not a coservice), internal or external

val extern : ?keep_nl_params:[ `All | `None | `Persistent ] -> prefix:string -> path:Url.path -> meth:('a, 'b, 'c, 'd, 'e, [< suff ] as 'f, 'g) meth -> unit -> ('b, 'd, 'a, att, 'h, 'i, 'j, 'f, 'c, 'e, 'k) t
val which_meth : ('a, 'b, 'c, 'd, 'e, 'f, 'g, [< suff ], 'h, 'i, 'j) t -> 'c which_meth
val which_meth_untyped : ('a, 'b, 'm, 'c, 'd, 'e, 'f, [< suff ], 'g, 'h, 'i) t -> [> `Delete | `Get | `Post | `Put ]
OCaml

Innovation. Community. Security.