123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119(*
* Copyright (c) 2021 Craig Ferguson <craig@tarides.com>
* Copyright (c) 2018-2022 Tarides <contact@tarides.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*)open!ImportopenStore_propertiesopenstructmoduletypeNode_portable=Node.Portable.SmoduletypeCommit_portable=Commit.Portable.Send(** [S] is what a backend must define in order to be made an irmin store. *)moduletypeS=sigmoduleSchema:Schema.S(** A store schema, meant to be provided by the user. *)moduleHash:Hash.Swithtypet=Schema.Hash.t(** Hashing implementation. *)(** A contents store. *)moduleContents:Contents.Storewithtypehash=Hash.tandtypevalue=Schema.Contents.t(** A node store. *)moduleNode:Node.Storewithtypehash=Hash.tandtypeVal.contents_key=Contents.keyandmodulePath=Schema.PathandmoduleMetadata=Schema.Metadata(** A node abstraction that is portable from different repos. Similar to
[Node.Val]. *)moduleNode_portable:Node_portablewithtypenode:=Node.valueandtypehash:=Hash.tandtypemetadata:=Schema.Metadata.tandtypestep:=Schema.Path.step(** A commit store. *)moduleCommit:Commit.Storewithtypehash=Hash.tandtypeVal.node_key=Node.keyandmoduleInfo=Schema.Info(** A commit abstraction that is portable from different repos. Similar to
[Commit.Val]. *)moduleCommit_portable:Commit_portablewithtypecommit:=Commit.valueandtypehash:=Hash.tandmoduleInfo=Schema.Info(** A branch store. *)moduleBranch:Branch.Storewithtypekey=Schema.Branch.tandtypevalue=Commit.key(** A slice abstraction. *)moduleSlice:Slice.Swithtypecontents=Contents.hash*Contents.valueandtypenode=Node.hash*Node.valueandtypecommit=Commit.hash*Commit.value(** A repo abstraction. *)moduleRepo:sigtypet(** Repo opening and closing functions *)includeOf_configwithtype_t:=t(** @inline *)includeCloseablewithtype_t:=t(** @inline *)(** Getters from repo to backend store in ro mode *)valcontents_t:t->readContents.tvalnode_t:t->readNode.tvalcommit_t:t->readCommit.tvalconfig:t->Conf.tvalbatch:t->(read_writeContents.t->read_writeNode.t->read_writeCommit.t->'aLwt.t)->'aLwt.t(** A getter from repo to backend stores in rw mode. *)valbranch_t:t->Branch.t(** A branch store getter from repo *)end(** URI-based low-level remote synchronisation. *)moduleRemote:sigincludeRemote.Swithtypecommit=Commit.keyandtypebranch=Branch.keyvalv:Repo.t->tLwt.tendend