Page
Library
Module
Module type
Parameter
Class
Class type
Source
Conex_resourcePersistent data: on wire and record types
Every resource in conex is a piece of data (or metadata), and has its own purpose. Resources stored on disk consists of a common header: a name, a type, a counter, a wraparound counter, and a creation timestamp. There are broadly three kinds of resources: those containing identities (Team and Author), those regulating access to packages (Authorisation), and those with the digests of the opam repository data (Package and Release).
val pp_name : name Conex_utils.fmtpp_name name is a pretty printer for name.
name_equal a b is the result of a case insensitive comparison of a and b.
val pp_id : identifier Conex_utils.fmtpp_id id is a pretty printer for identifier.
val id_equal : identifier -> identifier -> boolid_equal a b is the result of a case insensitive comparison of a and b.
module Wire : sig ... endThe wire encoding is abstract here, one suitable decoding and encoding engine is Conex_opam_encoding. The wire encoding is used for digest computations, and persistent storage on disk.
val typ_to_string : typ -> stringresource_to_string res is the string representation of res.
val string_to_typ : string -> typ optionstring_to_resource str is either Some resource or None.
val pp_typ : typ Conex_utils.fmtpp_resource pp is a pretty printer for resource.
module Header : sig ... endCommon header on disk
module Key : sig ... endmodule Signature : sig ... endmodule Digest : sig ... endmodule Author : sig ... endAn author contains a list of approved resources (name, typ, digest). It also contains a list of key and signature pairs, and a list of accounts. Keys have to be approved by a quorum of janitors, but the resource list is modified only by the author themselves.
module Team : sig ... endA team consists of a group of authors. Team members can dynamically join and leave.
module Authorisation : sig ... endAn authorisation contains the information who is authorised to modify a package. There is always a single authorisation file per package, approved by a quorum of janitors.
module Package : sig ... endA package lists all releases of a given package. There is one package resource for each package.
module Release : sig ... endA release contains a map of all files in the repository relevant for this release and their digests.