pattern

package
v0.7.13 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrPatternsNotFoundCode       = "1115"
	ErrInvalidPatternFileCode     = "1116"
	ErrPatternInvalidNameOrIDCode = "1117"
)

Variables

View Source
var PatternCmd = &cobra.Command{
	Use:   "pattern",
	Short: "Cloud Native Patterns Management",
	Long: `Manage service meshes using predefined patterns.
Find more information at: https://docs.meshery.io/reference/mesheryctl#command-reference`,
	Example: `
// Apply pattern file:
mesheryctl pattern apply --file [path to pattern file | URL of the file]

// Delete pattern file:
mesheryctl pattern delete --file [path to pattern file]

// View pattern file:
mesheryctl pattern view [pattern name | ID]

// List all patterns:
mesheryctl pattern list
`,
	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.PatternError(fmt.Sprintf("'%s' is an invalid command.  Use 'mesheryctl pattern --help' to display usage guide.\n", args[0])))
		}
		return nil
	},
}

PatternCmd represents the root command for pattern commands

Functions

func ErrInvalidPatternFile added in v0.6.132

func ErrInvalidPatternFile(err error) error

func ErrPatternInvalidNameOrID added in v0.6.137

func ErrPatternInvalidNameOrID(err error) error

func ErrPatternNotFound added in v0.6.132

func ErrPatternNotFound() error

Types

This section is empty.

Jump to

Keyboard shortcuts

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