exchange

package
v0.0.0-...-d46a6ae Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Exchange = &cobra.Command{
	Use:                "exchange",
	Short:              "generate echange crd for oam trait & workload.",
	Long:               "generate echange crd for oam trait & workload.",
	DisableFlagParsing: true,
	Run: func(cmd *cobra.Command, args []string) {
		ctx, err := ccmd.Getwd()
		if err != nil {
			logger.Error(err, "cmd.Getwd")
		}
		g, err := ctx.GetGenerator()
		if err != nil {
			logger.Error(err, "ctx.GetGenerator")
			os.Exit(1)
		}

		g.AttachTemplate(typeTemplate, types.TemplateType_Type)

		args = append(args, "--controller=false")

		if err := g.Execute(args); err != nil {
			logger.Error(err, "g.Execute")
			os.Exit(1)
		}

		if err := ctx.UpdateProject(g, types.ResourceType_Exchange); err != nil {
			logger.Error(err, "ctx.UpdateProject")
			os.Exit(1)
		}
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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