Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AppCmd = &cobra.Command{
Use: "apps",
Short: "Manage apps in an Apigee Application Group",
Long: "Manage apps in an Apigee Application Group",
}
AppCmd to manage apps
var Cmd = &cobra.Command{
Use: "appgroups",
Short: "Manage Apigee Application Groups",
Long: "Manage Apigee Application Groups",
}
Cmd to manage appgroups
var CreateAppCmd = &cobra.Command{ Use: "create", Short: "Create an App", Long: "Create an App in an AppGroup", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { if expires != "" { if _, err = strconv.Atoi(expires); err != nil { return fmt.Errorf("expires must be an integer: %v", err) } expires += "000" } _, err = appgroups.CreateApp(name, appName, expires, callback, apiProducts, scopes, attrs) return }, }
CreateAppCmd to create app
var CreateCmd = &cobra.Command{ Use: "create", Short: "Create an AppGroup", Long: "Create an AppGroup", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = appgroups.Create(name, channelURI, channelID, displayName, attrs, devs) return }, }
CreateCmd to create appgroup
var CreateKeyCmd = &cobra.Command{ Use: "create", Short: "Create an app key", Long: "Create an app key", Args: func(cmd *cobra.Command, args []string) (err error) { if (key != "" && secret == "") || (secret != "" && key == "") { return fmt.Errorf("key and secret must both be passed or neither must be sent") } return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { if expires != "" { if _, err = strconv.Atoi(expires); err != nil { return fmt.Errorf("expires must be an integer: %v", err) } } _, err = appgroups.CreateKey(name, appName, key, secret, expires, apiProducts, scopes, attrs) return }, }
CreateKeyCmd to create developer keys
var DelAppCmd = &cobra.Command{ Use: "delete", Short: "Delete an App in an AppGroup", Long: "Delete an in an AppGroup", Args: func(cmd *cobra.Command, args []string) error { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = appgroups.DeleteApp(name, appName) return err }, }
DelAppCmd to get app
var DelCmd = &cobra.Command{ Use: "delete", Short: "Delete AppGroup in an Organization by AppGroup Name", Long: "Delete AppGroup in an Organization by AppGroup Name", Args: func(cmd *cobra.Command, args []string) error { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = appgroups.Delete(name) return err }, }
DelCmd to get appgroup
var DelKeyCmd = &cobra.Command{ Use: "delete", Short: "Deletes a consumer key for a AppGroup app", Long: "Deletes a consumer key for a AppGroup app", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = appgroups.DeleteKey(name, appName, key) return }, }
DelKeyCmd to delete credential
var DelProdKeyCmd = &cobra.Command{ Use: "delete-product", Short: "Deletes a product from an App in an AppGroup app", Long: "Deletes a product from an App in an AppGroup app", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = appgroups.DeleteKeyProduct(name, appName, key, productName) return }, }
DelProdKeyCmd to delete credential
var ExpAppCmd = &cobra.Command{ Use: "export", Short: "Export Apps in an AppGroup to a file", Long: "Export Apps in an AppGroup to a file", Args: func(cmd *cobra.Command, args []string) (err error) { if name == "" && !all { return fmt.Errorf("either all must be set to true or a name must be passed") } return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { exportFileName := name + "_" + "apps.json" apiclient.DisableCmdPrintHttpResponse() if name != "" { payload, err := appgroups.ExportApps(name) if err != nil { return err } prettyPayload, err := apiclient.PrettifyJSON(payload) if err != nil { return err } return apiclient.WriteByteArrayToFile(exportFileName, false, prettyPayload) } appGroupsList, err := appgroups.Export() if err != nil { return err } payload, err := appgroups.ExportAllApps(appGroupsList, 4) if err != nil { return err } return apiclient.WriteArrayByteArrayToFile(exportFileName, false, payload) }, }
ExpAppCmd to export apps
var ExpCmd = &cobra.Command{ Use: "export", Short: "Export AppGroups to a file", Long: "Export AppGroups to a file", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { const exportFileName = "appgroups.json" payload, err := appgroups.Export() if err != nil { return err } prettyPayload, err := apiclient.PrettifyJSON(payload) if err != nil { return err } return apiclient.WriteByteArrayToFile(exportFileName, false, prettyPayload) }, }
ExpCmd to export apps
var GetAppCmd = &cobra.Command{ Use: "get", Short: "Get App in an AppGroup", Long: "Get App in an AppGroup", Args: func(cmd *cobra.Command, args []string) error { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = appgroups.GetApp(name, appName) return err }, }
GetAppCmd to get app
var GetCmd = &cobra.Command{ Use: "get", Short: "Get AppGroup in an Organization by AppGroup Name", Long: "Returns the app group details for the specified app group name", Args: func(cmd *cobra.Command, args []string) error { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = appgroups.Get(name) return err }, }
GetCmd to get appgroup
var GetKeyCmd = &cobra.Command{ Use: "get", Short: "Gets details for a consumer key for a AppGroup app", Long: "Gets details for a consumer key for a AppGroup app", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = appgroups.GetKey(name, appName, key) return }, }
GetKeyCmd to get credential
var ImpAppCmd = &cobra.Command{ Use: "import", Short: "Import a file containing Apps to an AppGroup", Long: "Import a file containing Apps to an AppGroup", Args: func(cmd *cobra.Command, args []string) (err error) { if name == "" && !all { return fmt.Errorf("either all must be set to true or a name must be passed") } return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) error { apiclient.DisableCmdPrintHttpResponse() if name != "" { return appgroups.ImportApps(conn, filePath, name) } return appgroups.ImportAllApps(conn, filePath) }, }
ImpAppCmd to import apps
var ImpCmd = &cobra.Command{ Use: "import", Short: "Import a file containing AppGroups", Long: "Import a file containing AppGroups", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) error { return appgroups.Import(conn, filePath) }, }
ImpCmd to import apps
var KeyCmd = &cobra.Command{
Use: "keys",
Short: "Manage keys in an App within an AppGroup",
Long: "Manage keys in an App within an AppGroup",
}
KeyCmd to manage keys in an app
var ListAppCmd = &cobra.Command{ Use: "list", Short: "Returns a list of Developer Applications", Long: "Returns a list of app IDs within an organization based on app status", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = appgroups.ListApps(name, pageSize, pageToken) return }, }
ListAppCmd to list apps
var ListCmd = &cobra.Command{ Use: "list", Short: "Returns a list of AppGroups", Long: "Returns a list of AppGroups", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = appgroups.List(pageSize, pageToken, filter) return }, }
ListCmd to list apps
var ManageAppCmd = &cobra.Command{ Use: "manage", Short: "Approve or revoke an app", Long: "Approve or revoke an app", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = appgroups.ManageApp(name, appName, action) return }, }
ManageAppCmd to create developer keys
var ManageCmd = &cobra.Command{ Use: "manage", Short: "Approve or revoke an AppGroup", Long: "Approve or revoke an AppGroup", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = appgroups.Manage(name, action) return }, }
ManageCmd to appgroups
var ManageKeyCmd = &cobra.Command{ Use: "manage", Short: "Approve or revoke an app key", Long: "Approve or revoke an app key", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = appgroups.ManageKey(name, appName, key, action) return }, }
ManageKeyCmd to create developer keys
var UpdateAppCmd = &cobra.Command{ Use: "update", Short: "Update an App in an AppGroup", Long: "Update an App in an AppGroup", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { if expires != "" { if _, err = strconv.Atoi(expires); err != nil { return fmt.Errorf("expires must be an integer: %v", err) } expires += "000" } _, err = appgroups.UpdateApp(name, appName, expires, callback, apiProducts, scopes, attrs) return }, }
UpdateAppCmd to create app
var UpdateCmd = &cobra.Command{ Use: "update", Short: "Update an AppGroup", Long: "Update an AppGroup", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = appgroups.Update(name, channelURI, channelID, displayName, attrs, devs) return }, }
UpdateCmd to create appgroup
var UpdateKeyProdCmd = &cobra.Command{ Use: "update-prod", Short: "Update products in an app key contained in an AppGroup", Long: "Update products in an app key contained in an AppGroup", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = appgroups.UpdateKeyProducts(name, appName, key, apiProducts) return }, }
UpdateKeyProdCmd to create developer keys
Functions ¶
This section is empty.
Types ¶
This section is empty.
Source Files ¶
- appgroups.go
- apps.go
- createkey.go
- crtapp.go
- crtappgroup.go
- delapp.go
- delappgroup.go
- delkey.go
- delkeyprod.go
- expappgroups.go
- expapps.go
- getapp.go
- getappgroup.go
- getkey.go
- impappgroup.go
- impapps.go
- keys.go
- listappgroups.go
- listapps.go
- manage.go
- manageapp.go
- managekey.go
- updateapp.go
- updateappgroup.go
- updateappkeyprods.go