Lightning.Extensions.ProjectHooking behaviour (Lightning v2.14.5-pre1)

View Source

Allows handling project creation atomically without relying on async events.

Summary

Callbacks

handle_create_project(attrs)

@callback handle_create_project(attrs :: map()) ::
  {:ok, Lightning.Projects.Project.t()} | {:error, Ecto.Changeset.t()}

handle_delete_project(t)

@callback handle_delete_project(Lightning.Projects.Project.t()) ::
  {:ok, Lightning.Projects.Project.t()} | {:error, Ecto.Changeset.t()}

handle_project_validation(t)