Ash.Domain behaviour (ash v3.4.56)
View SourceA 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
endOptions
: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 theAshmodule The default value istrue.:extensions(list of module that adoptsSpark.Dsl.Extension) - A list of DSL extensions to add to theSpark.Dsl:authorizers(one or a list of module that adoptsAsh.Authorizer) - authorizers extensions to add to theSpark.DslThe default value is[].: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()