govpp
govpp copied to clipboard
Move plugins to own package & improve apigen CLI
This patch moves the binapigenerator plugins to their own package.
- It capitalizes the methods they leverage.
- It changes the way plugins are called, passing the whole generator at once and letting the plugin themselves loop on the files. This allow for more variety in filtering, aggregation, etc...
This patch also proposes an evolution to the binapigen CLI in order to make it more user-friendly for newcomers as well as build pipelines based on go:generate
For now two usecases are in the picture:
- Building from a directory containing .json files e.g. 'binapigen --api /usr/share/vpp/api --output ./myapp/bindings --filter interface,ip'
- Building from a cloned local VPP e.g. 'binapigen --vpp ~/vpp --output ./myapp/binding'
Signed-off-by: Nathan Skrzypczak [email protected] Change-Id: I5b0b2ade40ab80c9e91c2a422f8c193b232d9830