wip: init go provider
This commit is contained in:
199
sdk/go/incus/init.go
generated
Normal file
199
sdk/go/incus/init.go
generated
Normal file
@@ -0,0 +1,199 @@
|
||||
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
|
||||
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package incus
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.kalinow.ski/nimbus/pulumi-incus/sdk/go/incus/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 "incus:index/certificate:Certificate":
|
||||
r = &Certificate{}
|
||||
case "incus:index/clusterGroup:ClusterGroup":
|
||||
r = &ClusterGroup{}
|
||||
case "incus:index/clusterGroupAssignment:ClusterGroupAssignment":
|
||||
r = &ClusterGroupAssignment{}
|
||||
case "incus:index/image:Image":
|
||||
r = &Image{}
|
||||
case "incus:index/instance:Instance":
|
||||
r = &Instance{}
|
||||
case "incus:index/instanceSnapshot:InstanceSnapshot":
|
||||
r = &InstanceSnapshot{}
|
||||
case "incus:index/network:Network":
|
||||
r = &Network{}
|
||||
case "incus:index/networkAcl:NetworkAcl":
|
||||
r = &NetworkAcl{}
|
||||
case "incus:index/networkForward:NetworkForward":
|
||||
r = &NetworkForward{}
|
||||
case "incus:index/networkIntegration:NetworkIntegration":
|
||||
r = &NetworkIntegration{}
|
||||
case "incus:index/networkLoadBalancer:NetworkLoadBalancer":
|
||||
r = &NetworkLoadBalancer{}
|
||||
case "incus:index/networkPeer:NetworkPeer":
|
||||
r = &NetworkPeer{}
|
||||
case "incus:index/networkZone:NetworkZone":
|
||||
r = &NetworkZone{}
|
||||
case "incus:index/networkZoneRecord:NetworkZoneRecord":
|
||||
r = &NetworkZoneRecord{}
|
||||
case "incus:index/profile:Profile":
|
||||
r = &Profile{}
|
||||
case "incus:index/project:Project":
|
||||
r = &Project{}
|
||||
case "incus:index/storageBucket:StorageBucket":
|
||||
r = &StorageBucket{}
|
||||
case "incus:index/storageBucketKey:StorageBucketKey":
|
||||
r = &StorageBucketKey{}
|
||||
case "incus:index/storagePool:StoragePool":
|
||||
r = &StoragePool{}
|
||||
case "incus:index/storageVolume:StorageVolume":
|
||||
r = &StorageVolume{}
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown resource type: %s", typ)
|
||||
}
|
||||
|
||||
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
|
||||
return
|
||||
}
|
||||
|
||||
type pkg struct {
|
||||
version semver.Version
|
||||
}
|
||||
|
||||
func (p *pkg) Version() semver.Version {
|
||||
return p.version
|
||||
}
|
||||
|
||||
func (p *pkg) ConstructProvider(ctx *pulumi.Context, name, typ, urn string) (pulumi.ProviderResource, error) {
|
||||
if typ != "pulumi:providers:incus" {
|
||||
return nil, fmt.Errorf("unknown provider type: %s", typ)
|
||||
}
|
||||
|
||||
r := &Provider{}
|
||||
err := ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
|
||||
return r, err
|
||||
}
|
||||
|
||||
func init() {
|
||||
version, err := internal.PkgVersion()
|
||||
if err != nil {
|
||||
version = semver.Version{Major: 1}
|
||||
}
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/certificate",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/clusterGroup",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/clusterGroupAssignment",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/image",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/instance",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/instanceSnapshot",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/network",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/networkAcl",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/networkForward",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/networkIntegration",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/networkLoadBalancer",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/networkPeer",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/networkZone",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/networkZoneRecord",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/profile",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/project",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/storageBucket",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/storageBucketKey",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/storagePool",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourceModule(
|
||||
"incus",
|
||||
"index/storageVolume",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourcePackage(
|
||||
"incus",
|
||||
&pkg{version},
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user