module Object: sig
.. end
Build objects.
The objects are built by jobs executed by
workers.
type
id = [ `Object ] Id.t
The type for object identifiers. Object identifiers are
deterministic, i.e. two similar objects will have the same
identifiers. The notion of similiraty depends on the object
type.
type
archive = {
|
files : (string * Digest.t) list ; |
|
raw : Cstruct.t ; |
}
The type for archive values.
type
file = string * Cstruct.t
The type for UTF-8 encoded files.
type
contents =
type
kind = [ `Archive | `File ]
The type for object kinds.
type
t
The type for object values.
val id : t -> id
id t
is t
's id.
val contents : t -> contents
contents t
is t
s contents.
val kind : t -> kind
kind t
is t
's kind.
val archive : (string * Digest.t) list -> Cstruct.t -> t
archive f c
is the archive containing the files f
and with raw
contents c
.
val file : string -> Cstruct.t -> t
file f c
is the file f
whose contents is c
.
val equal : t -> t -> bool
equal
is the equality function for objects.
val pp : t Fmt.t
pp
format objects.
val json : t Jsont.codec
json
is the JSON codec for objects.