mirror of https://github.com/pulumi/pulumi.git
47 lines
999 B
Go
47 lines
999 B
Go
// Code generated by test DO NOT EDIT.
|
|
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
|
|
|
package submodule1
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"dash-named-schema/foo/internal"
|
|
"github.com/blang/semver"
|
|
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
|
)
|
|
|
|
type module struct {
|
|
version semver.Version
|
|
}
|
|
|
|
func (m *module) Version() semver.Version {
|
|
return m.version
|
|
}
|
|
|
|
func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
|
|
switch typ {
|
|
case "foo-bar:submodule1:FOOEncryptedBarClass":
|
|
r = &FOOEncryptedBarClass{}
|
|
case "foo-bar:submodule1:ModuleResource":
|
|
r = &ModuleResource{}
|
|
default:
|
|
return nil, fmt.Errorf("unknown resource type: %s", typ)
|
|
}
|
|
|
|
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
|
|
return
|
|
}
|
|
|
|
func init() {
|
|
version, err := internal.PkgVersion()
|
|
if err != nil {
|
|
version = semver.Version{Major: 1}
|
|
}
|
|
pulumi.RegisterResourceModule(
|
|
"foo-bar",
|
|
"submodule1",
|
|
&module{version},
|
|
)
|
|
}
|