package ocplib-resto

  1. Overview
  2. Docs

Parameters

Signature

type directory

Dispatch tree

val empty : directory

Empty tree

val prefix : 'a EzResto.Path.path -> directory -> directory
val merge : directory -> directory -> directory
val lookup : directory -> string list -> (Repr.value -> Repr.value Answer.answer Lwt.t) Lwt.t

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

Registring dynamic subtree. (Curryfied variant)

Registring custom directory lookup.

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.