commands

package
v0.0.1-alpha5 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package commands implements the template-related subcommands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RenderCommand

type RenderCommand struct {
	cli.BaseCommand
	// contains filtered or unexported fields
}

func (*RenderCommand) Desc

func (c *RenderCommand) Desc() string

Desc implements cli.Command.

func (*RenderCommand) Flags

func (c *RenderCommand) Flags() *cli.FlagSet

func (*RenderCommand) Help

func (c *RenderCommand) Help() string

func (*RenderCommand) Run

func (c *RenderCommand) Run(ctx context.Context, args []string) error

type RenderFlags

type RenderFlags struct {

	// Source is the location of the input template to be rendered.
	//
	// Example: github.com/abcxyz/abc.git//t/rest_server
	Source string

	// Dest is the local directory where the template output will be written.
	// It's OK for it to already exist or not.
	Dest string

	// GitProtocol is not yet used.
	GitProtocol string

	// LogLevel is one of debug|info|warn|error|panic.
	LogLevel string

	// ForceOverwrite lets existing output files in the Dest directory be overwritten
	// with the output of the template.
	ForceOverwrite bool

	// Inputs provide values that are substituted into the template. The keys in
	// this map must match the input names in the Source template's spec.yaml
	// file.
	Inputs map[string]string // these are just the --input values from flags; doesn't inclue values from config file or env vars

	// KeepTempDirs prevents the cleanup of temporary directories after rendering is complete.
	// This can be useful for debugging a failing template.
	KeepTempDirs bool

	// Spec is the relative path within the template of the YAML file that
	// specifies how the template is rendered. This will often be just
	// "spec.yaml".
	Spec string
}

RenderFlags describes what template to render and how.

func (*RenderFlags) Register

func (r *RenderFlags) Register(set *cli.FlagSet)

Jump to

Keyboard shortcuts

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