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

api

David-Kalashir opened this issue · comments

Is it possible to have another directory called weapi in the core section next to the stores directory to work with apis, to cash apis and work with them easily. It has exactly the same structure as stores. The second question is that there is more than one store for each core. Some of the logics are complicated

If you ONLY want that core using those web api's, then that package could be placed there. That is the criteria. If this is a package that will be used by all core packages, put it under foundation and follow those policy rules. If this package will only be used by that particular core package, put it under.

This directory is not supposed to be used only for connection, it is supposed to have APIs required by core, implemented like a store, for example, we will implement the api to get the flight list, the packages required for connection will be implemented in foundation

Again, the decision needs to be made based on the reusability of the package. It seems like this can live in a layer under the core package like the storage layer. Try that first and see how it feels. You can always move it later.