projectfile

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package projectfile reads and writes Crossplane project files.

Index

Constants

View Source
const (
	// APIVersion is the supported API version for project files.
	APIVersion = "dev.crossplane.io/v1alpha1"
	// Kind is the supported Kind for project files.
	Kind = "Project"
)

Variables

This section is empty.

Functions

func Parse

func Parse(projFS afero.Fs, projFilePath string) (*v1alpha1.Project, error)

Parse parses and validates the project file, returning a Project with defaults applied.

func ParseWithoutDefaults

func ParseWithoutDefaults(projFS afero.Fs, projFilePath string) (*v1alpha1.Project, error)

ParseWithoutDefaults parses and validates the project file without applying defaults. Use this when reading a project file that will be modified and written back, to avoid persisting default values the user omitted.

func Update

func Update(projFS afero.Fs, projFile string, fn func(*v1alpha1.Project)) error

Update reads a project file without applying defaults, applies the given mutation function, and writes the result back. This allows the project to be updated on disk without injecting defaults. Note that the file will be reformatted by the YAML serializer (fields will be re-ordered and comments will be lost).

Types

This section is empty.

Jump to

Keyboard shortcuts

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