AshOban.Igniter (ash_oban v0.4.12)

View Source

Codemods and utilities for resources that use AshOban.

Summary

Functions

Adds the given code block to the resource's triggers block if there is no existing trigger with the given name

Adds the given code block to the resource's triggers block

Returns true if the given resource defines a trigger with the provided name

Functions

add_new_trigger(igniter, resource, name, trigger)

Adds the given code block to the resource's triggers block if there is no existing trigger with the given name

add_trigger(igniter, resource, trigger)

Adds the given code block to the resource's triggers block

defines_trigger(igniter, resource, name)

@spec defines_trigger(Igniter.t(), Ash.Resource.t(), atom()) ::
  {Igniter.t(), true | false}

Returns true if the given resource defines a trigger with the provided name