2022-08-15 06:06:58 +12:00
|
|
|
defmodule Ash.DocIndex do
|
2022-08-24 11:55:36 +12:00
|
|
|
@moduledoc false
|
2022-03-27 17:49:41 +13:00
|
|
|
|
2022-08-15 06:06:58 +12:00
|
|
|
use Spark.DocIndex,
|
2022-04-05 06:55:05 +12:00
|
|
|
guides_from: [
|
|
|
|
"documentation/**/*.md"
|
|
|
|
]
|
2022-03-25 15:25:14 +13:00
|
|
|
|
2022-03-25 15:29:18 +13:00
|
|
|
@impl true
|
|
|
|
@spec for_library() :: String.t()
|
|
|
|
def for_library, do: "ash"
|
2022-03-25 15:25:14 +13:00
|
|
|
|
|
|
|
@impl true
|
2022-08-15 06:06:58 +12:00
|
|
|
@spec extensions() :: list(Spark.DocIndex.extension())
|
2022-03-25 15:25:14 +13:00
|
|
|
def extensions do
|
|
|
|
[
|
|
|
|
%{
|
|
|
|
module: Ash.Resource.Dsl,
|
|
|
|
name: "Resource",
|
|
|
|
target: "Ash.Resource",
|
2022-03-26 09:08:51 +13:00
|
|
|
type: "Resource",
|
2022-03-25 15:25:14 +13:00
|
|
|
default_for_target?: true
|
|
|
|
},
|
|
|
|
%{
|
|
|
|
module: Ash.Api.Dsl,
|
|
|
|
name: "Api",
|
|
|
|
target: "Ash.Api",
|
2022-03-26 09:08:51 +13:00
|
|
|
type: "Api",
|
2022-03-25 15:25:14 +13:00
|
|
|
default_for_target?: true
|
|
|
|
},
|
|
|
|
%{
|
|
|
|
module: Ash.DataLayer.Ets,
|
|
|
|
name: "Ets",
|
|
|
|
target: "Ash.Resource",
|
|
|
|
type: "DataLayer"
|
|
|
|
},
|
|
|
|
%{
|
|
|
|
module: Ash.DataLayer.Mnesia,
|
|
|
|
name: "Mnesia",
|
|
|
|
target: "Ash.Resource",
|
|
|
|
type: "DataLayer"
|
|
|
|
},
|
2022-05-18 08:34:14 +12:00
|
|
|
%{
|
|
|
|
module: Ash.Policy.Authorizer,
|
|
|
|
name: "Policy Authorizer",
|
|
|
|
target: "Ash.Resource",
|
|
|
|
type: "Authorizer"
|
|
|
|
},
|
2022-03-25 15:25:14 +13:00
|
|
|
%{
|
|
|
|
module: Ash.Flow.Dsl,
|
|
|
|
name: "Flow",
|
|
|
|
target: "Ash.Flow",
|
2022-03-26 09:08:51 +13:00
|
|
|
type: "Flow",
|
2022-03-25 15:25:14 +13:00
|
|
|
default_for_target?: true
|
|
|
|
},
|
|
|
|
%{
|
|
|
|
module: Ash.Notifier.PubSub,
|
|
|
|
name: "PubSub",
|
|
|
|
target: "Ash.Resource",
|
|
|
|
type: "Notifier"
|
|
|
|
},
|
|
|
|
%{
|
2022-03-25 15:38:30 +13:00
|
|
|
module: Ash.Registry.Dsl,
|
2022-03-25 15:25:14 +13:00
|
|
|
name: "Registry",
|
|
|
|
target: "Ash.Registry",
|
2022-03-26 09:08:51 +13:00
|
|
|
type: "Registry",
|
2022-03-25 15:25:14 +13:00
|
|
|
default_for_target?: true
|
|
|
|
},
|
|
|
|
%{
|
|
|
|
module: Ash.Registry.ResourceValidations,
|
|
|
|
name: "Resource Validations",
|
2022-03-26 09:08:51 +13:00
|
|
|
type: "Extension",
|
2022-03-25 15:25:14 +13:00
|
|
|
target: "Ash.Registry"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
end
|
2022-03-28 06:08:27 +13:00
|
|
|
|
2022-09-29 13:59:47 +13:00
|
|
|
@impl true
|
|
|
|
@spec mix_tasks :: [{String.t(), list(module)}]
|
|
|
|
def mix_tasks do
|
|
|
|
{
|
|
|
|
"Charts",
|
|
|
|
[
|
|
|
|
Mix.Tasks.Ash.GenerateFlowCharts
|
|
|
|
]
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2022-03-30 13:43:11 +13:00
|
|
|
@impl true
|
2022-06-06 05:05:10 +12:00
|
|
|
@spec code_modules :: [{String.t(), list(module)}]
|
2022-03-31 04:37:44 +13:00
|
|
|
def code_modules do
|
2022-06-06 05:05:10 +12:00
|
|
|
[
|
|
|
|
{"Resources",
|
|
|
|
[
|
|
|
|
Ash.Api,
|
2022-07-11 15:39:57 +12:00
|
|
|
Ash.Filter.TemplateHelpers,
|
2022-06-06 05:05:10 +12:00
|
|
|
Ash.Calculation,
|
|
|
|
Ash.Resource.Calculation.Builtins,
|
|
|
|
Ash.CodeInterface,
|
2022-08-24 11:55:36 +12:00
|
|
|
Ash.DataLayer,
|
|
|
|
Ash.Notifier,
|
|
|
|
Ash.Notifier.Notification,
|
|
|
|
Ash.Resource.ManualRead,
|
|
|
|
Ash.Resource.ManualRelationship
|
|
|
|
]},
|
2022-09-04 18:56:41 +12:00
|
|
|
{"Expressions",
|
|
|
|
[
|
|
|
|
Ash.Expr
|
|
|
|
]},
|
2022-08-24 11:55:36 +12:00
|
|
|
{"Queries",
|
|
|
|
[
|
|
|
|
Ash.Query,
|
|
|
|
Ash.Resource.Preparation,
|
|
|
|
Ash.Resource.Preparation.Builtins,
|
|
|
|
Ash.Query.Calculation,
|
|
|
|
Ash.Query.Aggregate
|
|
|
|
]},
|
|
|
|
{"Changesets",
|
|
|
|
[
|
2022-06-06 05:05:10 +12:00
|
|
|
Ash.Changeset,
|
2022-08-24 11:55:36 +12:00
|
|
|
Ash.Resource.Change,
|
|
|
|
Ash.Resource.Change.Builtins,
|
|
|
|
Ash.Resource.Validation,
|
|
|
|
Ash.Resource.Validation.Builtins
|
|
|
|
]},
|
|
|
|
{"Authorization",
|
|
|
|
[
|
|
|
|
Ash.Authorizer,
|
|
|
|
Ash.Policy.Check,
|
2022-09-08 07:03:09 +12:00
|
|
|
Ash.Policy.Check.Builtins,
|
2022-08-24 11:55:36 +12:00
|
|
|
Ash.Policy.FilterCheck,
|
|
|
|
Ash.Policy.SimpleCheck
|
|
|
|
]},
|
|
|
|
{"Introspection",
|
|
|
|
[
|
|
|
|
Ash.Api.Info,
|
|
|
|
Ash.Registry.Info,
|
|
|
|
Ash.Resource.Info,
|
|
|
|
Ash.Flow.Info,
|
|
|
|
Ash.Policy.Info,
|
|
|
|
Ash.DataLayer.Ets.Info,
|
|
|
|
Ash.DataLayer.Mnesia.Info,
|
|
|
|
Ash.Notifier.PubSub.Info
|
2022-06-06 05:05:10 +12:00
|
|
|
]},
|
|
|
|
{"Utilities",
|
|
|
|
[
|
2022-08-24 11:55:36 +12:00
|
|
|
Ash,
|
|
|
|
Ash.Page.Keyset,
|
|
|
|
Ash.Page.Offset,
|
2022-06-06 05:05:10 +12:00
|
|
|
Ash.Filter,
|
2022-08-24 11:55:36 +12:00
|
|
|
Ash.Filter.Runtime,
|
|
|
|
Ash.Sort,
|
|
|
|
Ash.CiString,
|
|
|
|
Ash.UUID,
|
|
|
|
Ash.NotLoaded,
|
|
|
|
Ash.Changeset.ManagedRelationshipHelpers,
|
|
|
|
Ash.DataLayer.Simple,
|
|
|
|
Ash.Filter.Simple,
|
|
|
|
Ash.Filter.Simple.Not,
|
|
|
|
Ash.OptionsHelpers
|
|
|
|
]},
|
|
|
|
{"Testing",
|
|
|
|
[
|
|
|
|
Ash.Generator,
|
|
|
|
Ash.Seed
|
|
|
|
]},
|
|
|
|
{"Flow",
|
|
|
|
[
|
|
|
|
Ash.Flow,
|
|
|
|
Ash.Flow.Step,
|
|
|
|
Ash.Flow.Executor,
|
|
|
|
Ash.Flow.Chart.Mermaid,
|
|
|
|
Ash.Flow.StepHelpers
|
2022-06-06 05:05:10 +12:00
|
|
|
]},
|
|
|
|
{"Errors",
|
|
|
|
[
|
2022-08-24 11:55:36 +12:00
|
|
|
Ash.Error,
|
|
|
|
Ash.Error.Exception,
|
|
|
|
Ash.Error.Stacktrace
|
2022-06-06 05:05:10 +12:00
|
|
|
]},
|
|
|
|
{"Types",
|
|
|
|
[
|
|
|
|
Ash.Type,
|
|
|
|
Ash.Type.Enum,
|
|
|
|
Ash.Type.Atom,
|
|
|
|
Ash.Type.Binary,
|
|
|
|
Ash.Type.Boolean,
|
|
|
|
Ash.Type.CiString,
|
|
|
|
Ash.Type.Date,
|
|
|
|
Ash.Type.Decimal,
|
|
|
|
Ash.Type.DurationName,
|
|
|
|
Ash.Type.Float,
|
|
|
|
Ash.Type.Function,
|
|
|
|
Ash.Type.Integer,
|
|
|
|
Ash.Type.Map,
|
|
|
|
Ash.Type.NaiveDatetime,
|
|
|
|
Ash.Type.String,
|
|
|
|
Ash.Type.Term,
|
|
|
|
Ash.Type.Time,
|
|
|
|
Ash.Type.UUID,
|
|
|
|
Ash.Type.UrlEncodedBinary,
|
|
|
|
Ash.Type.UtcDatetime,
|
|
|
|
Ash.Type.UtcDatetimeUsec
|
|
|
|
]}
|
|
|
|
]
|
2022-03-30 13:43:11 +13:00
|
|
|
end
|
2022-03-25 15:25:14 +13:00
|
|
|
end
|