ReleaseValidator¶
-
contract
ReleaseValidator
¶ Title: Database contract for a package index. Author: Piper Merriam <pipermerriam@gmail.com> -
function
validateRelease
(PackageDB packageDb, ReleaseDB releaseDb, address callerAddress, string name, string version, string manifestURI)¶
public
view
returns (bool)
¶ Runs validation on all of the data needed for releasing a package. Returns success.
Parameters: - packageDb – The address of the PackageDB
- releaseDb – The address of the ReleaseDB
- callerAddress – The address which is attempting to create the release.
- name – The name of the package.
- version – The version string of the package (ex: 1.0.0)
- manifestURI – The URI of the release manifest.
-
function
validateAuthorization
(PackageDB packageDb, address callerAddress, string name)¶
public
view
returns (bool)
¶ Validate whether the callerAddress is authorized to make this release.
Parameters: - packageDb – The address of the PackageDB
- callerAddress – The address which is attempting to create the release.
- name – The name of the package.
-
function
validateIsNewRelease
(PackageDB packageDb, ReleaseDB releaseDb, string name, string version)¶
public
view
returns (bool)
¶ Validate that the version being released has not already been released.
Parameters: - packageDb – The address of the PackageDB
- releaseDb – The address of the ReleaseDB
- name – The name of the package.
- version – The version string for the release
-
uint constant
DIGIT_0
¶
-
uint constant
DIGIT_9
¶
-
uint constant
LETTER_a
¶
-
uint constant
LETTER_z
¶
-
bytes1 constant
DASH
¶
-
function