Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "targetservers", Aliases: []string{"ts"}, Short: "Manage Target Servers", Long: "Manage Target Servers", }
Cmd to manage targetservers
View Source
var CreateCmd = &cobra.Command{ Use: "create", Short: "Create a Target Server", Long: "Create a Target Server", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeEnv(env) if tlsenabled != "" { if _, err := strconv.ParseBool(tlsenabled); err != nil { return fmt.Errorf("tlsenabled must be set to true or false") } } if clientAuthEnabled != "" { if _, err := strconv.ParseBool(clientAuthEnabled); err != nil { return fmt.Errorf("clientAuthEnabled must be set to true or false") } } if ignoreValidationErrors != "" { if _, err := strconv.ParseBool(ignoreValidationErrors); err != nil { return fmt.Errorf("ignoreValidationErrors must be set to true or false") } } return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = targetservers.Create(name, description, host, port, enable, protocol, keyStore, keyAlias, trustStore, tlsenabled, clientAuthEnabled, ignoreValidationErrors) return err }, }
CreateCmd to create target servers
View Source
var DelCmd = &cobra.Command{ Use: "delete", Short: "Delete a Target Server", Long: "Delete a Target Server", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeEnv(env) return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = targetservers.Delete(name) return }, }
DelCmd to delete target servers
View Source
var ExpCmd = &cobra.Command{ Use: "export", Short: "Export target servers to a file", Long: "Export target servers to a file", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeEnv(env) return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { const exportFileName = "targetservers.json" apiclient.DisableCmdPrintHttpResponse() payload, err := targetservers.Export(conn) if err != nil { return err } return apiclient.WriteArrayByteArrayToFile(exportFileName, false, payload) }, }
ExpCmd to export target servers
View Source
var GetCmd = &cobra.Command{ Use: "get", Short: "Get a Target Server", Long: "Get a Target Server", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeEnv(env) return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = targetservers.Get(name) return }, }
GetCmd to get target servers
View Source
var ImpCmd = &cobra.Command{ Use: "import", Short: "Import a file containing target servers", Long: "Import a file containing target servers", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeEnv(env) return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) error { return targetservers.Import(conn, filePath) }, }
ImpCmd to import ts
View Source
var ListCmd = &cobra.Command{ Use: "list", Short: "List Target Servers", Long: "List Target Servers", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeEnv(env) return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = targetservers.List() return }, }
ListCmd to list target servers
View Source
var UpdateCmd = &cobra.Command{ Use: "update", Short: "Update a Target Server", Long: "Update a Target Server", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeEnv(env) if tlsenabled != "" { if _, err := strconv.ParseBool(tlsenabled); err != nil { return fmt.Errorf("tlsenabled must be set to true or false") } } if clientAuthEnabled != "" { if _, err := strconv.ParseBool(clientAuthEnabled); err != nil { return fmt.Errorf("clientAuthEnabled must be set to true or false") } } if ignoreValidationErrors != "" { if _, err := strconv.ParseBool(ignoreValidationErrors); err != nil { return fmt.Errorf("ignoreValidationErrors must be set to true or false") } } return apiclient.SetApigeeOrg(org) }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = targetservers.Update(name, description, host, port, enable, protocol, keyStore, keyAlias, trustStore, tlsenabled, clientAuthEnabled, ignoreValidationErrors) return err }, }
UpdateCmd to get target servers
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.