-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor how rtypes are implemented #3036
Comments
I am in favor of the proposed solution. 👍 I am happy to help with redesigning the documentation generator. 🤓 |
yes, please! |
It turns out the way models.RecordConfig was created makes doing this kind of thing very difficult. That said, I think I have a solution that will make it easier to add new record types, builders, and so on. |
FYI: The branch branch_gorec is slowly working towards making this possible. |
Thanks for the update! Appreciate you keeping me in the loop. |
CC @cafferata
Problem statement:
For example, if we were to remove CF_REDIRECT we'd have to edit code in providers/cloudflare, documentation/language-reference/domain-modifiers, helpers.js, integrationTest/integration_test.go, pkg/js/parse_tests, and more!
Proposed solution:
Ideally everything related to a particular rtypes would be isolated to a single directory that includes code, documentation, tests, etc. exclusively for that rtype.
I don't think we can get there in one step, but I think we can improve the current situation.
Proposal:
$git/rtypes/NAME/
or$git/providers/PROVIDERNAME/rtypes/NAME/
whereNAME
is the rtype name.$git/rtypes/NAME/documentation/
or$git/providers/PROVIDERNAME/rtypes/NAME/documentation/
. The documentation system should find it there automagicallly.Implementation:
I'm using #3035 (CF_SINGLE_REDIRECT) as an opportunity to improve some of these issues.
var CF_SINGLE_REDIRECT = rawrecordBuilder('CF_SINGLE_REDIRECT');
CF_SINGLE_REDIRECT
is in$git/providers/cloudflare/rtypes/cfsingleredirect/
No change to where documentation is (that's going to require changes to the go generate code) nor other changes. However this is a start.
The text was updated successfully, but these errors were encountered: