2016-09-08 21:13:10 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* Copyright (c) 2014 - 2016. *)
|
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
|
|
|
|
|
|
|
module type Entity = sig
|
|
|
|
type t
|
|
|
|
val encoding : t Data_encoding.t
|
2016-12-03 16:05:02 +04:00
|
|
|
val of_source :
|
|
|
|
Client_commands.context ->
|
|
|
|
string -> t Lwt.t
|
|
|
|
val to_source :
|
|
|
|
Client_commands.context ->
|
|
|
|
t -> string Lwt.t
|
2016-09-08 21:13:10 +04:00
|
|
|
val name : string
|
|
|
|
end
|
|
|
|
|
|
|
|
module type Alias = sig
|
|
|
|
type t
|
2016-12-03 16:05:02 +04:00
|
|
|
val load :
|
|
|
|
Client_commands.context ->
|
|
|
|
(string * t) list Lwt.t
|
|
|
|
val find :
|
|
|
|
Client_commands.context ->
|
|
|
|
string -> t Lwt.t
|
|
|
|
val find_opt :
|
|
|
|
Client_commands.context ->
|
|
|
|
string -> t option Lwt.t
|
|
|
|
val rev_find :
|
|
|
|
Client_commands.context ->
|
|
|
|
t -> string option Lwt.t
|
|
|
|
val name :
|
|
|
|
Client_commands.context ->
|
|
|
|
t -> string Lwt.t
|
|
|
|
val mem :
|
|
|
|
Client_commands.context ->
|
|
|
|
string -> bool Lwt.t
|
|
|
|
val add :
|
|
|
|
Client_commands.context ->
|
|
|
|
string -> t -> unit Lwt.t
|
|
|
|
val del :
|
|
|
|
Client_commands.context ->
|
|
|
|
string -> unit Lwt.t
|
|
|
|
val save :
|
|
|
|
Client_commands.context ->
|
|
|
|
(string * t) list -> unit Lwt.t
|
|
|
|
val to_source :
|
|
|
|
Client_commands.context ->
|
|
|
|
t -> string Lwt.t
|
2016-09-08 21:13:10 +04:00
|
|
|
val alias_param :
|
2016-11-22 17:23:40 +04:00
|
|
|
?name:string ->
|
2016-09-08 21:13:10 +04:00
|
|
|
?desc:string ->
|
2016-12-03 16:05:02 +04:00
|
|
|
('a, Client_commands.context, 'ret) Cli_entries.params ->
|
|
|
|
(string * t -> 'a, Client_commands.context, 'ret) Cli_entries.params
|
2016-09-08 21:13:10 +04:00
|
|
|
val fresh_alias_param :
|
2016-11-22 17:23:40 +04:00
|
|
|
?name:string ->
|
2016-09-08 21:13:10 +04:00
|
|
|
?desc:string ->
|
2016-12-03 16:05:02 +04:00
|
|
|
('a, Client_commands.context, 'ret) Cli_entries.params ->
|
|
|
|
(string -> 'a, Client_commands.context, 'ret) Cli_entries.params
|
2016-09-08 21:13:10 +04:00
|
|
|
val source_param :
|
2016-11-22 17:23:40 +04:00
|
|
|
?name:string ->
|
2016-09-08 21:13:10 +04:00
|
|
|
?desc:string ->
|
2016-12-03 16:05:02 +04:00
|
|
|
('a, Client_commands.context, 'ret) Cli_entries.params ->
|
|
|
|
(t -> 'a, Client_commands.context, 'ret) Cli_entries.params
|
2016-09-08 21:13:10 +04:00
|
|
|
end
|
|
|
|
module Alias (Entity : Entity) : Alias with type t = Entity.t
|