mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 13:33:20 +12:00
docs: fix dangling docs references
This commit is contained in:
parent
3c570bd679
commit
7eea6576a0
9 changed files with 30 additions and 38 deletions
|
@ -28,6 +28,10 @@ defmodule Ash.Dsl do
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@type entity :: %Ash.Dsl.Entity{}
|
||||||
|
|
||||||
|
@type section :: %Ash.Dsl.Section{}
|
||||||
|
|
||||||
@moduledoc """
|
@moduledoc """
|
||||||
The primary entry point for adding a DSL to a module.
|
The primary entry point for adding a DSL to a module.
|
||||||
|
|
||||||
|
|
|
@ -46,19 +46,6 @@ defmodule Ash.Dsl.Entity do
|
||||||
auto_set_fields: []
|
auto_set_fields: []
|
||||||
]
|
]
|
||||||
|
|
||||||
@type t :: %__MODULE__{
|
|
||||||
name: atom,
|
|
||||||
describe: String.t(),
|
|
||||||
target: module,
|
|
||||||
examples: [String.t()],
|
|
||||||
transform: mfa | nil,
|
|
||||||
args: [atom],
|
|
||||||
hide: [atom],
|
|
||||||
entities: Keyword.t(),
|
|
||||||
auto_set_fields: Keyword.t(),
|
|
||||||
schema: Ash.OptionsHelpers.schema()
|
|
||||||
}
|
|
||||||
|
|
||||||
def build(
|
def build(
|
||||||
%{target: target, schema: schema, auto_set_fields: auto_set_fields, transform: transform},
|
%{target: target, schema: schema, auto_set_fields: auto_set_fields, transform: transform},
|
||||||
opts,
|
opts,
|
||||||
|
|
|
@ -102,7 +102,7 @@ defmodule Ash.Dsl.Extension do
|
||||||
See the documentation for `Ash.Dsl.Section` and `Ash.Dsl.Entity` for more information
|
See the documentation for `Ash.Dsl.Section` and `Ash.Dsl.Entity` for more information
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@callback sections() :: [Ash.Dsl.Section.t()]
|
@callback sections() :: [Ash.Dsl.section()]
|
||||||
@callback transformers() :: [module]
|
@callback transformers() :: [module]
|
||||||
|
|
||||||
@doc "Get the entities configured for a given section"
|
@doc "Get the entities configured for a given section"
|
||||||
|
|
|
@ -30,13 +30,4 @@ defmodule Ash.Dsl.Section do
|
||||||
entities: [],
|
entities: [],
|
||||||
sections: []
|
sections: []
|
||||||
]
|
]
|
||||||
|
|
||||||
@type t :: %__MODULE__{
|
|
||||||
name: atom,
|
|
||||||
describe: String.t(),
|
|
||||||
examples: [String.t()],
|
|
||||||
entities: [Ash.Dsl.Entity.t()],
|
|
||||||
sections: [%__MODULE__{}],
|
|
||||||
schema: Ash.OptionsHelpers.schema()
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -22,18 +22,6 @@ defmodule Ash.Helpers do
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
# A restricted version of `:erlang.binary_to_term/2` that forbids
|
|
||||||
# *executable* terms, such as anonymous functions.
|
|
||||||
# The `opts` are given to the underlying `:erlang.binary_to_term/2`
|
|
||||||
# call, with an empty list as a default.
|
|
||||||
# By default this function does not restrict atoms, as an atom
|
|
||||||
# interned in one node may not yet have been interned on another
|
|
||||||
# (except for releases, which preload all code).
|
|
||||||
# If you want to avoid atoms from being created, then you can pass
|
|
||||||
# `[:safe]` as options, as that will also enable the safety mechanisms
|
|
||||||
# from `:erlang.binary_to_term/2` itself.
|
|
||||||
# Ripped from https://github.com/elixir-plug/plug_crypto/blob/v1.2.0/lib/plug/crypto.ex
|
|
||||||
|
|
||||||
# sobelow_skip ["Misc.BinToTerm"]
|
# sobelow_skip ["Misc.BinToTerm"]
|
||||||
def non_executable_binary_to_term(binary, opts \\ []) when is_binary(binary) do
|
def non_executable_binary_to_term(binary, opts \\ []) when is_binary(binary) do
|
||||||
term = :erlang.binary_to_term(binary, opts)
|
term = :erlang.binary_to_term(binary, opts)
|
||||||
|
|
|
@ -118,5 +118,18 @@ defmodule Ash.Page.Keyset do
|
||||||
Enum.map(fields, &Map.get(record, &1))
|
Enum.map(fields, &Map.get(record, &1))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@doc """
|
||||||
|
A restricted version of `:erlang.binary_to_term/2` that forbids
|
||||||
|
*executable* terms, such as anonymous functions.
|
||||||
|
The `opts` are given to the underlying `:erlang.binary_to_term/2`
|
||||||
|
call, with an empty list as a default.
|
||||||
|
By default this function does not restrict atoms, as an atom
|
||||||
|
interned in one node may not yet have been interned on another
|
||||||
|
(except for releases, which preload all code).
|
||||||
|
If you want to avoid atoms from being created, then you can pass
|
||||||
|
`[:safe]` as options, as that will also enable the safety mechanisms
|
||||||
|
from `:erlang.binary_to_term/2` itself.
|
||||||
|
Ripped from https://github.com/elixir-plug/plug_crypto/blob/v1.2.0/lib/plug/crypto.ex
|
||||||
|
"""
|
||||||
defdelegate non_executable_binary_to_term(binary, opts), to: Ash.Helpers
|
defdelegate non_executable_binary_to_term(binary, opts), to: Ash.Helpers
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
defmodule Ash.Sort do
|
defmodule Ash.Sort do
|
||||||
@moduledoc false
|
@moduledoc """
|
||||||
|
Utilities and types for sorting.
|
||||||
|
"""
|
||||||
|
|
||||||
alias Ash.Error.Query.{InvalidSortOrder, NoSuchAttribute}
|
alias Ash.Error.Query.{InvalidSortOrder, NoSuchAttribute}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
defmodule Ash.SatSolver do
|
defmodule Ash.SatSolver do
|
||||||
@moduledoc false
|
@moduledoc """
|
||||||
|
Tools for working with the satsolver that drives filter subset checking (for authorization)
|
||||||
|
"""
|
||||||
|
|
||||||
alias Ash.Filter
|
alias Ash.Filter
|
||||||
alias Ash.Query.{BooleanExpression, Not, Ref}
|
alias Ash.Query.{BooleanExpression, Not, Ref}
|
||||||
|
|
7
mix.exs
7
mix.exs
|
@ -97,6 +97,10 @@ defmodule Ash.MixProject do
|
||||||
Ash.Resource.Dsl,
|
Ash.Resource.Dsl,
|
||||||
Ash.Api.Dsl
|
Ash.Api.Dsl
|
||||||
],
|
],
|
||||||
|
tools: [
|
||||||
|
Ash.Filter,
|
||||||
|
Ash.Sort
|
||||||
|
],
|
||||||
validations: ~r/Ash.Resource.Validation/,
|
validations: ~r/Ash.Resource.Validation/,
|
||||||
changes: ~r/Ash.Resource.Change/,
|
changes: ~r/Ash.Resource.Change/,
|
||||||
calculations: [
|
calculations: [
|
||||||
|
@ -145,7 +149,8 @@ defmodule Ash.MixProject do
|
||||||
Ash.UUID,
|
Ash.UUID,
|
||||||
Ash.NotLoaded,
|
Ash.NotLoaded,
|
||||||
Ash.Query.Aggregate,
|
Ash.Query.Aggregate,
|
||||||
Ash.Query.Type
|
Ash.Query.Type,
|
||||||
|
Ash.SatSolver
|
||||||
],
|
],
|
||||||
comparable: ~r/Comparable/
|
comparable: ~r/Comparable/
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue