View Source Spark.InfoGenerator (spark v1.1.44)

Used to dynamically generate configuration functions for Spark extensions based on their DSL.

Usage

defmodule MyConfig do
  use Spark.InfoGenerator, extension: MyDslExtension, sections: [:my_section]
end

Summary

Functions

Given an extension and a list of DSL sections generate individual config functions for each option.

Given an extension and a list of DSL sections, generate an entities function which returns a list of entities.

Given an extension and a list of DSL sections, generate an options function which returns a map of all configured options for a resource (including defaults).

Types

@type options() :: [extension: module(), sections: [atom()]]

Functions

Link to this macro

generate_config_functions(extension, sections)

View Source (macro)
@spec generate_config_functions(module(), [atom()]) :: Macro.t()

Given an extension and a list of DSL sections generate individual config functions for each option.

Link to this macro

generate_entity_functions(extension, sections)

View Source (macro)
@spec generate_entity_functions(module(), [atom()]) :: Macro.t()

Given an extension and a list of DSL sections, generate an entities function which returns a list of entities.

Link to this macro

generate_options_functions(extension, sections)

View Source (macro)
@spec generate_options_functions(module(), [atom()]) :: Macro.t()

Given an extension and a list of DSL sections, generate an options function which returns a map of all configured options for a resource (including defaults).

Link to this function

spec_for_type(terminal, opts)

View Source