total rebase
[anni] / lib / pleroma / config / getting.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Config.Getting do
6   @callback get(any()) :: any()
7   @callback get(any(), any()) :: any()
8
9   def get(key), do: get(key, nil)
10   def get(key, default), do: impl().get(key, default)
11
12   def impl do
13     Application.get_env(:pleroma, :config_impl, Pleroma.Config)
14   end
15 end