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