render

package
v0.10.0-alpha3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package render implements the template rendering related subcommands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

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

func (*Command) Desc

func (c *Command) Desc() string

Desc implements cli.Command.

func (*Command) Flags

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

Flags implements cli.Command.

func (*Command) Help

func (c *Command) Help() string

Help implements cli.Command.

func (*Command) PredictArgs added in v0.9.3

func (c *Command) PredictArgs() complete.Predictor

func (*Command) Run

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

type RenderFlags

type RenderFlags struct {
	// See common/flags.AcceptDefaults().
	AcceptDefaults bool

	// Only used when BackfillManifestOnly is set. The user acknowledges that
	// the backfilled manifest file will be missing patches for files that were
	// "included from destination".
	ContinueWithoutPatches bool

	// Source is the location of the input template to be rendered.
	//
	// Example: github.com/abcxyz/abc/t/rest_server@latest
	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

	// See common/flags.GitProtocol().
	GitProtocol string

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

	// Ignore any values in the Inputs map that aren't valid template inputs,
	// rather than returning error.
	IgnoreUnknownInputs bool

	// See common/flags.Inputs().
	Inputs map[string]string

	// See common/flags.InputFiles().
	InputFiles []string

	// See common/flags.KeepTempDirs().
	KeepTempDirs bool

	// Whether to prompt the user for template inputs.
	Prompt bool

	// See common/flags.DebugStepDiffs().
	DebugStepDiffs bool

	// See common/flags.DebugScratchContents().
	DebugScratchContents bool

	// See common/flags.SkipInputValidation().
	SkipInputValidation bool

	// Manifest enables the writing of manifest files, which are an experimental
	// feature related to template upgrades.
	SkipManifest bool

	// Whether to *only* create a manifest file without outputting any other
	// files from the template.
	BackfillManifestOnly bool

	// Overrides the `upgrade_channel` field in the output manifest. Can be
	// either a branch name or the special string "latest".
	UpgradeChannel 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