-
Notifications
You must be signed in to change notification settings - Fork 59
/
managedJob.go
37 lines (28 loc) · 991 Bytes
/
managedJob.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
package managedjob
import (
"github.com/spf13/cobra"
)
func NewManagedJobCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "managedjob",
Aliases: []string{"managedJob", "managedjob", "managedjobs"},
Short: "Backplane managedjob resource which is an instance of Backplane script",
SilenceUsage: true,
}
// url flag
// Denotes backplane url
// If this flag is empty, backplane-url will be fetched by the user local settings. either via BACKPLANE_URL env or ~/backplane.{env}.json file
cmd.PersistentFlags().String(
"url",
"",
"Specify backplane url.",
)
// cluster-id Flag
cmd.PersistentFlags().StringP("cluster-id", "c", "", "Cluster ID could be cluster name, id or external-id")
// raw Flag
cmd.PersistentFlags().Bool("raw", false, "Prints the raw response returned by the backplane API")
cmd.AddCommand(newCreateManagedJobCmd(), newGetManagedJobCmd(), newDeleteManagedJobCmd(), newLogsManagedJobCmd())
return cmd
}
func init() {
}