Skip to content

Commit

Permalink
Remove data source from config
Browse files Browse the repository at this point in the history
  • Loading branch information
APB9785 committed Jan 23, 2024
1 parent a2ae44a commit 8d08cba
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions lib/beacon/config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ defmodule Beacon.Config do
"""
@type endpoint :: module()

@typedoc """
A module that implements `Beacon.DataSource.Behaviour`, used to provide `@assigns` to pages.
"""
@type data_source :: module() | nil

@typedoc """
A module that implements `Beacon.Authorization.Behaviour`, used to provide authorization rules for the admin backend.
"""
Expand Down Expand Up @@ -138,7 +133,6 @@ defmodule Beacon.Config do
@type t :: %__MODULE__{
site: Beacon.Types.Site.t(),
endpoint: endpoint(),
data_source: data_source(),
authorization_source: authorization_source(),
css_compiler: css_compiler(),
tailwind_config: tailwind_config(),
Expand Down Expand Up @@ -176,7 +170,6 @@ defmodule Beacon.Config do

defstruct site: nil,
endpoint: nil,
data_source: nil,
authorization_source: Beacon.Authorization.DefaultPolicy,
css_compiler: Beacon.TailwindCompiler,
tailwind_config: Path.join(Application.app_dir(:beacon, "priv"), "tailwind.config.js.eex"),
Expand All @@ -203,7 +196,6 @@ defmodule Beacon.Config do
@type option ::
{:site, Beacon.Types.Site.t()}
| {:endpoint, endpoint()}
| {:data_source, data_source()}
| {:authorization_source, authorization_source()}
| {:css_compiler, css_compiler()}
| {:tailwind_config, tailwind_config()}
Expand All @@ -226,8 +218,6 @@ defmodule Beacon.Config do
* `:endpoint` - `t:endpoint/0` (required)
* `:data_source` - `t:data_source/0` (optional)
* `:authorization_source` - `t:authorization_source/0` (optional).
Note this config can't be `nil`. Defaults to `Beacon.Authorization.DefaultPolicy`.
Expand Down Expand Up @@ -267,7 +257,6 @@ defmodule Beacon.Config do
iex> Beacon.Config.new(
site: :my_site,
endpoint: MyAppWeb.Endpoint,
data_source: MyApp.SiteDataSource,
authorization_source: MyApp.SiteAuthnPolicy,
tailwind_config: Path.join(Application.app_dir(:my_app, "priv"), "tailwind.config.js.eex"),
template_formats: [
Expand Down Expand Up @@ -295,7 +284,6 @@ defmodule Beacon.Config do
%Beacon.Config{
site: :my_site,
endpoint: MyAppWeb.Endpoint,
data_source: MyApp.SiteDataSource,
authorization_source: MyApp.SiteAuthnPolicy,
css_compiler: Beacon.TailwindCompiler,
tailwind_config: "/my_app/priv/tailwind.config.js.eex",
Expand Down

0 comments on commit 8d08cba

Please sign in to comment.