cmd

package
v0.65.2-beta Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "integrationcli",
	Short: "Utility to work with Integration & Connectors",
	Long:  "This command lets you interact with Integration and Connector APIs.",
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		apiclient.SetServiceAccount(serviceAccount)
		apiclient.SetIntegrationToken(accessToken)

		if !disableCheck {
			if ok, _ := apiclient.TestAndUpdateLastCheck(); !ok {
				latestVersion, _ := getLatestVersion()
				if cmd.Version == "" {
					clilog.Info.Println("integrationcli wasn't built with a valid Version tag.")
				} else if latestVersion != "" && cmd.Version != latestVersion {
					fmt.Printf("You are using %s, the latest version %s is available for download\n", cmd.Version, latestVersion)
				}
			}
		}

		if useApigee {
			apiclient.UseApigeeIntegration()
		}

		_ = apiclient.SetAccessToken()

		return nil
	},
}

RootCmd to manage apigeecli

Functions

func Execute

func Execute()

func GetRootCmd

func GetRootCmd() *cobra.Command

GetRootCmd returns the root of the cobra command-tree.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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