pulumi/pkg/tools/lumidl
joeduffy 5f9ed13069 Simplify Check; make it tolerant of computed values
This change simplifies the generated Check interface for providers.
Instead of

    Check(ctx context.Context, obj *T) ([]error, error)

where T is the resource type, we have

    Check(ctx context.Context, obj *T, property string) error

This is done so that we can drive the calls to Check one property
at a time, allowing us to skip any that are computed.  (Otherwise,
we may fail the verification erroneously.)

This has the added advantage that the Check implementations are
simpler and can simply return a single error.  Furthermore, the
generated RPC code handles wrapping the result, so we can just do

    return errors.New("bad");

rather than the previous reflection-laden junk

    return resource.NewFieldError(
        reflect.TypeOf(obj), awsservice.AWSResource_Property,
        errors.New("bad"))
2017-06-16 13:34:11 -07:00
..
check.go More progress on pulumi/lumi#90 2017-06-13 07:10:13 -07:00
compile.go A few tweaks to lint fixes 2017-06-13 16:47:55 -07:00
diag.go Fixed various additional linting issues 2017-06-08 10:21:17 -07:00
gen.go Added specified changes 2017-06-09 12:51:31 -07:00
gen_pack.go Model resource ID and URN as output properties 2017-06-14 17:00:13 -07:00
gen_rpc.go Simplify Check; make it tolerant of computed values 2017-06-16 13:34:11 -07:00
options.go More progress on pulumi/lumi#90 2017-06-13 07:10:13 -07:00
package.go
paths.go
types.go