View Source Ash.CodeInterface (ash v3.4.28)

Used to define the functions of a code interface for a resource.

Summary

Functions

Link to this macro

define_interface(domain, resource, definitions \\ nil)

View Source (macro)

Defines the code interface for a given resource + domain combination in the current module. For example:

defmodule MyApp.Accounting do
  require Ash.CodeInterface

  Ash.CodeInterface.define_interface(MyApp.Accounting, MyApp.Accounting.Transaction)
  Ash.CodeInterface.define_interface(MyApp.Accounting, MyApp.Accounting.Account)
  Ash.CodeInterface.define_interface(MyApp.Accounting, MyApp.Accounting.Invoice)
end
Link to this function

describe_action(resource, action, args)

View Source
Link to this function

describe_calculation(resource, calculation, args)

View Source
Link to this function

trim_double_newlines(str)

View Source
Link to this function

unwrap_calc_interface_args(keys, resource, arguments, function_head? \\ false)

View Source