codeamp / circuit

CodeAmp API. Built with Golang, GraphQL, GORM and Socket-IO
Apache License 2.0
21 stars 6 forks source link

Add ResourceConfig interface #435

Closed drshrey closed 5 years ago

drshrey commented 5 years ago

Addresses part of https://github.com/codeamp/circuit/issues/436

The ResourceConfig is the interface that will be used for all objects we choose to be importable/ exportable. We create the ResourceConfig for two reasons:

  1. For each object's implementation, we want to have an explicit input standard when something must be imported. For instance, if we are importing a YAML string in our resolver logic, we transform that into the proper input format before passing it in to the Import function.

  2. We want to control what information should be exportable to the end-user and how it is shown. For instance, if we are exporting a project extension, we want to put its Extension key on the same level as the project extension properties and omit any Extension config information since the end-user should never know about that.