root

package
v0.6.0-rc.5m Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrProcessingConfigCode        = "1050"
	ErrCreatingConfigFileCode      = "1051"
	ErrAddingTokenToConfigCode     = "1052"
	ErrAddingContextToConfigCode   = "1053"
	ErrUnmarshallingConfigFileCode = "1054"
	ErrGettingRequestContextCode   = "1055"
	ErrInvalidAPIResponseCode      = "1056"
	ErrUnmarshallingAPIDataCode    = "1057"
	ErrConnectingToServerCode      = "1058"
)

Variables

View Source
var (
	ErrCreatingConfigFile = errors.New(ErrCreatingConfigFileCode, errors.Alert, []string{"Unable to create config file"}, []string{"Unable to create config file"}, []string{}, []string{})

	ErrAddingTokenToConfig = errors.New(ErrAddingTokenToConfigCode, errors.Alert, []string{"Unable to add token to config"}, []string{"Unable to add token to config"}, []string{}, []string{})

	ErrAddingContextToConfig = errors.New(ErrAddingContextToConfigCode, errors.Alert, []string{"Unable to add context to config"}, []string{"Unable to add context to config"}, []string{}, []string{})

	ErrUnmarshallingConfigFile = errors.New(ErrUnmarshallingConfigFileCode, errors.Alert, []string{"Error unmarshalling config file"}, []string{"Error unmarshalling config file"}, []string{}, []string{})
)
View Source
var RootCmd = &cobra.Command{
	Use:   "mesheryctl",
	Short: "Meshery Command Line tool",
	Long:  `Meshery is the service mesh management plane, providing lifecycle, performance, and configuration management of service meshes and their workloads.`,
	Args:  cobra.MinimumNArgs(1),

	PreRunE: func(cmd *cobra.Command, args []string) error {
		log.Println("Args passed in", args)
		if ok := utils.IsValidSubcommand(availableSubcommands, args[0]); !ok {
			return errors.New(utils.RootError(fmt.Sprintf("invalid command: \"%s\"", args[0])))
		}

		return nil
	},
}

RootCmd represents the base command when called without any subcommands

Functions

func ErrConnectingToServer added in v0.6.2

func ErrConnectingToServer(err error) error

func ErrGettingRequestContext added in v0.6.2

func ErrGettingRequestContext(err error) error

func ErrInvalidAPIResponse added in v0.6.2

func ErrInvalidAPIResponse(err error) error

func ErrProcessingConfig added in v0.6.2

func ErrProcessingConfig(err error) error

func ErrUnmarshallingAPIData added in v0.6.2

func ErrUnmarshallingAPIData(err error) error

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the RootCmd.

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