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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
2024-03-28 10:04:54 +13:00
|
|
|
* `:domain` (module that adopts `Ash.Domain`) - The default Ash Domain to use when evaluating loads
|
2023-09-20 12:22:06 +12:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### factory
|
|
|
|
|
|
|
|
Define factories for a resource
|
|
|
|
|
|
|
|
* attribute
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-28 10:04:54 +13:00
|
|
|
* `:domain` (module that adopts `Ash.Domain`) - The Ash Domain to use when evaluating loads
|
2023-09-20 12:22:06 +12:00
|
|
|
|
2024-03-28 10:04:54 +13:00
|
|
|
* `:resource` (module that adopts `Ash.Resource`) - Required. An Ash Resource
|
2023-09-20 12:22:06 +12:00
|
|
|
|
|
|
|
* `: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
|
|
|
|------|------|---------|------|
|
2024-03-28 10:04:54 +13:00
|
|
|
| [`domain`](#smokestack-domain){: #smokestack-domain } | `module` | | The default Ash Domain 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
|
|
|
|------|------|---------|------|
|
2024-03-28 10:04:54 +13:00
|
|
|
| [`domain`](#smokestack-factory-domain){: #smokestack-factory-domain } | `module` | | The Ash Domain 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 |
|
2024-03-28 10:04:54 +13:00
|
|
|
| [`generator`](#smokestack-factory-attribute-generator){: #smokestack-factory-attribute-generator .spark-required} | `(-> any) \| mfa \| (any -> any) \| mfa \| (any, any -> any) \| mfa \| Smokestack.Template.Choose \| Smokestack.Template.Constant \| Smokestack.Template.Cycle \| Smokestack.Template.NTimes \| Smokestack.Template.Sequence` | | 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>
|