Mavryk_rpc.Directory
module Service : sig ... end
type (!'query, !'input, !'output, !'error) types =
('query, 'input, 'output, 'error)
Resto_directory.Make(Mavryk_rpc__.RPC_encoding).types =
{
query : 'query Resto.Query.t;
input : 'input Service.input;
output : 'output Mavryk_rpc__.RPC_encoding.t;
error : 'error Mavryk_rpc__.RPC_encoding.t;
}
type registered_service =
Resto_directory.Make(Mavryk_rpc__.RPC_encoding).registered_service =
| Service : {
types : ('q, 'i, 'o, 'e) types;
handler : 'q -> 'i -> ('o, 'e) Resto_directory.Answer.t Lwt.t;
} -> registered_service
type 'prefix directory = 'prefix t
val string_of_step : step -> string
val string_of_conflict_kind : conflict -> string
val lookup :
'prefix directory ->
'prefix ->
Resto.meth ->
string list ->
(registered_service, [> lookup_error ]) Stdlib.result Lwt.t
val lookup_uri_desc :
'prefix directory ->
'prefix ->
Resto.meth ->
string list ->
(string, [> lookup_error ]) Stdlib.result Lwt.t
val allowed_methods :
'prefix directory ->
'prefix ->
string list ->
(Resto.meth list, [> lookup_error ]) Stdlib.result Lwt.t
val empty : 'prefix directory
val register_describe_directory_service :
'prefix directory ->
('prefix, 'prefix, 'error) Service.description_service ->
'prefix directory
val describe_directory :
recurse:bool ->
?arg:'a ->
'a directory ->
(Data_encoding.json_schema * Data_encoding.Binary_schema.t)
Resto.Description.directory
Lwt.t
module Curry : sig ... end
val register :
'prefix directory ->
([< Resto.meth ],
'prefix,
'p,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('p -> 'q -> 'i -> 'o Mavryk_error_monad.Error_monad.tzresult Lwt.t) ->
'prefix directory
Registering handler in service tree.
val register_chunked :
'prefix directory ->
([< Resto.meth ],
'prefix,
'p,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('p -> 'q -> 'i -> 'o Mavryk_error_monad.Error_monad.tzresult Lwt.t) ->
'prefix directory
val opt_register :
'prefix directory ->
([< Resto.meth ],
'prefix,
'p,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('p -> 'q -> 'i -> 'o option Mavryk_error_monad.Error_monad.tzresult Lwt.t) ->
'prefix directory
val gen_register :
'prefix directory ->
('meth,
'prefix,
'params,
'query,
'input,
'output,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('params -> 'query -> 'input -> [< 'output Mavryk_rpc__.RPC_answer.t ] Lwt.t) ->
'prefix directory
val lwt_register :
'prefix directory ->
([< Resto.meth ],
'prefix,
'p,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('p -> 'q -> 'i -> 'o Lwt.t) ->
'prefix directory
Registering handler in service tree. Curryfied variant.
val register0 :
unit directory ->
('m, unit, unit, 'q, 'i, 'o, Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('q -> 'i -> 'o Mavryk_error_monad.Error_monad.tzresult Lwt.t) ->
unit directory
val register0_chunked :
unit directory ->
('m, unit, unit, 'q, 'i, 'o, Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('q -> 'i -> 'o Mavryk_error_monad.Error_monad.tzresult Lwt.t) ->
unit directory
val register1 :
'prefix directory ->
('m,
'prefix,
unit * 'a,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a -> 'q -> 'i -> 'o Mavryk_error_monad.Error_monad.tzresult Lwt.t) ->
'prefix directory
val register2 :
'prefix directory ->
('m,
'prefix,
(unit * 'a) * 'b,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a -> 'b -> 'q -> 'i -> 'o Mavryk_error_monad.Error_monad.tzresult Lwt.t) ->
'prefix directory
val register3 :
'prefix directory ->
('m,
'prefix,
((unit * 'a) * 'b) * 'c,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a ->
'b ->
'c ->
'q ->
'i ->
'o Mavryk_error_monad.Error_monad.tzresult Lwt.t) ->
'prefix directory
val register4 :
'prefix directory ->
('m,
'prefix,
(((unit * 'a) * 'b) * 'c) * 'd,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a ->
'b ->
'c ->
'd ->
'q ->
'i ->
'o Mavryk_error_monad.Error_monad.tzresult Lwt.t) ->
'prefix directory
val register5 :
'prefix directory ->
('m,
'prefix,
((((unit * 'a) * 'b) * 'c) * 'd) * 'e,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a ->
'b ->
'c ->
'd ->
'e ->
'q ->
'i ->
'o Mavryk_error_monad.Error_monad.tzresult Lwt.t) ->
'prefix directory
val opt_register0 :
unit directory ->
('m, unit, unit, 'q, 'i, 'o, Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('q -> 'i -> 'o option Mavryk_error_monad.Error_monad.tzresult Lwt.t) ->
unit directory
val opt_register1 :
'prefix directory ->
('m,
'prefix,
unit * 'a,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a -> 'q -> 'i -> 'o option Mavryk_error_monad.Error_monad.tzresult Lwt.t) ->
'prefix directory
val opt_register2 :
'prefix directory ->
('m,
'prefix,
(unit * 'a) * 'b,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a ->
'b ->
'q ->
'i ->
'o option Mavryk_error_monad.Error_monad.tzresult Lwt.t) ->
'prefix directory
val opt_register3 :
'prefix directory ->
('m,
'prefix,
((unit * 'a) * 'b) * 'c,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a ->
'b ->
'c ->
'q ->
'i ->
'o option Mavryk_error_monad.Error_monad.tzresult Lwt.t) ->
'prefix directory
val opt_register4 :
'prefix directory ->
('m,
'prefix,
(((unit * 'a) * 'b) * 'c) * 'd,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a ->
'b ->
'c ->
'd ->
'q ->
'i ->
'o option Mavryk_error_monad.Error_monad.tzresult Lwt.t) ->
'prefix directory
val opt_register5 :
'prefix directory ->
('m,
'prefix,
((((unit * 'a) * 'b) * 'c) * 'd) * 'e,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a ->
'b ->
'c ->
'd ->
'e ->
'q ->
'i ->
'o option Mavryk_error_monad.Error_monad.tzresult Lwt.t) ->
'prefix directory
val gen_register0 :
unit directory ->
('m, unit, unit, 'q, 'i, 'o, Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('q -> 'i -> [< 'o Mavryk_rpc__.RPC_answer.t ] Lwt.t) ->
unit directory
val gen_register1 :
'prefix directory ->
('m,
'prefix,
unit * 'a,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a -> 'q -> 'i -> [< 'o Mavryk_rpc__.RPC_answer.t ] Lwt.t) ->
'prefix directory
val gen_register2 :
'prefix directory ->
('m,
'prefix,
(unit * 'a) * 'b,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a -> 'b -> 'q -> 'i -> [< 'o Mavryk_rpc__.RPC_answer.t ] Lwt.t) ->
'prefix directory
val gen_register3 :
'prefix directory ->
('m,
'prefix,
((unit * 'a) * 'b) * 'c,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a -> 'b -> 'c -> 'q -> 'i -> [< 'o Mavryk_rpc__.RPC_answer.t ] Lwt.t) ->
'prefix directory
val gen_register4 :
'prefix directory ->
('m,
'prefix,
(((unit * 'a) * 'b) * 'c) * 'd,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a -> 'b -> 'c -> 'd -> 'q -> 'i -> [< 'o Mavryk_rpc__.RPC_answer.t ] Lwt.t) ->
'prefix directory
val gen_register5 :
'prefix directory ->
('m,
'prefix,
((((unit * 'a) * 'b) * 'c) * 'd) * 'e,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a ->
'b ->
'c ->
'd ->
'e ->
'q ->
'i ->
[< 'o Mavryk_rpc__.RPC_answer.t ] Lwt.t) ->
'prefix directory
val lwt_register0 :
unit directory ->
('m, unit, unit, 'q, 'i, 'o, Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('q -> 'i -> 'o Lwt.t) ->
unit directory
val lwt_register1 :
'prefix directory ->
('m,
'prefix,
unit * 'a,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a -> 'q -> 'i -> 'o Lwt.t) ->
'prefix directory
val lwt_register2 :
'prefix directory ->
('m,
'prefix,
(unit * 'a) * 'b,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a -> 'b -> 'q -> 'i -> 'o Lwt.t) ->
'prefix directory
val lwt_register3 :
'prefix directory ->
('m,
'prefix,
((unit * 'a) * 'b) * 'c,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a -> 'b -> 'c -> 'q -> 'i -> 'o Lwt.t) ->
'prefix directory
val lwt_register4 :
'prefix directory ->
('m,
'prefix,
(((unit * 'a) * 'b) * 'c) * 'd,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a -> 'b -> 'c -> 'd -> 'q -> 'i -> 'o Lwt.t) ->
'prefix directory
val lwt_register5 :
'prefix directory ->
('m,
'prefix,
((((unit * 'a) * 'b) * 'c) * 'd) * 'e,
'q,
'i,
'o,
Mavryk_error_monad.Error_monad.error list)
Resto.MakeService(Mavryk_rpc__.RPC_encoding).t ->
('a -> 'b -> 'c -> 'd -> 'e -> 'q -> 'i -> 'o Lwt.t) ->
'prefix directory