package ocplib-resto

  1. Overview
  2. Docs
module Answer : sig ... end
type step =
  1. | Static of string
  2. | Dynamic of EzResto.Arg.descr

Possible error while registring services.

type conflict =
  1. | CService
  2. | CDir
  3. | CBuilder
  4. | CCustom
  5. | CTypes of EzResto.Arg.descr * EzResto.Arg.descr
  6. | CType of EzResto.Arg.descr * string list
exception Conflict of step list * conflict
exception Cannot_parse of EzResto.Arg.descr * string * string list
module Make (Repr : Json_repr.Repr) : sig ... end
include sig ... end

Dispatch tree

val empty : directory

Empty tree

val prefix : 'a EzResto.Path.path -> directory -> directory
val merge : directory -> directory -> directory

Resolve a service.

val register : directory -> ('params, 'input, 'output) EzResto.service -> ('params -> 'input -> 'output Answer.answer Lwt.t) -> directory

Registring handler in service tree.

val register0 : directory -> (unit, 'i, 'o) EzResto.service -> ('i -> 'o Answer.answer Lwt.t) -> directory

Registring handler in service tree. Curryfied variant.

val register1 : directory -> (unit * 'a, 'i, 'o) EzResto.service -> ('a -> 'i -> 'o Answer.answer Lwt.t) -> directory
val register2 : directory -> ((unit * 'a) * 'b, 'i, 'o) EzResto.service -> ('a -> 'b -> 'i -> 'o Answer.answer Lwt.t) -> directory
val register3 : directory -> (((unit * 'a) * 'b) * 'c, 'i, 'o) EzResto.service -> ('a -> 'b -> 'c -> 'i -> 'o Answer.answer Lwt.t) -> directory
val register4 : directory -> ((((unit * 'a) * 'b) * 'c) * 'd, 'i, 'o) EzResto.service -> ('a -> 'b -> 'c -> 'd -> 'i -> 'o Answer.answer Lwt.t) -> directory
val register5 : directory -> (((((unit * 'a) * 'b) * 'c) * 'd) * 'e, 'i, 'o) EzResto.service -> ('a -> 'b -> 'c -> 'd -> 'e -> 'i -> 'o Answer.answer Lwt.t) -> directory
val register_dynamic_directory : ?descr:string -> directory -> 'params EzResto.Path.path -> ('params -> directory Lwt.t) -> directory

Registring dynamic subtree.

val register_dynamic_directory1 : ?descr:string -> directory -> (unit * 'a) EzResto.Path.path -> ('a -> directory Lwt.t) -> directory

Registring dynamic subtree. (Curryfied variant)

val register_dynamic_directory2 : ?descr:string -> directory -> ((unit * 'a) * 'b) EzResto.Path.path -> ('a -> 'b -> directory Lwt.t) -> directory
val register_dynamic_directory3 : ?descr:string -> directory -> (((unit * 'a) * 'b) * 'c) EzResto.Path.path -> ('a -> 'b -> 'c -> directory Lwt.t) -> directory
val register_custom_lookup : ?descr:string -> directory -> 'params EzResto.Path.path -> ('params -> string list -> custom_lookup Lwt.t) -> directory
val register_custom_lookup1 : ?descr:string -> directory -> (unit * 'a) EzResto.Path.path -> ('a -> string list -> custom_lookup Lwt.t) -> directory
val register_custom_lookup2 : ?descr:string -> directory -> ((unit * 'a) * 'b) EzResto.Path.path -> ('a -> 'b -> string list -> custom_lookup Lwt.t) -> directory
val register_custom_lookup3 : ?descr:string -> directory -> (((unit * 'a) * 'b) * 'c) EzResto.Path.path -> ('a -> 'b -> 'c -> string list -> custom_lookup Lwt.t) -> directory
val register_describe_directory_service : directory -> (unit, bool option, EzResto.Description.directory_descr) EzResto.service -> directory

Registring a description service.