Module Irmin_mirage_git.KV_RO

Functor to create a MirageOS' KV_RO store from a Git repository. The key "/HEAD" always shows the current HEAD.

Parameters

module G : Irmin_git.G

Signature

include Mirage_kv.RO
type nonrec error = private [>
  1. | Mirage_kv.error
]
val pp_error : error Fmt.t
type t
val disconnect : t -> unit Lwt.t
type key = Mirage_kv.Key.t
val exists : t -> key -> ([ `Dictionary | `Value ] option, error) Stdlib.result Lwt.t
val get : t -> key -> (string, error) Stdlib.result Lwt.t
val get_partial : t -> key -> offset:Optint.Int63.t -> length:int -> (string, error) Stdlib.result Lwt.t
val list : t -> key -> ((key * [ `Dictionary | `Value ]) list, error) Stdlib.result Lwt.t
val last_modified : t -> key -> (Ptime.t, error) Stdlib.result Lwt.t
val digest : t -> key -> (string, error) Stdlib.result Lwt.t
val size : t -> key -> (Optint.Int63.t, error) Stdlib.result Lwt.t
val connect : ?depth:int -> ?branch:string -> ?root:key -> ?ctx:Mimic.ctx -> ?headers:(string * string) list -> G.t -> string -> t Lwt.t

connect ?depth ?branch ?path g uri clones the given uri into g repository, using the given branch, depth and '/'-separated sub-path. By default, branch is main, depth is 1 and path is empty, ie. reads will be relative to the root of the repository.