-
Notifications
You must be signed in to change notification settings - Fork 260
Expand file tree
/
Copy pathgcloud.go
More file actions
29 lines (27 loc) · 785 Bytes
/
gcloud.go
File metadata and controls
29 lines (27 loc) · 785 Bytes
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
package gcloud
import (
"github.com/1Password/shell-plugins/sdk"
"github.com/1Password/shell-plugins/sdk/needsauth"
"github.com/1Password/shell-plugins/sdk/schema"
"github.com/1Password/shell-plugins/sdk/schema/credname"
)
func GCloudCLI() schema.Executable {
return schema.Executable{
Name: "Google Cloud CLI",
Runs: []string{"gcloud"},
DocsURL: sdk.URL("https://cloud.google.com/sdk/gcloud"),
NeedsAuth: needsauth.IfAll(
needsauth.NotForHelpOrVersion(),
needsauth.NotWithoutArgs(),
needsauth.NotWhenContainsArgs("auth"),
needsauth.NotWhenContainsArgs("config"),
needsauth.NotWhenContainsArgs("info"),
needsauth.NotWhenContainsArgs("components"),
),
Uses: []schema.CredentialUsage{
{
Name: credname.ServiceAccountKey,
},
},
}
}