Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "operations", Aliases: []string{"ops"}, Short: "View Apigee Operations", Long: "View Apigee Operations", }
Cmd to manage ops
View Source
var GetCmd = &cobra.Command{ Use: "get", Short: "Get operation of an org", Long: "Get operation of an org", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = operations.Get(name) return }, }
GetCmd to get ops details
View Source
var ListCmd = &cobra.Command{ Use: "list", Short: "List operations in an Apigee Org", Long: "List operations in an Apigee Org", Args: func(cmd *cobra.Command, args []string) (err error) { if state == "" && completeState != "" { return fmt.Errorf("both state and completeState must be passed") } if completeState != "Success" && completeState != "Failed" && completeState != "Both" && completeState != "" { return fmt.Errorf("completeState must be oneOf: Success, Failed, Both or empty") } if state != "IN_PROGRESS" && state != "FINISHED" && state != "ERROR" { return fmt.Errorf("state must be oneOf IN_PROGRESS, FINISHED or ERROR") } return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { if completeState == "Success" { _, err = operations.List(state, operations.Success) } else if completeState == "Failed" { _, err = operations.List(state, operations.Failed) } else { _, err = operations.List(state, operations.Both) } return err }, }
ListCmd to list envs
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.