package conex

  1. Overview
  2. Docs

Module Conex_resource.AuthorisationSource

An 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.

Sourcetype t = private {
  1. created : Conex_utils.Uint.t;
  2. counter : Conex_utils.Uint.t;
  3. wraps : Conex_utils.Uint.t;
  4. name : name;
  5. authorised : Conex_utils.S.t;
}

The authorisation record: a header, a name, and a set of authorised ids.

pp is a pretty printer.

Sourceval t : ?counter:Conex_utils.Uint.t -> ?wraps:Conex_utils.Uint.t -> ?authorised:Conex_utils.S.t -> Conex_utils.Uint.t -> name -> t

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

Sourceval equal : t -> t -> bool

equal t t' is true if the names are equal and the set of authorised ids are equal.

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

of_wire w converts w to an authorisation or error.

Sourceval wire : t -> Wire.t

wire t is the wire representation of t, written to disk.

Sourceval add : t -> identifier -> t

add t id adds id to t.authorised.

Sourceval remove : t -> identifier -> t

remove t id removed id from t.authorised.

Sourceval prep : t -> t * bool

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