packages

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ViolationReasonPackageManifestNotFound   = "PackageManifest not found"
	ViolationReasonPackageManifestUnknownGVK = "PackageManifest unknown GVK"
	ViolationReasonPackageManifestConversion = "PackageManifest conversion"
	ViolationReasonPackageManifestInvalid    = "PackageManifest invalid"
	ViolationReasonInvalidYAML               = "Invalid YAML"
	ViolationReasonMissingPhaseAnnotation    = "Missing " + manifestsv1alpha1.PackagePhaseAnnotation + " Annotation"
	ViolationReasonMissingGVK                = "GroupVersionKind not set"
	ViolationReasonLabelsInvalid             = "Labels invalid"
	ViolationReasonUnsupportedScope          = "Package unsupported scope"
	ViolationReasonFixtureMismatch           = "File mismatch against fixture"
)
View Source
const (
	// Default location for the PackageManifest file.
	PackageManifestFile = "manifest.yaml"
	// Files suffix for all go template files that need pre-processing.
	// .gotmpl is the suffix that is being used by the go language server gopls.
	// https://go-review.googlesource.com/c/tools/+/363360/7/gopls/doc/features.md#29
	TemplateFileSuffix = ".gotmpl"
)

Variables

View Source
var PackageManifestFileNames = []string{
	"manifest.yaml",
	"manifest.yml",
}

PackageManifestFileNames to probe for.

View Source
var PackageManifestGroupKind = schema.GroupKind{
	Group: manifestsv1alpha1.GroupVersion.Group,
	Kind:  "PackageManifest",
}

Functions

func IsManifestFile added in v1.1.0

func IsManifestFile(path string) bool

Is the it the manifest file.

func IsTemplateFile added in v1.1.0

func IsTemplateFile(path string) bool

Is path suffixed by .gotmpl.

func IsYAMLFile added in v1.1.0

func IsYAMLFile(path string) bool

Is path suffixed by .yml or .yaml.

func NewInvalidAggregate added in v1.1.0

func NewInvalidAggregate(errorList ...error) error

Types

type InvalidError added in v1.1.0

type InvalidError struct {
	Violations []Violation
}

func NewInvalidError added in v1.1.0

func NewInvalidError(violations ...Violation) *InvalidError

func (*InvalidError) Error added in v1.1.0

func (e *InvalidError) Error() string

type Violation added in v1.1.0

type Violation struct {
	Reason  string
	Details string

	Location *ViolationLocation
}

func (Violation) String added in v1.1.0

func (v Violation) String() string

type ViolationLocation added in v1.1.0

type ViolationLocation struct {
	Path          string
	DocumentIndex *int
}

func (*ViolationLocation) String added in v1.1.0

func (l *ViolationLocation) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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