-
Notifications
You must be signed in to change notification settings - Fork 0
/
getUser.go
93 lines (88 loc) · 2.55 KB
/
getUser.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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package github
import (
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Use this data source to retrieve information about a GitHub user.
//
// > This content is derived from https://github.com/terraform-providers/terraform-provider-github/blob/master/website/docs/d/user.html.markdown.
func LookupUser(ctx *pulumi.Context, args *GetUserArgs) (*GetUserResult, error) {
inputs := make(map[string]interface{})
if args != nil {
inputs["username"] = args.Username
}
outputs, err := ctx.Invoke("github:index/getUser:getUser", inputs)
if err != nil {
return nil, err
}
return &GetUserResult{
AvatarUrl: outputs["avatarUrl"],
Bio: outputs["bio"],
Blog: outputs["blog"],
Company: outputs["company"],
CreatedAt: outputs["createdAt"],
Email: outputs["email"],
Followers: outputs["followers"],
Following: outputs["following"],
GpgKeys: outputs["gpgKeys"],
GravatarId: outputs["gravatarId"],
Location: outputs["location"],
Login: outputs["login"],
Name: outputs["name"],
PublicGists: outputs["publicGists"],
PublicRepos: outputs["publicRepos"],
SiteAdmin: outputs["siteAdmin"],
SshKeys: outputs["sshKeys"],
UpdatedAt: outputs["updatedAt"],
Username: outputs["username"],
Id: outputs["id"],
}, nil
}
// A collection of arguments for invoking getUser.
type GetUserArgs struct {
// The username.
Username interface{}
}
// A collection of values returned by getUser.
type GetUserResult struct {
// the user's avatar URL.
AvatarUrl interface{}
// the user's bio.
Bio interface{}
// the user's blog location.
Blog interface{}
// the user's company name.
Company interface{}
// the creation date.
CreatedAt interface{}
// the user's email.
Email interface{}
// the number of followers.
Followers interface{}
// the number of following users.
Following interface{}
// list of user's GPG keys
GpgKeys interface{}
// the user's gravatar ID.
GravatarId interface{}
// the user's location.
Location interface{}
// the user's login.
Login interface{}
// the user's full name.
Name interface{}
// the number of public gists.
PublicGists interface{}
// the number of public repositories.
PublicRepos interface{}
// whether the user is a GitHub admin.
SiteAdmin interface{}
// list of user's SSH keys
SshKeys interface{}
// the update date.
UpdatedAt interface{}
Username interface{}
// id is the provider-assigned unique ID for this managed resource.
Id interface{}
}