root

package
v0.0.0-...-9e9d5e8 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrProcessingConfigCode        = "1088"
	ErrCreatingConfigFileCode      = "1089"
	ErrAddingTokenToConfigCode     = "1090"
	ErrAddingContextToConfigCode   = "1091"
	ErrUnmarshallingConfigFileCode = "1092"
	ErrGettingRequestContextCode   = "1093"
	ErrUnmarshallingAPIDataCode    = "1094"
	ErrConnectingToServerCode      = "1095"
)

Please reference the following before contributing an error code: https://docs.khulnasoft.com/project/contributing/contributing-error https://github.com/khulnasoft/meshkit/blob/master/errors/errors.go

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 processing json in config file"}, []string{"Error processing json in config file"}, []string{}, []string{})
)
View Source
var RootCmd = &cobra.Command{
	Use:   "meshplayctl",
	Short: "Meshplay Command Line tool",
	Long: `As a self-service engineering platform, Meshplay enables collaborative design and operation of cloud native infrastructure.
Find more information at: https://docs.khulnasoft.com/reference/meshplayctl#command-reference`,
	Example: `
// Base command:
meshplayctl

// Display help about command/subcommand:
meshplayctl --help
meshplayctl system start --help

// For viewing verbose output:
meshplayctl -v [or] --verbose
`,
	RunE: func(cmd *cobra.Command, args []string) error {
		if len(args) == 0 {
			return cmd.Help()
		}

		if ok := utils.IsValidSubcommand(availableSubcommands, args[0]); !ok {
			return errors.New(utils.RootError(fmt.Sprintf("'%s' is an invalid command. Use 'meshplayctl --help' to display usage guide.\n", args[0])))
		}

		return nil
	},
}

RootCmd represents the base command when called without any subcommands

Functions

func ErrConnectingToServer

func ErrConnectingToServer(err error) error

func ErrGettingRequestContext

func ErrGettingRequestContext(err error) error

func ErrProcessingConfig

func ErrProcessingConfig(err error) error

func ErrUnmarshallingAPIData

func ErrUnmarshallingAPIData(err error) error

func Execute

func Execute() error

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.

func TreePath

func TreePath() *cobra.Command

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