res

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:     "resources",
	Aliases: []string{"res"},
	Short:   "Manage resources within an Apigee environment",
	Long:    "Manage resources within an Apigee environment",
}

Cmd to manage resources

View Source
var CreateCmd = &cobra.Command{
	Use:   "create",
	Short: "Create a resource file",
	Long:  "Create a resource file",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		apiclient.SetApigeeOrg(org)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		_, err = res.Create(name, resPath, resType)
		return
	},
}

Cmd to create a resource

View Source
var DelCmd = &cobra.Command{
	Use:   "delete",
	Short: "Delete a resource file",
	Long:  "Delete a resource file",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		apiclient.SetApigeeOrg(org)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		_, err = res.Delete(name, resType)
		return
	},
}

Cmd to del a resource

View Source
var GetCmd = &cobra.Command{
	Use:   "get",
	Short: "Get a resource file",
	Long:  "Get a resource file",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		apiclient.SetApigeeOrg(org)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		return res.Get(name, resType)
	},
}

Cmd to get a resource

View Source
var ListCmd = &cobra.Command{
	Use:   "list",
	Short: "List all resources in your environment",
	Long:  "List all resources in your environment",
	Args: func(cmd *cobra.Command, args []string) (err error) {
		apiclient.SetApigeeOrg(org)
		return nil
	},
	RunE: func(cmd *cobra.Command, args []string) (err error) {
		_, err = res.List(resType)
		return
	},
}

Cmd to list resources

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