2024-03-14 17:13:04 +13:00
<!--
This file was generated by Spark. Do not edit it by hand.
-->
2023-09-20 12:22:06 +12:00
# DSL: Smokestack.Dsl
The DSL definition for the Smokestack DSL.
<!-- - ash - hq - hide - start --> <!-- - -->
## DSL Documentation
### Index
* smokestack
* factory
* attribute
### Docs
## smokestack
* [factory ](#module-factory )
* attribute
---
* `:api` (`t:atom/0`) - The default Ash API to use when evaluating loads
### factory
Define factories for a resource
* attribute
* `:api` (`t:atom/0`) - The Ash API to use when evaluating loads
* `:resource` (`t:atom/0`) - Required. An Ash Resource
* `:variant` (`t:atom/0`) - The name of a factory variant The default value is `:default` .
##### attribute
* `:name` (`t:atom/0`) - Required. The name of the target attribute
* `:generator` - Required. A function which can generate an appropriate value for the attribute.œ
<!-- - ash - hq - hide - stop --> <!-- - -->
## smokestack
### Nested DSLs
* [factory ](#smokestack-factory )
* attribute
### Options
2024-03-14 17:13:04 +13:00
2023-09-20 12:22:06 +12:00
| Name | Type | Default | Docs |
2024-03-14 17:13:04 +13:00
|------|------|---------|------|
| [`api` ](#smokestack-api ){: #smokestack -api } | `module` | | The default Ash API to use when evaluating loads |
2023-09-20 12:22:06 +12:00
## smokestack.factory
```elixir
2024-03-14 17:13:04 +13:00
factory resource, variant \\ :default
2023-09-20 12:22:06 +12:00
```
Define factories for a resource
### Nested DSLs
* [attribute ](#smokestack-factory-attribute )
### Arguments
2024-03-14 17:13:04 +13:00
2023-09-20 12:22:06 +12:00
| Name | Type | Default | Docs |
2024-03-14 17:13:04 +13:00
|------|------|---------|------|
| [`resource` ](#smokestack-factory-resource ){: #smokestack -factory-resource .spark-required} | `module` | | An Ash Resource |
| [`variant` ](#smokestack-factory-variant ){: #smokestack -factory-variant } | `atom` | `:default` | The name of a factory variant |
2023-09-20 12:22:06 +12:00
### Options
2024-03-14 17:13:04 +13:00
2023-09-20 12:22:06 +12:00
| Name | Type | Default | Docs |
2024-03-14 17:13:04 +13:00
|------|------|---------|------|
| [`api` ](#smokestack-factory-api ){: #smokestack -factory-api } | `module` | | The Ash API to use when evaluating loads |
2023-09-20 12:22:06 +12:00
## smokestack.factory.attribute
```elixir
attribute name, generator
```
### Arguments
2024-03-14 17:13:04 +13:00
2023-09-20 12:22:06 +12:00
| Name | Type | Default | Docs |
2024-03-14 17:13:04 +13:00
|------|------|---------|------|
| [`name` ](#smokestack-factory-attribute-name ){: #smokestack -factory-attribute-name .spark-required} | `atom` | | The name of the target attribute |
| [`generator` ](#smokestack-factory-attribute-generator ){: #smokestack -factory-attribute-generator .spark-required} | `(-> any) \| mfa \| (any -> any) \| mfa \| (any, any -> any) \| mfa` | | A function which can generate an appropriate value for the attribute.œ |
2023-09-20 12:22:06 +12:00
### Introspection
Target: `Smokestack.Dsl.Attribute`
### Introspection
Target: `Smokestack.Dsl.Factory`
2024-03-14 17:13:04 +13:00
< style type = "text/css" > . spark-required :: after { content : "*" ; color : red !important ; } < / style >