package ez_api
Easy API library and tools
Install
Dune Dependency
github.com
Readme
Changelog
LGPL-2.1-only WITH OCaml-LGPL-linking-exception License
Edit opam file
Versions (6)
Authors
Maintainers
Sources
v2.0.0.tar.gz
md5=ed68e0a33325ecf6a3319cafa636d62e
sha512=425c6289d568cf697e8d9977ac43e2ebcdeec8f04f5a17225824d5a37ac700961e5d1283b92aeaebaf58ccfb5b4261bcba1180ab11c267ade0de86b68fd6ca2d
doc/ez_api.server/EzAPIServer/index.html
Module EzAPIServer
Source
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
include module type of struct include EzAPIServerUtils end
module StringMap = EzAPIServerUtils.StringMap
module Timings = EzAPIServerUtils.Timings
module Directory = EzAPIServerUtils.Directory
module Answer = EzAPIServerUtils.Answer
module Req = EzAPIServerUtils.Req
module File = EzAPIServerUtils.File
module GMTime = EzAPIServerUtils.GMTime
module Ip = EzAPIServerUtils.Ip
Server
type server_kind = EzAPIServerUtils.server_kind =
| API of Directory.t
| Root of string * string option
Utils
val return :
?code:int ->
?headers:(string * string) list ->
'a ->
'a Answer.t Lwt.t
val verbose : int ref
val debug : ?v:int -> ('a, unit, string, unit) format4 -> 'a
Register Handler
val empty : 'a Directory.directory
val 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
val 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:('a -> unit Lwt.t) ->
?step:float ->
Directory.t ->
(Directory.t, Directory.Step.t list * Directory.conflict) result
exception Conflict of Directory.Step.t list * Directory.conflict
val 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
val 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) result Lwt.t) ->
bg:('a -> 'e list -> (('c, 'd) result -> unit) -> unit Lwt.t) ->
Directory.t ->
Directory.t
module Legacy = EzAPIServerUtils.Legacy
val handle :
?meth:
[< `DELETE | `GET | `HEAD | `OPTIONS | `PATCH | `POST | `PUT GET OPTIONS ] ->
?content_type:string ->
?ws:
(?onclose:(unit -> unit Lwt.t) ->
?step:float ->
react:
(string -> (Directory.ws_frame, Directory.handler_error) result Lwt.t) ->
bg:
(((Directory.ws_frame, Directory.handler_error) result -> unit) ->
unit Lwt.t) ->
Uuidm.t ->
'a Lwt.t) ->
server_kind ->
Req.t ->
string list ->
string ->
[> `http of string EzAPIServerUtils.Answer.t | `ws of 'a ] Lwt.t
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>