View Source Upward.Appup.Transform behaviour (upward v0.0.1)

A transform is an appup compilation pass which receives a list of appup instructions, along with metadata about those instructions, such as the source application, the source and target versions involved, and an optional list of configuration options for the transform.

The job of a transform is to, well, apply a transformation to the instruction set, in order to accomplish some objective that one desires to be automated. A trivial example of one such transform would be a transform which ensures the purge mode is set to :soft_purge for all :update instructions. To see an example of such a transform, look in test/support/purge_transform.ex

Summary

Functions

Applies all transforms against the current downgrade instruction.

Applies all transforms against the current upgrade instruction.

Types

@type app() :: Upward.Appup.app()
@type instruction() :: Upward.Appup.instruction()
@type options() :: [term()]
@type transform() :: module() | {module(), options()}
@type version() :: Upward.Appup.appup_ver()

Callbacks

Link to this callback

down(app, version, version, list, options)

View Source
@callback down(app(), version(), version(), [instruction()], options()) :: [instruction()]
Link to this callback

up(app, version, version, list, options)

View Source
@callback up(app(), version(), version(), [instruction()], options()) :: [instruction()]

Functions

Link to this function

down(instructions, app, v1, v2, list)

View Source
@spec down([instruction()], app(), version(), version(), [transform()]) :: [
  instruction()
]

Applies all transforms against the current downgrade instruction.

Additional information required as arguments and passed to transforms are the app the instruction applies to, and the source and target versions involved.

Link to this function

up(instructions, app, v1, v2, list)

View Source
@spec up([instruction()], app(), version(), version(), [transform()]) :: [
  instruction()
]

Applies all transforms against the current upgrade instruction.

Additional information required as arguments and passed to transforms are the app the instruction applies to, and the source and target versions involved.