HawkEx.Config (hawk_ex v0.1.0)

Copy Markdown View Source

Runtime configuration access for HawkEx.

Most applications do not need to call this module directly. It centralizes access to required and optional configuration so context modules can provide consistent behavior and helpful setup errors.

Summary

Functions

Returns the configured account schema module.

Returns the configured CSV storage adapter and its options. Defaults to local disk at "priv/exports".

Returns the configured Oban module, or nil if not configured. Required for async CSV exports.

Returns the configured PubSub module, or nil if not configured. PubSub is optional. Events are no-ops when it is not configured.

Returns the configured Ecto repo module.

Returns a snapshot of all current HawkEx configuration for display purposes (e.g. the dashboard's Configuration page). Never raises; unconfigured values appear as nil.

Functions

account_schema()

Returns the configured account schema module.

Raises with setup instructions when config :hawk_ex, account_schema: ... is missing.

csv_storage()

Returns the configured CSV storage adapter and its options. Defaults to local disk at "priv/exports".

oban()

Returns the configured Oban module, or nil if not configured. Required for async CSV exports.

pubsub()

Returns the configured PubSub module, or nil if not configured. PubSub is optional. Events are no-ops when it is not configured.

repo()

Returns the configured Ecto repo module.

Raises with setup instructions when config :hawk_ex, repo: ... is missing.

snapshot()

Returns a snapshot of all current HawkEx configuration for display purposes (e.g. the dashboard's Configuration page). Never raises; unconfigured values appear as nil.