-
Notifications
You must be signed in to change notification settings - Fork 9
/
getIssueLabels.go
94 lines (77 loc) · 3.34 KB
/
getIssueLabels.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// 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 github
import (
"context"
"reflect"
"github.com/pulumi/pulumi-github/sdk/v6/go/github/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to retrieve the labels for a given repository.
func LookupIssueLabels(ctx *pulumi.Context, args *LookupIssueLabelsArgs, opts ...pulumi.InvokeOption) (*LookupIssueLabelsResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupIssueLabelsResult
err := ctx.Invoke("github:index/getIssueLabels:getIssueLabels", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getIssueLabels.
type LookupIssueLabelsArgs struct {
// The name of the repository.
Repository string `pulumi:"repository"`
}
// A collection of values returned by getIssueLabels.
type LookupIssueLabelsResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The list of this repository's labels. Each element of `labels` has the following attributes:
Labels []GetIssueLabelsLabel `pulumi:"labels"`
Repository string `pulumi:"repository"`
}
func LookupIssueLabelsOutput(ctx *pulumi.Context, args LookupIssueLabelsOutputArgs, opts ...pulumi.InvokeOption) LookupIssueLabelsResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupIssueLabelsResult, error) {
args := v.(LookupIssueLabelsArgs)
r, err := LookupIssueLabels(ctx, &args, opts...)
var s LookupIssueLabelsResult
if r != nil {
s = *r
}
return s, err
}).(LookupIssueLabelsResultOutput)
}
// A collection of arguments for invoking getIssueLabels.
type LookupIssueLabelsOutputArgs struct {
// The name of the repository.
Repository pulumi.StringInput `pulumi:"repository"`
}
func (LookupIssueLabelsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupIssueLabelsArgs)(nil)).Elem()
}
// A collection of values returned by getIssueLabels.
type LookupIssueLabelsResultOutput struct{ *pulumi.OutputState }
func (LookupIssueLabelsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupIssueLabelsResult)(nil)).Elem()
}
func (o LookupIssueLabelsResultOutput) ToLookupIssueLabelsResultOutput() LookupIssueLabelsResultOutput {
return o
}
func (o LookupIssueLabelsResultOutput) ToLookupIssueLabelsResultOutputWithContext(ctx context.Context) LookupIssueLabelsResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupIssueLabelsResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupIssueLabelsResult) string { return v.Id }).(pulumi.StringOutput)
}
// The list of this repository's labels. Each element of `labels` has the following attributes:
func (o LookupIssueLabelsResultOutput) Labels() GetIssueLabelsLabelArrayOutput {
return o.ApplyT(func(v LookupIssueLabelsResult) []GetIssueLabelsLabel { return v.Labels }).(GetIssueLabelsLabelArrayOutput)
}
func (o LookupIssueLabelsResultOutput) Repository() pulumi.StringOutput {
return o.ApplyT(func(v LookupIssueLabelsResult) string { return v.Repository }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupIssueLabelsResultOutput{})
}