Ash.CodeInterface (ash v3.4.68)
View SourceUsed to define the functions of a code interface for a resource.
Summary
Functions
Defines the code interface for a given resource + domain combination in the current module. For example
See params_and_opts/2
.
Functions
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
@spec params_and_opts( params_or_opts :: map() | [map()] | keyword(), keyword(), (keyword() -> keyword()) ) :: {params :: map() | [map()], opts :: keyword()}
See params_and_opts/2
.
Adds a post process function that can takes the opts and can further process, validate, or transform them.