EzAPIServerinclude module type of struct include EzServer endval server :
?catch:(string -> exn -> string EzAPIServerUtils.Answer.t Lwt.t) ->
?allow_origin:EzAPIServerUtils.Cors.allow_kind ->
?footer:string ->
?addr:string ->
(int * EzAPIServerUtils.server_kind) list ->
unit Lwt.tinclude module type of struct include EzAPIServerUtils endmodule Timings = EzAPIServerUtils.Timingsmodule Directory = EzAPIServerUtils.Directorymodule Answer = EzAPIServerUtils.Answermodule Req = EzAPIServerUtils.Reqmodule GMTime = EzAPIServerUtils.GMTimemodule Ip = EzAPIServerUtils.Ipmodule Cors = EzAPIServerUtils.CorsServer
type server_kind = EzAPIServerUtils.server_kind = | API of Directory.t| Root of string * string optionUtils
val return :
?code:int ->
?headers:(string * string) list ->
'a ->
'a Answer.t Lwt.tval return_ok :
?code:int ->
?headers:(string * string) list ->
'a ->
('a, 'b) Stdlib.result Answer.t Lwt.tval return_error :
?content:'a ->
?headers:(string * string) list ->
int ->
('b, 'a option) Stdlib.result Answer.t Lwt.tRegister Handler
val empty : 'a Directory.directoryval register_res :
('a, 'b, 'c, 'd, [< EzAPI.Security.scheme ] as 'e) EzAPI.service ->
('a -> 'e list -> 'b -> ('c, 'd) Stdlib.result Answer.t Lwt.t) ->
Directory.t ->
(Directory.t, Dir_types.Step.t list * Dir_types.conflict) Stdlib.resultval register_ws_res :
('a, 'b, 'c, 'd, [< EzAPI.Security.scheme ] as 'e) EzAPI.service ->
react:('a -> 'e list -> 'b -> ('c, 'd) Stdlib.result Lwt.t) ->
bg:('a -> 'e list -> (('c, 'd) Stdlib.result -> unit) -> unit Lwt.t) ->
?onclose:('a -> unit Lwt.t) ->
?step:float ->
Directory.t ->
(Directory.t, Dir_types.Step.t list * Dir_types.conflict) Stdlib.resultexception Conflict of Dir_types.Step.t list * Dir_types.conflictval register :
('a, 'b, 'c, 'd, [< EzAPI.Security.scheme ] as 'e) EzAPI.service ->
('a -> 'e list -> 'b -> ('c, 'd) Stdlib.result Answer.t Lwt.t) ->
Directory.t ->
Directory.tval register_ws :
('a, 'b, 'c, 'd, [< EzAPI.Security.scheme ] as 'e) EzAPI.service ->
?onclose:('a -> unit Lwt.t) ->
?step:float ->
react:('a -> 'e list -> 'b -> ('c, 'd) Stdlib.result Lwt.t) ->
bg:('a -> 'e list -> (('c, 'd) Stdlib.result -> unit) -> unit Lwt.t) ->
Directory.t ->
Directory.tmodule Legacy = EzAPIServerUtils.Legacyval handle :
?meth:([< `DELETE | `GET | `HEAD | `OPTIONS | `PATCH | `POST | `PUT ] as 'a) ->
?content_type:string ->
?ws:
(?onclose:(unit -> unit Lwt.t) ->
?step:float ->
?body:string ->
react:
(string ->
(Directory.ws_frame, Directory.handler_error) Stdlib.result Lwt.t) ->
bg:
(((Directory.ws_frame, Directory.handler_error) Stdlib.result -> unit) ->
unit Lwt.t) ->
Uuidm.t ->
'b Lwt.t) ->
?allow_origin:
[< `all
| `custom of string list
| `default
| `none
| `origin default origin ] ->
file:
(?meth:'a ->
?default:string ->
string ->
string list ->
string Answer.t Lwt.t) ->
server_kind ->
Req.t ->
string list ->
string ->
[> `http of string Answer.t | `ws of 'b ] Lwt.t