2020-12-16 20:41:35 +01:00
|
|
|
# Pleroma: A lightweight social networking server
|
2022-02-25 23:11:42 -07:00
|
|
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
2020-12-16 20:41:35 +01: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 14:49:15 +04:00
|
|
|
|
|
|
|
def get(key), do: get(key, nil)
|
|
|
|
def get(key, default), do: impl().get(key, default)
|
|
|
|
|
2023-11-12 17:13:27 +04:00
|
|
|
def impl do
|
2023-11-12 14:49:15 +04:00
|
|
|
Application.get_env(:pleroma, :config_impl, Pleroma.Config)
|
|
|
|
end
|
2020-12-16 20:41:35 +01:00
|
|
|
end
|