Create a Driven Adapter
Creates a new driven adapter for the clean architecture project.
mix ca.new.da --type <driven_adapter_name>
Type param options:
Name | Description |
---|---|
asynceventbus | RabbitMQ message sender |
dynamo | AWS Dynamo DB client |
generic | Empty structure for an adapter |
redis | Redis client |
repository | Ecto repository setup |
restconsumer | HTTP(S) Client |
secrestsmanager | AWS Secrets Manager client |
mix ca.new.da --type <driven_adapter_name> --name <my_adapter>
mix ca.new.da -t driven_adapter_name -n <my_adapter>
This task will generate something like that:
infrastructure
└── driven_adapters
└── rest_consumer
└── <name>
├── data
│ ├── <name>_request.ex
│ └── <name>_response.ex
└── <name>_adapter.ex