/
lower.go
74 lines (59 loc) · 1.87 KB
/
lower.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// 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 std
import (
"context"
"reflect"
"github.com/pulumi/pulumi-std/sdk/go/std/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Returns a copy of the string with all Unicode letters mapped to their lower case.
func Lower(ctx *pulumi.Context, args *LowerArgs, opts ...pulumi.InvokeOption) (*LowerResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LowerResult
err := ctx.Invoke("std:index:lower", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LowerArgs struct {
Input string `pulumi:"input"`
}
type LowerResult struct {
Result string `pulumi:"result"`
}
func LowerOutput(ctx *pulumi.Context, args LowerOutputArgs, opts ...pulumi.InvokeOption) LowerResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LowerResult, error) {
args := v.(LowerArgs)
r, err := Lower(ctx, &args, opts...)
var s LowerResult
if r != nil {
s = *r
}
return s, err
}).(LowerResultOutput)
}
type LowerOutputArgs struct {
Input pulumi.StringInput `pulumi:"input"`
}
func (LowerOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LowerArgs)(nil)).Elem()
}
type LowerResultOutput struct{ *pulumi.OutputState }
func (LowerResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LowerResult)(nil)).Elem()
}
func (o LowerResultOutput) ToLowerResultOutput() LowerResultOutput {
return o
}
func (o LowerResultOutput) ToLowerResultOutputWithContext(ctx context.Context) LowerResultOutput {
return o
}
func (o LowerResultOutput) Result() pulumi.StringOutput {
return o.ApplyT(func(v LowerResult) string { return v.Result }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LowerResultOutput{})
}