2020-12-16 19:41:35 +00:00
|
|
|
# Pleroma: A lightweight social networking server
|
2022-02-26 06:11:42 +00:00
|
|
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
2020-12-16 19:41:35 +00:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
defmodule Pleroma.Config.Getting do
|
|
|
|
@callback get(any()) :: any()
|
|
|
|
@callback get(any(), any()) :: any()
|
2023-11-12 10:49:15 +00:00
|
|
|
|
|
|
|
def get(key), do: get(key, nil)
|
|
|
|
def get(key, default), do: impl().get(key, default)
|
|
|
|
|
2023-11-12 13:13:27 +00:00
|
|
|
def impl do
|
2023-11-12 10:49:15 +00:00
|
|
|
Application.get_env(:pleroma, :config_impl, Pleroma.Config)
|
|
|
|
end
|
2020-12-16 19:41:35 +00:00
|
|
|
end
|