File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -6,36 +6,36 @@ import (
6
6
"github.com/dineshgowda24/alfred-gcp-workflow/gcloud"
7
7
)
8
8
9
- type Roleslist struct {
9
+ type Role struct {
10
10
Description string
11
11
Name string
12
12
DisplayTitle string
13
13
}
14
14
15
- func (r Roleslist ) Details () string {
15
+ func (r Role ) Details () string {
16
16
return r .Name
17
17
}
18
18
19
- func (r Roleslist ) Subtitle () string {
19
+ func (r Role ) Subtitle () string {
20
20
return r .Description
21
21
}
22
22
23
- func (r Roleslist ) Title () string {
23
+ func (r Role ) Title () string {
24
24
return r .DisplayTitle
25
25
}
26
26
27
- func (r Roleslist ) URL (config * gcloud.Config ) string {
27
+ func (r Role ) URL (config * gcloud.Config ) string {
28
28
id := r .ID ()
29
29
return "https://console.cloud.google.com/iam-admin/roles/details/" + id + "?project=" + config .Project
30
30
31
31
}
32
32
33
- func (r Roleslist ) ID () string {
33
+ func (r Role ) ID () string {
34
34
parts := strings .ReplaceAll (r .Name , "/" , "%2F" )
35
35
return parts
36
36
}
37
- func FromGCloudIAMRoles (roles * gcloud.IAMRole ) Roleslist {
38
- return Roleslist {
37
+ func FromGCloudIAMRoles (roles * gcloud.IAMRole ) Role {
38
+ return Role {
39
39
Description : roles .Description ,
40
40
Name : roles .Name ,
41
41
DisplayTitle : roles .Title ,
File renamed without changes.
You can’t perform that action at this time.
0 commit comments