sig
type json = Server.Data.json
type kind = [ `EXEC | `GET | `SET ]
module type Input =
sig
type t
val jtype : Server.Package.jtype
val of_json : Server.Request.json -> Server.Request.Input.t
end
module type Output =
sig
type t
val jtype : Server.Package.jtype
val to_json : Server.Request.Output.t -> Server.Request.json
end
type 'a input = (module Server.Request.Input with type t = 'a)
type 'b output = (module Server.Request.Output with type t = 'b)
type signal
val signal :
package:Server.Package.package ->
name:string -> descr:Markdown.text -> Server.Request.signal
val emit : Server.Request.signal -> unit
val on_signal : Server.Request.signal -> (bool -> unit) -> unit
val register :
package:Server.Package.package ->
kind:Server.Request.kind ->
name:string ->
descr:Markdown.text ->
input:'a Server.Request.input ->
output:'b Server.Request.output -> ('a -> 'b) -> unit
type ('a, 'b) signature
val signature :
?input:'a Server.Request.input ->
?output:'b Server.Request.output ->
unit -> ('a, 'b) Server.Request.signature
type rq
type 'a param = Server.Request.rq -> 'a
type 'b result = Server.Request.rq -> 'b -> unit
val register_sig :
package:Server.Package.package ->
kind:Server.Request.kind ->
name:string ->
descr:Markdown.text ->
('a, 'b) Server.Request.signature ->
(Server.Request.rq -> 'a -> 'b) -> unit
val param :
(unit, 'b) Server.Request.signature ->
name:string ->
descr:Markdown.text ->
?default:'a -> 'a Server.Request.input -> 'a Server.Request.param
val param_opt :
(unit, 'b) Server.Request.signature ->
name:string ->
descr:Markdown.text ->
'a Server.Request.input -> 'a option Server.Request.param
val result :
('a, unit) Server.Request.signature ->
name:string ->
descr:Markdown.text ->
?default:'b -> 'b Server.Request.output -> 'b Server.Request.result
val result_opt :
('a, unit) Server.Request.signature ->
name:string ->
descr:Markdown.text ->
'b Server.Request.output -> 'b option Server.Request.result
val dictionary :
package:Server.Package.package ->
name:string ->
descr:Markdown.text ->
'a Server.Data.Enum.dictionary -> (module Server.Data.S with type t = 'a)
end