Skip to main content

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:

NameDescription
asynceventbusRabbitMQ message sender
dynamoAWS Dynamo DB client
genericEmpty structure for an adapter
redisRedis client
repositoryEcto repository setup
restconsumerHTTP(S) Client
secrestsmanagerAWS 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