pulumi/sdk/go/pulumi-language-go/testdata/sdks/config-grpc-1.0.0/configgrpc/configFetcher.go

111 lines
3.2 KiB
Go

// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package configgrpc
import (
"context"
"reflect"
"example.com/pulumi-config-grpc/sdk/go/configgrpc/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type ConfigFetcher struct {
pulumi.CustomResourceState
Config pulumi.StringOutput `pulumi:"config"`
}
// NewConfigFetcher registers a new resource with the given unique name, arguments, and options.
func NewConfigFetcher(ctx *pulumi.Context,
name string, args *ConfigFetcherArgs, opts ...pulumi.ResourceOption) (*ConfigFetcher, error) {
if args == nil {
args = &ConfigFetcherArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ConfigFetcher
err := ctx.RegisterResource("config-grpc:index:ConfigFetcher", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetConfigFetcher gets an existing ConfigFetcher resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetConfigFetcher(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ConfigFetcherState, opts ...pulumi.ResourceOption) (*ConfigFetcher, error) {
var resource ConfigFetcher
err := ctx.ReadResource("config-grpc:index:ConfigFetcher", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ConfigFetcher resources.
type configFetcherState struct {
}
type ConfigFetcherState struct {
}
func (ConfigFetcherState) ElementType() reflect.Type {
return reflect.TypeOf((*configFetcherState)(nil)).Elem()
}
type configFetcherArgs struct {
}
// The set of arguments for constructing a ConfigFetcher resource.
type ConfigFetcherArgs struct {
}
func (ConfigFetcherArgs) ElementType() reflect.Type {
return reflect.TypeOf((*configFetcherArgs)(nil)).Elem()
}
type ConfigFetcherInput interface {
pulumi.Input
ToConfigFetcherOutput() ConfigFetcherOutput
ToConfigFetcherOutputWithContext(ctx context.Context) ConfigFetcherOutput
}
func (*ConfigFetcher) ElementType() reflect.Type {
return reflect.TypeOf((**ConfigFetcher)(nil)).Elem()
}
func (i *ConfigFetcher) ToConfigFetcherOutput() ConfigFetcherOutput {
return i.ToConfigFetcherOutputWithContext(context.Background())
}
func (i *ConfigFetcher) ToConfigFetcherOutputWithContext(ctx context.Context) ConfigFetcherOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigFetcherOutput)
}
type ConfigFetcherOutput struct{ *pulumi.OutputState }
func (ConfigFetcherOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ConfigFetcher)(nil)).Elem()
}
func (o ConfigFetcherOutput) ToConfigFetcherOutput() ConfigFetcherOutput {
return o
}
func (o ConfigFetcherOutput) ToConfigFetcherOutputWithContext(ctx context.Context) ConfigFetcherOutput {
return o
}
func (o ConfigFetcherOutput) Config() pulumi.StringOutput {
return o.ApplyT(func(v *ConfigFetcher) pulumi.StringOutput { return v.Config }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ConfigFetcherInput)(nil)).Elem(), &ConfigFetcher{})
pulumi.RegisterOutputType(ConfigFetcherOutput{})
}