developers

package
v1.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:     "devs",
	Aliases: []string{"developers"},
	Short:   "Manage Apigee App Developers",
	Long:    "Manage Apigee App Developers",
}

Cmd to manage developers

View Source
var CreateCmd = &cobra.Command{
	Use:   "create",
	Short: "Create a developer",
	Long:  "Create a developer",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		apiclient.SetApigeeOrg(org)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		_, err = developers.Create(email, firstName, lastName, userName, attrs)
		return
	},
}

Cmd to create developer

View Source
var DelCmd = &cobra.Command{
	Use:   "delete",
	Short: "Deletes an App Developer from an organization",
	Long:  "Deletes an App Developer from an organization",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		apiclient.SetApigeeOrg(org)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		_, err = developers.Delete(email)
		return
	},
}

Cmd to delete developer

View Source
var ExpCmd = &cobra.Command{
	Use:   "export",
	Short: "Export Developers to a file",
	Long:  "Export Developers to a file",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		apiclient.SetApigeeOrg(org)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		const exportFileName = "developers.json"

		respBody, err := developers.Export()
		if err != nil {
			return err
		}

		return apiclient.WriteByteArrayToFile(exportFileName, false, respBody)
	},
}

Cmd to export developer

View Source
var GetAppCmd = &cobra.Command{
	Use:   "getapps",
	Short: "Returns the apps owned by a developer by email address",
	Long:  "Returns the apps owned by a developer by email address",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		apiclient.SetApigeeOrg(org)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		_, err = developers.GetApps(name, expand)
		return
	},
}

Cmd to get developer

View Source
var GetCmd = &cobra.Command{
	Use:   "get",
	Short: "Returns the profile for a developer by email address or ID",
	Long:  "Returns the profile for a developer by email address or ID",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		apiclient.SetApigeeOrg(org)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		_, err = developers.Get(email)
		return
	},
}

Cmd to get developer

View Source
var ImpCmd = &cobra.Command{
	Use:   "import",
	Short: "Import a file containing App Developers",
	Long:  "Import a file containing App Developers",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		apiclient.SetApigeeOrg(org)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) error {
		return developers.Import(conn, filePath)
	},
}

Cmd to import developer

View Source
var ListCmd = &cobra.Command{
	Use:   "list",
	Short: "Returns a list of App Developers",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		apiclient.SetApigeeOrg(org)
		return nil
	},
	Long: "Lists all developers in an organization by email address",
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		_, err = developers.List(count, expand)
		return
	},
}

Cmd to list developer

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL