Skip to content
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

Generic Plugin Framework flattener/expander functions PoC - Phase 2 #32356

Merged
merged 117 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
abb7940
flex.Expand: Start to think about custom primitive types.
ewbankkit Jun 27, 2023
c946ae4
Merge branch 'main' into f-further-auto-flex
ewbankkit Jun 27, 2023
f03499b
flex.Expand: Support custom primitive types.
ewbankkit Jun 27, 2023
50b8dfd
flex.Flatten: Start to think about custom primitive types.
ewbankkit Jun 27, 2023
eeb492f
flex.Flatten: Support custom primitive types.
ewbankkit Jun 27, 2023
08c2a8a
Additional comments.
ewbankkit Jun 27, 2023
65ed228
Add 'flex.ExpandFrameworkStringMap'.
ewbankkit Jun 27, 2023
a0ad52c
flex.Expand: Support maps of strings.
ewbankkit Jun 27, 2023
24a2c5e
Add 'flex.FlattenFrameworkStringMap' and 'flex.FlattenFrameworkString…
ewbankkit Jun 27, 2023
f0bcb55
flex.Flatten: Support maps of strings.
ewbankkit Jun 27, 2023
e4957bb
flex.Expand: Skip lists/sets of objects.
ewbankkit Jun 27, 2023
832b99a
flex.Flatten: Skip pointers to structs.
ewbankkit Jun 28, 2023
b2c933f
Merge branch 'main' into f-further-auto-flex
ewbankkit Jul 3, 2023
b88a204
Start to add 'ObjectOf[T]' and 'ListOf[T]'.
ewbankkit Jul 4, 2023
035b414
Add 'TestObjectTypeOfEqual'.
ewbankkit Jul 5, 2023
195bc4a
Add 'TestObjectValueOfEqual'.
ewbankkit Jul 5, 2023
738af62
Add 'TestListTypeOfEqual'.
ewbankkit Jul 5, 2023
200976f
Add 'TestListValueOfEqual'.
ewbankkit Jul 5, 2023
b34565c
Add 'TestListTypeOfValueFromTerraform'.
ewbankkit Jul 5, 2023
db94869
Additional checks.
ewbankkit Jul 5, 2023
e62431c
Add 'ValueAsPtr'.
ewbankkit Jul 5, 2023
84e2997
Merge branch 'main' into f-further-auto-flex
ewbankkit Jul 20, 2023
2bd7507
Comment out currently failing unit test.
ewbankkit Jul 20, 2023
0c2864d
Add 'expandVisitor.bool'.
ewbankkit Jul 20, 2023
39e6c3f
Add 'expandVisitor.float64'.
ewbankkit Jul 21, 2023
d59a73d
Add 'expandVisitor.int64'.
ewbankkit Jul 21, 2023
84511cd
Add 'expandVisitor.string'.
ewbankkit Jul 21, 2023
b400de6
Add 'expandVisitor.list'.
ewbankkit Jul 21, 2023
930dd79
Add 'expandVisitor.listOfObject'.
ewbankkit Jul 24, 2023
5591410
Add 'expandVisitor.newIncompatibleListTypesError'.
ewbankkit Jul 24, 2023
476f882
Add 'expandVisitor.map'.
ewbankkit Jul 24, 2023
23ca7c0
Add 'expandVisitor.set'.
ewbankkit Jul 24, 2023
37165e9
Add 'flattenVisitor.bool'.
ewbankkit Jul 24, 2023
8289e3a
Add 'flattenVisitor.float'.
ewbankkit Jul 24, 2023
561daab
Add 'flattenVisitor.int'.
ewbankkit Jul 24, 2023
18b177f
Add 'flattenVisitor.string'.
ewbankkit Jul 24, 2023
3335791
Flatten pointers to primitive types.
ewbankkit Jul 24, 2023
487c5ec
Add 'flattenVisitor.pointer'.
ewbankkit Jul 24, 2023
a3752fa
Add 'flattenVisitor.slice'.
ewbankkit Jul 24, 2023
e892b4a
Add 'flattenVisitor.map'.
ewbankkit Jul 24, 2023
1456c29
AutoFlex: Return 'diag.Diagnostics'.
ewbankkit Jul 24, 2023
8f6da70
Acceptance test output:
ewbankkit Jul 24, 2023
132d622
Fix golangci-lint 'unparam'.
ewbankkit Jul 25, 2023
451dfe4
Add comments.
ewbankkit Jul 25, 2023
ca12bb8
'ListValueOf' -> 'ListNestedObjectValueOf' etc.
ewbankkit Jul 25, 2023
cd56c5b
'flattenVisitor.pointer' -> 'flattenVisitor.ptr'.
ewbankkit Jul 25, 2023
05c07e1
Correct source file names.
ewbankkit Jul 25, 2023
d596962
Add 'valueas.go'.
ewbankkit Jul 25, 2023
3991459
'NewListNestedObjectValueOfPtr' -> 'NewListNestedObjectValueOf'.
ewbankkit Jul 25, 2023
cbef86c
Add 'ListNestedObjectValueOf.ValueAsPtr'.
ewbankkit Jul 25, 2023
cdaea2f
'types.List(OfObject) -> *struct' is working.
ewbankkit Jul 25, 2023
5619278
Rename source file.
ewbankkit Jul 26, 2023
551974b
'ValueAsPtr' -> 'ValueWithToPtr'.
ewbankkit Jul 26, 2023
9c6780b
Add 'TypeWithValueFromPtr'.
ewbankkit Jul 26, 2023
2f021e1
'TypeWithValueFromPtr' -> 'TypeWithNewPtr'.
ewbankkit Jul 26, 2023
2dab39d
'ValueWithToPtr' -> 'NestedObjectValue'.
ewbankkit Jul 26, 2023
a9da881
'TypeWithNewPtrValue' -> 'NestedObjectType'.
ewbankkit Jul 26, 2023
b2b6997
Rename some 'NestedObjectType' and 'NestedObjectValue' methods.
ewbankkit Jul 27, 2023
571a8a9
Add 'SetNestedObjectTypeOf' and 'SetNestedObjectValueOf'.
ewbankkit Jul 27, 2023
7174eca
Add 'empty list Source and empty []struct Target' Expand test.
ewbankkit Jul 27, 2023
a6b843c
'NewListNestedObjectValueOf' -> 'NewListNestedObjectValueOfPtr' and t…
ewbankkit Jul 27, 2023
48c8dad
Add 'NestedObjectValue.ToObjectSlice'.
ewbankkit Jul 27, 2023
403a0b3
Add 'nestedObjectValueObjectSlice'.
ewbankkit Jul 27, 2023
5d91623
Add 'nestedObjectValueObjectPtr'.
ewbankkit Jul 27, 2023
c2009e3
flex.Expand: 'types.List(OfObject) -> []struct' working.
ewbankkit Jul 27, 2023
bccc12f
Add 'expandVisitor.nestedObjectToStruct'.
ewbankkit Jul 29, 2023
e389015
Add 'expandVisitor.nestedObjectToSlice'.
ewbankkit Jul 29, 2023
bdbbc71
flex.Expand: 'types.List(OfObject) -> []*struct' working.
ewbankkit Jul 29, 2023
2da801a
Replace 'expandVisitor.listOfObject' with 'expandVisitor.nestedObject'.
ewbankkit Jul 29, 2023
edfe2cb
flex.Expand: 'types.Set(OfObject) -> [](*)struct' working.
ewbankkit Jul 29, 2023
ff50f43
Run 'make fmt'.
ewbankkit Jul 29, 2023
dfda33f
Add 'flattenVisitor.ptrToStructNestedObject'.
ewbankkit Jul 30, 2023
f644193
Add 'NewObjectSlice' and 'NewObjectValueSlice' to 'NestedObjectType' …
ewbankkit Jul 30, 2023
d7fc476
Remove 'NewObjectValueSlice' from 'NestedObjectType' interface.
ewbankkit Jul 30, 2023
7f902f1
Add 'ValueFromObjectSlice' to 'NestedObjectType' interface.
ewbankkit Jul 30, 2023
322cb9a
Add 'flattenVisitor.sliceOfStructNestedObject'.
ewbankkit Jul 30, 2023
e816888
Flatten []*struct -> types.List(OfObject).
ewbankkit Jul 30, 2023
7e83b5a
flex.Flatten: '[](*)struct -> types.[List|Set](OfObject)' working.
ewbankkit Jul 30, 2023
47ed2fa
Add TODOs.
ewbankkit Jul 30, 2023
7f47ccb
Run 'make fmt'.
ewbankkit Jul 30, 2023
8fd9816
Fix golangci-lint 'unparam'.
ewbankkit Jul 30, 2023
ec5b5fd
Fix golangci-lint 'unparam'.
ewbankkit Jul 30, 2023
75f4fdc
Merge branch 'main' into f-further-auto-flex
ewbankkit Jul 31, 2023
70ed664
framework/flex: Start to consolidate Flatten and Expand tests.
ewbankkit Jul 31, 2023
f7b4147
framework/flex: More consolidation of Flatten and Expand tests.
ewbankkit Jul 31, 2023
4773db3
Work around float32/float64 comparison.
ewbankkit Jul 31, 2023
4ac2070
framework/flex: Consolidate primitive type list/set/map Flatten and E…
ewbankkit Aug 1, 2023
5e1efd3
framework/flex: Consolidate *struct Flatten and Expand tests.
ewbankkit Aug 1, 2023
00cfcee
framework/flex: Consolidate nested object Flatten and Expand tests.
ewbankkit Aug 1, 2023
4685ad2
framework/flex: Complex nested object Flatten and Expand tests.
ewbankkit Aug 1, 2023
7947f1d
Merge branch 'main' into f-further-auto-flex
ewbankkit Aug 4, 2023
603de5d
framework/flex/Expand: Log incompatible types rather than returing er…
ewbankkit Aug 4, 2023
0da40a2
Use 'fwtypes' alias.
ewbankkit Aug 4, 2023
97a3a6c
framework/flex/Flatten: Log incompatible types rather than returing e…
ewbankkit Aug 4, 2023
382d286
r/aws_ec2_instance_connect_endpoint: Use 'flex.Expand'.
ewbankkit Aug 4, 2023
9e286f5
Fix golangci-lint 'unparam'.
ewbankkit Aug 4, 2023
f786e5b
Merge branch 'main' into f-further-auto-flex
ewbankkit Aug 16, 2023
7bc70e6
Consolidate into 'autoflex()test).go'.
ewbankkit Aug 16, 2023
7fa9e1e
Add 'autoFlexer' interface and 'AutoFlexOptionsFunc' for functional o…
ewbankkit Aug 16, 2023
8ff132f
Add 'autoExpander' and 'autoFlattener' structures.
ewbankkit Aug 16, 2023
209cd98
Remove 'withLegacyMode'.
ewbankkit Aug 16, 2023
66eff23
AutoFlex: Replace use of 'ExpandFrameworkStringValueList' and 'Expand…
ewbankkit Aug 16, 2023
0a1a241
AutoFlex: Replace use of 'ExpandFrameworkStringValueSet' and 'ExpandF…
ewbankkit Aug 16, 2023
3948826
AutoFlex: Replace use of 'ExpandFrameworkStringValueMap' and 'ExpandF…
ewbankkit Aug 16, 2023
54eea8e
AutoFlex: Replace use of 'FlattenFrameworkStringValueList' and 'Flatt…
ewbankkit Aug 16, 2023
a4b831e
AutoFlex: Replace use of 'FlattenFrameworkStringValueSet' and 'Flatte…
ewbankkit Aug 16, 2023
0255218
AutoFlex: Replace use of 'FlattenFrameworkStringValueMap' and 'Flatte…
ewbankkit Aug 16, 2023
85c8c5c
Use Framework 'ValueXYZPointer()' instead of 'aws.XYZ()'.
ewbankkit Aug 16, 2023
485754d
Use Framework 'types.StringPointerValue()'.
ewbankkit Aug 16, 2023
d3a6ef0
'expandVisitor' -> 'autoExpander' and 'flattenVisitor' -> 'autoFlatte…
ewbankkit Aug 16, 2023
d2e777c
AutoFlex: 'copy' -> 'convert'.
ewbankkit Aug 17, 2023
25e8220
AutoFlex: Expand/Flatten can handle more that struct-to-struct conver…
ewbankkit Aug 17, 2023
4a29a39
Additional test.
ewbankkit Aug 17, 2023
a85a6eb
Merge branch 'main' into f-further-auto-flex
ewbankkit Aug 17, 2023
e2619b4
Fix golangci-lint 'unparam'.
ewbankkit Aug 17, 2023
98dc0f5
Fix golangci-lint 'nolintlint'.
ewbankkit Aug 17, 2023
7f2baad
Update comments.
ewbankkit Aug 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,242 changes: 1,242 additions & 0 deletions internal/framework/flex/autoflex.go

Large diffs are not rendered by default.

779 changes: 779 additions & 0 deletions internal/framework/flex/autoflex_test.go

Large diffs are not rendered by default.

196 changes: 0 additions & 196 deletions internal/framework/flex/expand.go

This file was deleted.

Loading