Module EzAPIServerSource

include module type of struct include EzServer end
val server : ?catch:(string -> exn -> string EzAPIServerUtils.Answer.t Lwt.t) -> (int * EzAPIServerUtils.server_kind) list -> unit Lwt.t
val set_debug : unit -> unit
include module type of struct include EzAPIServerUtils end

Server

Sourcetype server_kind = EzAPIServerUtils.server_kind =
  1. | API of Directory.t
  2. | Root of string * string option
Sourcetype server = EzAPIServerUtils.server = {
  1. server_port : int;
  2. server_kind : server_kind;
}

Utils

Sourceval return : ?code:??? -> ?headers:??? -> 'a -> 'a Answer.t Lwt.t
Sourceval return_ok : ?code:??? -> ?headers:??? -> 'a -> ('a, 'b) result Answer.t Lwt.t
Sourceval return_error : ?content:??? -> ?headers:??? -> int -> ('b, 'a option) result Answer.t Lwt.t
Sourceval verbose : int ref
Sourceval set_verbose : int -> unit
Sourceval pp_time : unit -> string
Sourceval debug : ?v:??? -> ('a, unit, string, unit) format4 -> 'a
Sourceval debugf : ?v:??? -> (unit -> unit) -> unit

Register Handler

Sourceval register_res : ('a, 'b, 'c, 'd, [< EzAPI.Security.scheme ] as 'e) EzAPI.service -> ('a -> 'e list -> 'b -> ('c, 'd) result EzAPIServerUtils.Answer.t Lwt.t) -> Directory.t -> (Directory.t, Directory.Step.t list * Directory.conflict) result
Sourceval register_ws_res : ('a, 'b, 'c, 'd, [< EzAPI.Security.scheme ] as 'e) EzAPI.service -> react:('a -> 'e list -> 'b -> ('c, 'd) result Lwt.t) -> bg:('a -> 'e list -> (('c, 'd) result -> unit) -> unit Lwt.t) -> ?onclose:??? -> ?step:??? -> Directory.t -> (Directory.t, Directory.Step.t list * Directory.conflict) result
Sourceexception Conflict of Directory.Step.t list * Directory.conflict
Sourceval register : ('a, 'b, 'c, 'd, [< EzAPI.Security.scheme ] as 'e) EzAPI.service -> ('a -> 'e list -> 'b -> ('c, 'd) result EzAPIServerUtils.Answer.t Lwt.t) -> Directory.t -> Directory.t
Sourceval register_ws : ('a, 'b, 'c, 'd, [< EzAPI.Security.scheme ] as 'e) EzAPI.service -> ?onclose:??? -> ?step:??? -> react:('a -> 'e list -> 'b -> ('c, 'd) result Lwt.t) -> bg:('a -> 'e list -> (('c, 'd) result -> unit) -> unit Lwt.t) -> Directory.t -> Directory.t
Sourceval handle : ?meth:??? -> ?content_type:??? -> ?ws:??? -> server_kind -> Req.t -> string list -> string -> [> `http of string EzAPIServerUtils.Answer.t | `ws of 'a ] Lwt.t
Sourceval access_control_headers : (string * string) list