AshOps.Task.Common (ash_ops v0.2.3)

Common behaviour for all tasks.

Summary

Functions

Format an error for display and exit with a non-zero status.

Return the filter field for the configured identity, or the primary key

Given a tuple containing a resource and a filter statement, use it to load the actor.

Serialise the record for display

Serialise a list of records for display

Functions

handle_error(arg)

@spec handle_error({:error, any()}) :: no_return()

Format an error for display and exit with a non-zero status.

identity_or_pk_field(task, cfg)

Return the filter field for the configured identity, or the primary key

load_actor(arg1, tenant)

@spec load_actor(nil | {Ash.Resource.t(), String.t()}, String.t()) ::
  {:ok, nil | Ash.Resource.record()} | {:error, any()}

Given a tuple containing a resource and a filter statement, use it to load the actor.

serialise_record(record, task, cfg)

Serialise the record for display

serialise_records(records, task, cfg)

Serialise a list of records for display