# `Filtrex.Type.Config`
[🔗](https://github.com/rcdilorenzo/filtrex/blob/main/lib/filtrex/config.ex#L1)

This configuration struct is for passing options at the top-level (e.g. `Filtrex.parse/2`) in a list. See `defconfig/1` for a more specific example.

Struct keys:
  * `type`: the corresponding condition module with this type (e.g. :text = Filtrex.Condition.Text)
  * `keys`: the allowed keys for this configuration
  * `options`: the configuration options to be passed to the condition

# `t`

```elixir
@type t() :: Filtrex.Type.Config
```

# `allowed?`

Returns whether the passed key is listed in any of the configurations

# `boolean`
*macro* 

Generate a config struct for `Filtrex.Condition.Boolean`

# `config`

Returns the configuration for the specified key

# `configs_for_type`

Narrows the list of configurations to only the specified type

# `date`
*macro* 

Generate a config struct for `Filtrex.Condition.Date`

# `datetime`
*macro* 

Generate a config struct for `Filtrex.Condition.DateTime`

# `defconfig`
*macro* 

Allows easy creation of a configuration list:

    iex> import Filtrex.Type.Config
    iex>
    iex> defconfig do
    iex>   # Single key can be passed
    iex>   number :rating, allow_decimal: true
    iex>
    iex>   # Multiple keys
    iex>   text [:title, :description]
    iex>
    iex>   # String key can be passed
    iex>   date "posted", format: "{ISOz}"
    iex> end
    [
      %Filtrex.Type.Config{keys: ["rating"], options: %{allow_decimal: true}, type: :number},
      %Filtrex.Type.Config{keys: ["title", "description"], options: %{}, type: :text},
      %Filtrex.Type.Config{keys: ["posted"], options: %{format: "{ISOz}"}, type: :date}
    ]

# `number`
*macro* 

Generate a config struct for `Filtrex.Condition.Number`

# `options`

Returns the specific options of a configuration based on the key

# `text`
*macro* 

Generate a config struct for `Filtrex.Condition.Text`

# `to_strings`

Convert a list of mixed atoms and/or strings to a list of strings

---

*Consult [api-reference.md](api-reference.md) for complete listing*
