-
Notifications
You must be signed in to change notification settings - Fork 97
fwserver: add ListResource
method
#1153
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
fwserver: add ListResource
method
#1153
Conversation
4640688
to
b7fea91
Compare
1da956e
to
70aac24
Compare
b7fea91
to
b941cae
Compare
70aac24
to
d6776b3
Compare
b941cae
to
73392ce
Compare
be455ea
to
7691bb8
Compare
49f3d27
to
53f6a7c
Compare
84bb222
to
78fc148
Compare
// processListResult validates the content of a list.ListResult and returns a | ||
// ListResult | ||
func processListResult(req list.ListRequest, result list.ListResult) ListResult { | ||
if result.Identity == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: needs tests
} | ||
} | ||
|
||
if req.IncludeResource && result.Resource == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: needs tests
type ListResourceStream struct { | ||
// Results is a function that emits ListResult values via its push | ||
// function argument. | ||
Results iter.Seq[ListResult] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💭 A follow-up enhancement: what if a (List) Resource uses its data model instead of ListResult
here? and Framework uses fwschemadata
to transform the data model into a ListResult
Terraform value?
Results iter.Seq[ListResult] | |
Results iter.Seq[any-ish] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if a (List) Resource uses its data model
... and also, what if a List Resource "encapsulates" an SDKv2 managed resource, so it has no existing data model? is this still useful?
Closing in favor of #1157. |
Description
To merge after #1152. This pull request adds a
ListResource
implementation to the protocol-independent framework server.Rollback Plan
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.