wip: init go provider

This commit is contained in:
2025-12-06 01:34:42 -05:00
parent ce4fee82c0
commit ef3fde0b79
40 changed files with 10962 additions and 181 deletions

38
sdk/go/incus/config/config.go generated Normal file
View File

@@ -0,0 +1,38 @@
// 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 config
import (
"git.kalinow.ski/nimbus/pulumi-incus/sdk/go/incus/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
var _ = internal.GetEnvOrDefault
// Accept the server certificate.
func GetAcceptRemoteCertificate(ctx *pulumi.Context) bool {
return config.GetBool(ctx, "incus:acceptRemoteCertificate")
}
// The directory to look for existing Incus configuration. (default = $HOME/.config/incus)
func GetConfigDir(ctx *pulumi.Context) string {
return config.Get(ctx, "incus:configDir")
}
// Automatically generate the Incus client certificates if they don't exist.
func GetGenerateClientCertificates(ctx *pulumi.Context) bool {
return config.GetBool(ctx, "incus:generateClientCertificates")
}
// The project where project-scoped resources will be created. Can be overridden in individual resources. (default =
// default)
func GetProject(ctx *pulumi.Context) string {
return config.Get(ctx, "incus:project")
}
// Incus Remote
func GetRemotes(ctx *pulumi.Context) string {
return config.Get(ctx, "incus:remotes")
}

163
sdk/go/incus/config/pulumiTypes.go generated Normal file
View File

@@ -0,0 +1,163 @@
// 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 config
import (
"context"
"reflect"
"git.kalinow.ski/nimbus/pulumi-incus/sdk/go/incus/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
var _ = internal.GetEnvOrDefault
type Remotes struct {
// The FQDN or IP where the Incus daemon can be contacted. (default = "" (read from lxc config))
Address *string `pulumi:"address"`
// Set this remote as default.
Default *bool `pulumi:"default"`
// Name of the Incus remote. Required when incusScheme set to https, to enable locating server certificate.
Name string `pulumi:"name"`
// Port Incus Daemon API is listening on. (default = 8443)
Port *string `pulumi:"port"`
// Unix (unix) or HTTPs (https). (default = unix)
Scheme *string `pulumi:"scheme"`
// The trust token for the remote.
Token *string `pulumi:"token"`
}
// RemotesInput is an input type that accepts RemotesArgs and RemotesOutput values.
// You can construct a concrete instance of `RemotesInput` via:
//
// RemotesArgs{...}
type RemotesInput interface {
pulumi.Input
ToRemotesOutput() RemotesOutput
ToRemotesOutputWithContext(context.Context) RemotesOutput
}
type RemotesArgs struct {
// The FQDN or IP where the Incus daemon can be contacted. (default = "" (read from lxc config))
Address pulumi.StringPtrInput `pulumi:"address"`
// Set this remote as default.
Default pulumi.BoolPtrInput `pulumi:"default"`
// Name of the Incus remote. Required when incusScheme set to https, to enable locating server certificate.
Name pulumi.StringInput `pulumi:"name"`
// Port Incus Daemon API is listening on. (default = 8443)
Port pulumi.StringPtrInput `pulumi:"port"`
// Unix (unix) or HTTPs (https). (default = unix)
Scheme pulumi.StringPtrInput `pulumi:"scheme"`
// The trust token for the remote.
Token pulumi.StringPtrInput `pulumi:"token"`
}
func (RemotesArgs) ElementType() reflect.Type {
return reflect.TypeOf((*Remotes)(nil)).Elem()
}
func (i RemotesArgs) ToRemotesOutput() RemotesOutput {
return i.ToRemotesOutputWithContext(context.Background())
}
func (i RemotesArgs) ToRemotesOutputWithContext(ctx context.Context) RemotesOutput {
return pulumi.ToOutputWithContext(ctx, i).(RemotesOutput)
}
// RemotesArrayInput is an input type that accepts RemotesArray and RemotesArrayOutput values.
// You can construct a concrete instance of `RemotesArrayInput` via:
//
// RemotesArray{ RemotesArgs{...} }
type RemotesArrayInput interface {
pulumi.Input
ToRemotesArrayOutput() RemotesArrayOutput
ToRemotesArrayOutputWithContext(context.Context) RemotesArrayOutput
}
type RemotesArray []RemotesInput
func (RemotesArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]Remotes)(nil)).Elem()
}
func (i RemotesArray) ToRemotesArrayOutput() RemotesArrayOutput {
return i.ToRemotesArrayOutputWithContext(context.Background())
}
func (i RemotesArray) ToRemotesArrayOutputWithContext(ctx context.Context) RemotesArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(RemotesArrayOutput)
}
type RemotesOutput struct{ *pulumi.OutputState }
func (RemotesOutput) ElementType() reflect.Type {
return reflect.TypeOf((*Remotes)(nil)).Elem()
}
func (o RemotesOutput) ToRemotesOutput() RemotesOutput {
return o
}
func (o RemotesOutput) ToRemotesOutputWithContext(ctx context.Context) RemotesOutput {
return o
}
// The FQDN or IP where the Incus daemon can be contacted. (default = "" (read from lxc config))
func (o RemotesOutput) Address() pulumi.StringPtrOutput {
return o.ApplyT(func(v Remotes) *string { return v.Address }).(pulumi.StringPtrOutput)
}
// Set this remote as default.
func (o RemotesOutput) Default() pulumi.BoolPtrOutput {
return o.ApplyT(func(v Remotes) *bool { return v.Default }).(pulumi.BoolPtrOutput)
}
// Name of the Incus remote. Required when incusScheme set to https, to enable locating server certificate.
func (o RemotesOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v Remotes) string { return v.Name }).(pulumi.StringOutput)
}
// Port Incus Daemon API is listening on. (default = 8443)
func (o RemotesOutput) Port() pulumi.StringPtrOutput {
return o.ApplyT(func(v Remotes) *string { return v.Port }).(pulumi.StringPtrOutput)
}
// Unix (unix) or HTTPs (https). (default = unix)
func (o RemotesOutput) Scheme() pulumi.StringPtrOutput {
return o.ApplyT(func(v Remotes) *string { return v.Scheme }).(pulumi.StringPtrOutput)
}
// The trust token for the remote.
func (o RemotesOutput) Token() pulumi.StringPtrOutput {
return o.ApplyT(func(v Remotes) *string { return v.Token }).(pulumi.StringPtrOutput)
}
type RemotesArrayOutput struct{ *pulumi.OutputState }
func (RemotesArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]Remotes)(nil)).Elem()
}
func (o RemotesArrayOutput) ToRemotesArrayOutput() RemotesArrayOutput {
return o
}
func (o RemotesArrayOutput) ToRemotesArrayOutputWithContext(ctx context.Context) RemotesArrayOutput {
return o
}
func (o RemotesArrayOutput) Index(i pulumi.IntInput) RemotesOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) Remotes {
return vs[0].([]Remotes)[vs[1].(int)]
}).(RemotesOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*RemotesInput)(nil)).Elem(), RemotesArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*RemotesArrayInput)(nil)).Elem(), RemotesArray{})
pulumi.RegisterOutputType(RemotesOutput{})
pulumi.RegisterOutputType(RemotesArrayOutput{})
}