Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "datacollectors", Aliases: []string{"dc"}, Short: "Manage Apigee datacollectors entities", Long: "Manage Apigee datacollectors entities", }
Cmd to manage datacollectors
View Source
var CreateCmd = &cobra.Command{ Use: "create", Short: "Create a Data Collector", Long: "Create a Data Collector", Args: func(cmd *cobra.Command, args []string) (err error) { if !isValidType() { return fmt.Errorf("invalid collector type %s. Valid types are %s", collectorType, allowedTypes) } return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = datacollectors.Create(name, description, collectorType) return }, }
CreateCmd to create a new data collector
View Source
var DelCmd = &cobra.Command{ Use: "delete", Short: "Delete a Data Collector", Long: "Delete a Data Collector", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = datacollectors.Delete(name) return }, }
DelCmd to create a new data collector
View Source
var ExpCmd = &cobra.Command{ Use: "export", Short: "Export Data Collectors", Long: "Export Data Collectors", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { const dataCollFileName = "datacollectors.json" respBody, err := datacollectors.List() if err != nil { return err } return apiclient.WriteByteArrayToFile(dataCollFileName, false, respBody) }, }
ExpCmd to create a new data collector
View Source
var GetCmd = &cobra.Command{ Use: "get", Short: "Get a Data Collector", Long: "Get a Data Collector", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = datacollectors.Get(name) return }, }
GetCmd to create a new data collector
View Source
var ImpCmd = &cobra.Command{ Use: "import", Short: "Import Data Collectors", Long: "Import Data Collectors", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { return datacollectors.Import(filePath) }, }
ImpCmd to create a new data collector
View Source
var ListCmd = &cobra.Command{ Use: "list", Short: "List Data Collectors", Long: "List Data Collectors", Args: func(cmd *cobra.Command, args []string) (err error) { return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = datacollectors.List() return }, }
ListCmd to create a new data collector
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.