Module Conex_resource
Persistent 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, an epoch, 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 (Releases
and Release
).
Names and identifiers
val pp_name : name Conex_utils.fmt
pp_name name
is a pretty printer forname
.
val name_equal : name -> name -> bool
name_equal a b
is the result of a case insensitive comparison ofa
andb
.
val pp_id : identifier Conex_utils.fmt
pp_id id
is a pretty printer foridentifier
.
val id_equal : identifier -> identifier -> bool
id_equal a b
is the result of a case insensitive comparison ofa
andb
.
type timestamp
= string
The type for a timestamp, always a RFC3339 string in UTC (no timezone information).
val pp_timestamp : timestamp Conex_utils.fmt
Wire format
module Wire : sig ... end
The 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.
Resource types
val typ_to_string : typ -> string
resource_to_string res
is the string representation ofres
.
val string_to_typ : string -> typ option
string_to_resource str
is eitherSome resource
orNone
.
val pp_typ : typ Conex_utils.fmt
pp_resource pp
is a pretty printer forresource
.
val pp_err : err Conex_utils.fmt
module Header : sig ... end
Common header on disk
Digests
module Digest : sig ... end
module Digest_map : sig ... end
Asymmetric key types
module Key : sig ... end
Cryptographic signatures
module Signature : sig ... end
val to_be_signed : Wire.t -> timestamp -> identifier -> Signature.alg -> Wire.t
to_be_signed data timestamp id algorithm
prepares the representation used by signing and verification
module Expression : sig ... end
Root
module Root : sig ... end
module Delegation : sig ... end
module Target : sig ... end
module Targets : sig ... end