params

package
v8.67.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasFlavor

func HasFlavor(p Params, flavor string) bool
func Header(comment, githubUrl string) string

Types

type Params

type Params struct {
	// Dir is the name of the directory where the files of the resource
	// should be generated.
	Dir string
	// Language is the primary language of the target repository (e.g. "go", "generic").
	Language string
	// Flavors is a list of additional checker flavors to include (e.g. "bash", "md", "helmchart").
	Flavors []string
	// RepoName is the name of the repository under giantswarm organization (e.g. "devctl").
	RepoName string
	// WorkingDir is the root directory of the repository (used for detecting helm charts).
	WorkingDir string
	// HelmCharts is the list of helm chart names discovered under helm/ in WorkingDir.
	HelmCharts []string
	// K8sSchemaVersion is the Kubernetes JSON schema version used in helm chart .schema.yaml.
	K8sSchemaVersion string
	// NodeRunPrefix is the package-manager script-run prefix ("npm run" /
	// "yarn run" / "pnpm run") the dev-only Node lint hook invokes. Set only
	// when NodeDevLintHook is true; detected from the lockfile.
	NodeRunPrefix string
	// GoGenerate runs `go generate ./...` in the pre-commit job before the hooks
	// (Go only). Opt-in, because the job installs no code generators: a repo
	// whose directives need controller-gen or mockgen would fail the step. Set
	// it for a repo that does not compile from a clean checkout, such as one
	// embedding a file `go generate` writes.
	GoGenerate bool
	// NodeDevLintHook turns on the dev-only pre-push `ci:lint` hook (Node only).
	// The hook runs the repo's standard `ci:lint` script -- a single convention
	// name, like ci:verify/ci:build, that the repo defines pointing at its own
	// eslint/prettier toolchain. No per-script knob: the repo converges its
	// scripts to the convention, the generator does not bend to the repo.
	NodeDevLintHook bool
	// HelmValuesSchemaJSONVersion and SchemalintVersion pin the generated helm-schema
	// hook's `additional_dependencies`. Read from devctl's own build info (go.mod is
	// the single source of truth) rather than hardcoded in the template, so the hook
	// always installs the exact versions devctl itself uses to generate
	// values.schema.json. Set only when the helmchart flavor is active.
	HelmValuesSchemaJSONVersion string
	SchemalintVersion           string
}

Jump to

Keyboard shortcuts

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