View Source Ash.Extension behaviour (ash v3.4.46)

A behavior of additional callbacks that extensions can implement, specific to Ash.

It is not necessary to adopt this behavior, but it is recommended to do so if you want to define these functions on your extension. These functions are invoked when their relevant Mix task is run.

Summary

Types

argv()

@type argv() :: [String.t()]

igniter()

@type igniter() :: Igniter.t()

Callbacks

codegen(argv)

(optional)
@callback codegen(argv()) :: term()

install(igniter, module, type, location, argv)

(optional)
@callback install(
  igniter(),
  module :: module(),
  type :: Ash.Resource.t() | Ash.Domain.t(),
  location :: String.t(),
  argv()
) :: igniter()

migrate(argv)

(optional)
@callback migrate(argv()) :: term()

reset(argv)

(optional)
@callback reset(argv()) :: term()

rollback(argv)

(optional)
@callback rollback(argv()) :: term()

setup argv

(optional)
@callback setup(argv()) :: term()

tear_down(argv)

(optional)
@callback tear_down(argv()) :: term()