Versioning v0.3.0 Versioning.Adapter behaviour View Source
Defines a versioning adapter.
A versioning adapter is used to parse and compare versions. This allows versions to be defined in a variety of ways - from semantic, to date based.
Link to this section Summary
Link to this section Types
Link to this type
t()
View Source
t()
View Source
t() :: module()
t() :: module()
Link to this section Callbacks
Link to this callback
compare(version, version) View Source
Callback invoked to compare versions.
Returns :gt
if the first verison is greater than the second, and :lt
for
vice-versa. If the two versions are equal, :eq
is returned.
Link to this callback
parse(version) View Source
Callback invoked to parse a binary version.
Returns {:ok, term}
on success, where term
will be the adapters representation
of a version. Returns :error
if the version cannot be parsed.