Upward.Appup.Transform behaviour (upward v0.0.7)
View SourceA 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 version() :: Upward.Appup.appup_ver()
Callbacks
@callback down(app(), version(), version(), [instruction()], options()) :: [instruction()]
@callback up(app(), version(), version(), [instruction()], options()) :: [instruction()]
Functions
@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.
@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.