versioning v0.1.1 Versioning View Source

Documentation to come.

Link to this section Summary

Functions

Puts a key and value into the versioning assigns

Transforms a versioning using the provided changes. Changes can represent a single module or list modules that adhere to the Versioning.Change behaviour

Creates a new versioning struct using the version and data provided

Creates a new versioning struct using the version, type and data provided

Link to this section Types

Link to this type t() View Source
t() :: %Versioning{
  assigns: map(),
  changed: boolean(),
  data: data(),
  target: target(),
  type: type()
}

Link to this section Functions

Link to this function assign(versioning, key, value) View Source
assign(Versioning.t(), atom(), any()) :: Versioning.t()

Puts a key and value into the versioning assigns.

Parameters

  • versioning: A Versioning struct.
  • key: The key to be used for the assigns.
  • value: The value to be assigned to the key.
Link to this function change(versioning, change) View Source
change(Versioning.t(), atom() | [atom()]) :: Versioning.t()

Transforms a versioning using the provided changes. Changes can represent a single module or list modules that adhere to the Versioning.Change behaviour.

Parameters

  • versioning: A Versioning struct.
  • change: The changes to be applied to the versioning.

Creates a new versioning struct using the version and data provided.

If provided a struct as the data, the struct module is set as the versioning :type, and the struct is turned into a map that is used for the :data.

Parameters

  • target: The target version that our data should be transformed to.
  • data: The data to be changed.
Link to this function new(target, type, data) View Source
new(target(), type(), data()) :: Versioning.t()

Creates a new versioning struct using the version, type and data provided.

Parameters

  • target: The target version that our data should be transformed to.
  • type: The type of the data.
  • data: The data to be changed.