mify-io / mify

microservices for you
Apache License 2.0
140 stars 8 forks source link

Move generator steps to internal #46

Open DMokhnatkin opened 2 years ago

DMokhnatkin commented 2 years ago

Now the whole code of the generator component (step) is located inside pkg directory. The right way will be to move the generation logic of components inside the internal dir. If there is any part that is used outside (such as mify config path), it should be located inside pkg directory, and the component implementation (the code which is located inside the internal dir) should import it.

DMokhnatkin commented 1 year ago

Also, the current gen context object has to know about each step. Maybe it will be better to export some state from each step as some kind of function/struct, which can be imported directly in another step (which requires it). The data for this state could be stored inside gen context in some generic way