apigear-io / cli

The ApiGear client as go project
https://apigear.io
MIT License
1 stars 2 forks source link

make documents free of filesystem code #106

Open jryannel opened 10 months ago

jryannel commented 10 months ago

To support the hub handling documents in memory using DB abstractions (e.g. inputs are document IDs and not file paths) we need to remove all filesystem code from these documents and place them into external functions.

The first attempt will be using a visitor pattern (https://refactoring.guru/design-patterns/visitor/go/example)

And move the FS handling into an external visitor which can be applied on to the document. Later we can add a DB visitor which ensure all documents are DB ready.