package conex

  1. Overview
  2. Docs

A release contains a map of all files in the repository relevant for this release and their digests.

type c = {
  1. filename : name;
  2. digest : Digest.t;
}

The record for a checksum: filename and digest.

val pp_c : c Conex_utils.fmt

pp_c is a pretty printer.

val checksum_equal : c -> c -> bool

c_equal c c' is true if the filenames are equal, and the digests are equal.

type checksum_map

Type of a checksum map.

type t = private {
  1. created : Conex_utils.Uint.t;
  2. counter : Conex_utils.Uint.t;
  3. wraps : Conex_utils.Uint.t;
  4. name : name;
  5. files : checksum_map;
}

The record of a release: a header, and a checksum map.

pp is a pretty printer.

val t : ?counter:Conex_utils.Uint.t -> ?wraps:Conex_utils.Uint.t -> Conex_utils.Uint.t -> string -> c list -> t

t ~counter ~wraps created name checksums is a constructor.

val of_wire : Wire.t -> (t, string) result

of_wire w converts w to a release or error.

val wire : t -> Wire.t

wire t is the wire representation of t.

val equal : t -> t -> bool

equal t t' is true if the name is equal and the checksum maps are equal.

val set_counter : t -> Conex_utils.Uint.t -> t

set_counter t ctr sets t.counter to ctr.

val compare_t : t -> t -> (unit, [> `InvalidName of name * name | `ChecksumsDiff of name * name list * name list * (c * c) list ]) result

compare_t t t' compares t and t', either they are equal, their names are different, or their checksum maps differ.

val fold : (c -> 'b -> 'b) -> checksum_map -> 'b -> 'b

fold f m acc folds f over m.

val find : checksum_map -> string -> c

find m k looks k up in m.

val prep : t -> t * bool

prep t increments t.counter, returns carry as second component.