package conex

  1. Overview
  2. Docs

Opam repository layout

The core of conex is agnostic towards the repository layout - it needs some functions to categorise received patches into packages, authorisations, and identities.

val valid_id : Conex_resource.identifier -> bool

valid_id id returns true if id is valid: this calls String.is_ascii id.

val valid_name : Conex_resource.identifier -> bool

valid_name name returns true if name is valid: either it is '-' or '_' or String.is_ascii name.

val authorisation_of_package : Conex_resource.name -> Conex_resource.name option

authorisation_of_package n returns either Some n', where n' is the prefix of n up until the first '.' (which separates package name from version suffix), or None.

val data_path : Conex_utils.path

data_path is the path from repository root to packages, "packages".

val id_path : Conex_utils.path

id_path is the path where identities are stored, at the moment "id".

id_file id is the path to the specific id (thus "id/foo" for identifier foo.

val authorisation_path : Conex_resource.name -> Conex_utils.path

authorisation_path name is the full path where the "authorisation" file for name is stored. Currently data_dir; name; "authorisation".

package_path name is the full path where the "package" file for name is stored. Currently data_dir; name; "package".

val release_filename : Conex_resource.name

release_filename is "release".

release_dir name is data_dir; authorisation_of_package (if None, name), followed by name.

release_path name is release_dir @ release_filename.

val categorise : Conex_utils.path -> [ `Id of Conex_resource.identifier | `Authorisation of Conex_resource.identifier | `Package of Conex_resource.name | `Release of Conex_resource.name * Conex_resource.name | `Compiler of Conex_resource.name * Conex_resource.name | `Unknown ]

categorise path identifies which resource owns the given path.

OCaml

Innovation. Community. Security.