ardanlabs / service

Starter-kit for writing services in Go using Kubernetes.

Home Page:https://www.ardanlabs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Can i use multi storer interfaces?

David-Kalashir opened this issue · comments

I have two data models located in a core folder that need to be stored. Can I use an interface for each?

It's ok for a domain to manage different data models together. I tend to try and avoid this to keep clear divisions of the data, but there are times when it's not the right thing to do. So you still just want 1 storer interface and build a package that implements that storer api.

I would consider if these two models can't be in separate domains.