fixpkg

package
v0.0.0-...-3df40d5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const SettersConfigFileName = "setters.yaml"

Variables

This section is empty.

Functions

func Read

func Read(n *yaml.RNode, fm *fieldmeta.FieldMeta) error

Read reads the FieldMeta from a node

func SettersNodeFromSetters

func SettersNodeFromSetters(setters map[string]string, path string) (*yaml.RNode, error)

SettersNodeFromSetters returns the ConfigMap node with input setters in data field

Types

type Fix

type Fix struct {

	// Results are the results of fixing packages
	Results []*Result
	// contains filtered or unexported fields
}

Fix migrates the resources in v1alpha1 format to v1 format

func (*Fix) Filter

func (s *Fix) Filter(nodes []*yaml.RNode) ([]*yaml.RNode, error)

Filter implements Fix as a yaml.Filter

func (*Fix) FixKptfile

func (s *Fix) FixKptfile(node *yaml.RNode, functions []v1.Function) (*yaml.RNode, error)

FixKptfile migrates the input Kptfile node from v1alpha1 or v1alpha2 to v1

func (*Fix) FunctionsInPkg

func (s *Fix) FunctionsInPkg(nodes []*yaml.RNode, pkgPath string) []v1.Function

FunctionsInPkg gets the v1 functions list for functions in package nodes is list of input nodes which are sorted according to the package depth i is the index of the Kptfile of the package, all the files till i hits next Kptfile are the files of the package pkgPath is the package path relative to the root package directory

type Result

type Result struct {
	// FilePath is the file path of the resource
	FilePath string

	// Message is the result message
	Message string
}

Result holds result of fixing packages

Jump to

Keyboard shortcuts

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