objective categorical abstract machine language personal data server
at main 23 lines 530 B view raw
1module type Readable = sig 2 type t 3 4 val get_bytes : t -> Cid.t -> bytes option Lwt.t 5 6 val has : t -> Cid.t -> bool Lwt.t 7 8 val get_blocks : t -> Cid.t list -> Block_map.with_missing Lwt.t 9end 10 11module type Writable = sig 12 type t 13 14 include Readable with type t := t 15 16 val put_block : t -> Cid.t -> bytes -> (bool, exn) Lwt_result.t 17 18 val put_many : t -> Block_map.t -> (int, exn) Lwt_result.t 19 20 val delete_block : t -> Cid.t -> (bool, exn) Lwt_result.t 21 22 val delete_many : t -> Cid.t list -> (int, exn) Lwt_result.t 23end