I’m working on a yet-to-be-released module for dealing with dual-entry accounting in Elixir/Phoenix apps, and due to its nature, this features a lot of database interaction.
What is the best way to allow the implementing app to provide its Ecto.Repo instance to the module?
I could make it a parameter to all public APIs, so they have to be called like
Accounting.add_account(MyApp.Repo, account), but that is a bit inelegant.
Any suggestions for a better way to do this? Maybe configuration?