Botica.Flags.Config (Botica v2.2.0)

Copy Markdown View Source

Configuration source for feature flags. Provides defaults read from the application environment, allowing runtime overrides.

Usage

The flag defaults are defined in the :botica application env under the key :flags. They should be a keyword list of flag definitions:

config :botica, :flags, [
  new_dashboard: [default: false, description: "new dashboard"],
  beta_search: [default: true]
]

The get/0 function returns a list of Botica.Flags.Flag structs with the supplied defaults. If no config is present, an empty list is returned.

Summary

Functions

Reads flag defaults from the :botica application env under :flags. Each entry must be either {atom(), keyword()} (a flag definition) or a bare atom. Raises ArgumentError on malformed entries.

Functions

get()

@spec get() :: [Botica.Flags.Flag.t()]

Reads flag defaults from the :botica application env under :flags. Each entry must be either {atom(), keyword()} (a flag definition) or a bare atom. Raises ArgumentError on malformed entries.