-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create storage conversion helper functions (#1495)
* Move supporting types into subpackage * Move type visitor creation onto StorageTypeFactory * Remove StorageTypesVisitorContext * Rename all receivers * Use AsEnumType() instead of hard cast * Move creation of storage types into the factory * Use a separate factory for each group * Fix bug generating storage versions of resources * Use queue for just in time creation of storage types * Improve logging of conversion issues * Don't case convert endpoint names * Update StorageTypeFactory to use the name queue * Code gardening * Add injection of conversion functions * Improve debug diagnostics * Change to using TypeVisitorBuilder * Code gardening * Rename member to otherDefinition * Use PropertyContainer to generate conversions * Code gardening * Move visitor methods to end of file * Create and use visitor to inject functions * Code gardening * Make TypeFlag.IsOn() handled nested types * Implement AsZero for ValidatedType * Change implementation of type conversion skipping * Code gardening * Clear PackageReferenceSet * Address issues identified by CI build * Modify generator to reuse the err local in generated code * Remove variable shadowing * Resources need to use function references too * Ensure "errors" is imported * Use nested conversion contexts where needed * Use pointer receiver for converion types * Pass address of local * Exclude storage version types from hub version selection * Update from k8s-infra PR * Create FunctionInjector abstraction * Create HubVersionMarker abstraction * Create PropertyConverter abstraction * Create TypeConverter abstraction * Add required headers * Fix references * go fmt * Fix bug with missing KnownLocalsSet in context * Ensure pointers are captured, not values * Add Process() to Types * Preserve ResourceReferences * Code gardening * Add support for ResourceReference properties * Simplify error handling when creating conversions * Refactor StorageTypeFactory * Add warning * Simplify handling of aggregate errors * Rename member to group * Include property type in error * Go fmt * Apply suggestions from code review Co-authored-by: Matthew Christopher <[email protected]> * Fix terminology, using package instead of namespace * Add GitHub errors reference Co-authored-by: Matthew Christopher <[email protected]>
- Loading branch information
1 parent
7a9f076
commit 7a6e709
Showing
55 changed files
with
1,033 additions
and
389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.