package purl

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module PurlSource

Sourcetype t = private {
  1. typ : string;
  2. namespace : string list;
  3. name : string;
  4. version : string option;
  5. qualifiers : (string * string) list;
  6. subpath : string list;
}

The type of a package URL. The namespace, version, qualifiers, and subpath are optional. The scheme is always "pkg:".

Sourceval to_string : t -> string

to_string purl provides the canonical representation of purl.

Sourceval of_string : string -> (t, string) result

of_string str decodes the string and either returns an error or a purl.

Sourceval make : string -> ?namespace:string -> string -> ?version:string -> ?qualifiers:string -> ?subpath:string -> unit -> (t, string) result

make typ ~namespace name ~version ~qualifiers ~subpath () returns either a purl or an error. An error is returned if a parameter does not conform to the purl specification, i.e. if the name is empty.

Sourceval equal : t -> t -> bool

equal a b checks whether a and b are equal.