github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/output-funcs/go/mypkg/funcWithEmptyOutputs.go (about)

     1  // Code generated by test DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package mypkg
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    11  )
    12  
    13  // n/a
    14  func FuncWithEmptyOutputs(ctx *pulumi.Context, args *FuncWithEmptyOutputsArgs, opts ...pulumi.InvokeOption) (*FuncWithEmptyOutputsResult, error) {
    15  	var rv FuncWithEmptyOutputsResult
    16  	err := ctx.Invoke("mypkg::funcWithEmptyOutputs", args, &rv, opts...)
    17  	if err != nil {
    18  		return nil, err
    19  	}
    20  	return &rv, nil
    21  }
    22  
    23  type FuncWithEmptyOutputsArgs struct {
    24  	// The Name of the FeatureGroup.
    25  	Name string `pulumi:"name"`
    26  }
    27  
    28  type FuncWithEmptyOutputsResult struct {
    29  }
    30  
    31  func FuncWithEmptyOutputsOutput(ctx *pulumi.Context, args FuncWithEmptyOutputsOutputArgs, opts ...pulumi.InvokeOption) FuncWithEmptyOutputsResultOutput {
    32  	return pulumi.ToOutputWithContext(context.Background(), args).
    33  		ApplyT(func(v interface{}) (FuncWithEmptyOutputsResult, error) {
    34  			args := v.(FuncWithEmptyOutputsArgs)
    35  			r, err := FuncWithEmptyOutputs(ctx, &args, opts...)
    36  			var s FuncWithEmptyOutputsResult
    37  			if r != nil {
    38  				s = *r
    39  			}
    40  			return s, err
    41  		}).(FuncWithEmptyOutputsResultOutput)
    42  }
    43  
    44  type FuncWithEmptyOutputsOutputArgs struct {
    45  	// The Name of the FeatureGroup.
    46  	Name pulumi.StringInput `pulumi:"name"`
    47  }
    48  
    49  func (FuncWithEmptyOutputsOutputArgs) ElementType() reflect.Type {
    50  	return reflect.TypeOf((*FuncWithEmptyOutputsArgs)(nil)).Elem()
    51  }
    52  
    53  type FuncWithEmptyOutputsResultOutput struct{ *pulumi.OutputState }
    54  
    55  func (FuncWithEmptyOutputsResultOutput) ElementType() reflect.Type {
    56  	return reflect.TypeOf((*FuncWithEmptyOutputsResult)(nil)).Elem()
    57  }
    58  
    59  func (o FuncWithEmptyOutputsResultOutput) ToFuncWithEmptyOutputsResultOutput() FuncWithEmptyOutputsResultOutput {
    60  	return o
    61  }
    62  
    63  func (o FuncWithEmptyOutputsResultOutput) ToFuncWithEmptyOutputsResultOutputWithContext(ctx context.Context) FuncWithEmptyOutputsResultOutput {
    64  	return o
    65  }
    66  
    67  func init() {
    68  	pulumi.RegisterOutputType(FuncWithEmptyOutputsResultOutput{})
    69  }