stencil

package
v0.7.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package stencil implements the stencil command, which is essentially a thing wrapper around the codegen package which does most of the heavy lifting.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	// contains filtered or unexported fields
}

Command is a thin wrapper around the codegen package that implements the "stencil" command. It is responsible for fetching dependencies, rendering templates, and writing files to disk using the underlying codegen package.

func NewCommand

func NewCommand(log slogext.Logger, s *configuration.Manifest, dryRun bool) *Command

NewCommand creates a new stencil command

func (*Command) Run

func (c *Command) Run(ctx context.Context) error

Run fetches dependencies of the root modules and builds the layered filesystem, after that GenerateFiles is called to actually walk the filesystem and render the templates. This step also does minimal post-processing of the dependencies manifests

func (*Command) Upgrade added in v0.7.0

func (c *Command) Upgrade(ctx context.Context) error

Upgrade checks for upgrades to the modules in the project and upgrades them if necessary. If no lockfile is present, it will log a message and return without doing anything.

Jump to

Keyboard shortcuts

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