kptfileutil

package
v0.39.3 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: Apache-2.0 Imports: 11 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckKptfileVersion added in v0.39.3

func CheckKptfileVersion(content []byte, path string) error

CheckKptfileVersion checks that the KRM provided KRM resource uses the correct group, version and kind for this version of kpt.

func ReadFile

func ReadFile(dir string) (kptfile.KptFile, error)

ReadFile reads the KptFile in the given directory

func ReadFileStrict

func ReadFileStrict(pkgPath string) (kptfile.KptFile, error)

ReadFileStrict reads a Kptfile for a package and validates that it contains required Upstream fields.

func ValidateInventory added in v0.38.0

func ValidateInventory(inv *kptfile.Inventory) (bool, error)

ValidateInventory returns true and a nil error if the passed inventory is valid; otherwise, false and the reason the inventory is not valid is returned. A valid inventory must have a non-empty namespace, name, and id.

func WriteFile

func WriteFile(dir string, k kptfile.KptFile) error

Types

type UnknownKptfileVersionError added in v0.39.3

type UnknownKptfileVersionError struct {
	PkgPath  string
	RepoSpec *git.RepoSpec
	Version  string
}

UnknownKptfileVersionError is returned when kpt encounters a Kptfile that uses an unsupported version of the Kptfile resource.

func (*UnknownKptfileVersionError) Error added in v0.39.3

Jump to

Keyboard shortcuts

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