Commit Graph

5 Commits

Author SHA1 Message Date
Pat Gavlin 227524e03b
[resource] Add a generic NewProperty function ()
These changes add a generic package-level function to resource,
NewProperty, that creates a new PropertyValue from a plain value.

The primary value of these changes for the time being is the
introduction of the PropertyValueType interface, which documents the
possible types that may be contained in a PropertyValue.

In future changes I would like to unexport PropertyValue.V and replace
it with an exported method, `func (PropertyValue) Value() any`, that
prevents the consumer from sticking unexpected types in a
`PropertyValue`.

Someday maybe Go will have sum types and we can all be happy.
2023-11-11 21:12:17 +00:00
Aaron Friel ed2923653c ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
Justin Van Patten 0c0684af5c
Initial support for (un)marshaling output values ()
This change expands the definition of `resource.Output` in the Go SDK with additional information about the output, i.e. dependencies and secretness, and adds support in the core Go RPC code for (un)marshaling output values.

Output values are marshaled as special objects ala archives, assets, and resource refs and are unmarshaled as `resource.Output` values.

Subsequent PRs will add:
 - A monitor feature for output values, which will initially be disabled by default but available to turn on via an envvar
 - Support for (un)marshaling output values in each language SDKs
 - A way for providers to indicate support for receiving output values
 - E2E tests
 - Turn the monitor feature on by default (w/ env var to disable) (Note: the current plan is to initially scope this to only be used when marshaling inputs to a multi-language component)
2021-09-13 09:05:31 -07:00
Evan Boyle 9d2f40b686
fix unknown status for secrets wrapping unknowns ()
* fix unknown status for secrets wrapping unknowns

* changelog

* add test for secret computed values
2020-04-13 22:47:08 +01:00
evanboyle fba783caf9 move pkg/resource -> sdk/go/common/resource, but leave nested resource packages 2020-03-18 13:36:19 -07:00