View Source Ash.Domain behaviour (ash v3.4.22)
A domain allows you to interact with your resources, and holds domain-wide configuration.
For example, the json domain extension adds a domain extension that lets you toggle authorization on/off for all resources in a given domain. You include resources in your domain like so:
defmodule MyApp.MyDomain do
use Ash.Domain
resources do
resource OneResource
resource SecondResource
end
end
Options
:validate_config_inclusion?
(boolean/0
) - Whether or not to validate that this domain is included in the configuration. The default value istrue
.:backwards_compatible_interface?
(boolean/0
) - Whether or not to include the 2.0 backwards compatible interface, which includes all of the interaction functions which are now defined on theAsh
module The default value istrue
.:extensions
(list of module that adoptsSpark.Dsl.Extension
) - A list of DSL extensions to add to theSpark.Dsl
:otp_app
(atom/0
) - The otp_app to use for any application configurable options:fragments
(list ofmodule/0
) - Fragments to include in theSpark.Dsl
. See the fragments guide for more.
Summary
Types
@type t() :: module()
Callbacks
@callback domain?() :: true