syntax

package
v1.16.0 Latest Latest
Warning

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

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

Documentation

Overview

Package syntax package provides validation checks for syntax errors in Nomos resource directories.

For the purpose of this package, we define a "syntax error" to be a configuration error which can be determined by looking at a single Resource. Examples of syntax errors include invalid names or missing required properties. This is as opposed to "semantic errors", which would include errors such as detecting that two Resources of the same Kind share the same name.

Index

Constants

View Source
const IllegalFieldsInConfigErrorCode = "1045"

IllegalFieldsInConfigErrorCode is the error code for IllegalFieldsInConfigError

View Source
const IllegalKindInNamespacesErrorCode = "1038"

IllegalKindInNamespacesErrorCode is the error code for IllegalKindInNamespacesError

View Source
const IllegalSystemResourcePlacementErrorCode = "1033"

IllegalSystemResourcePlacementErrorCode is the error code for IllegalSystemResourcePlacementError

View Source
const InvalidDirectoryNameErrorCode = "1028"

InvalidDirectoryNameErrorCode is the error code for InvalidDirectoryNameError

Variables

This section is empty.

Functions

func IllegalFieldsInConfigError

func IllegalFieldsInConfigError(resource client.Object, field id.DisallowedField) status.Error

IllegalFieldsInConfigError reports that an object has an illegal field set.

func IllegalKindInNamespacesError

func IllegalKindInNamespacesError(resources ...client.Object) status.Error

IllegalKindInNamespacesError reports that an object has been illegally defined in namespaces/

func IllegalSystemResourcePlacementError

func IllegalSystemResourcePlacementError(resource client.Object) status.Error

IllegalSystemResourcePlacementError reports that a configmanagement.gke.io object has been defined outside of system/

func InvalidDirectoryNameError

func InvalidDirectoryNameError(dir cmpath.Relative) status.Error

InvalidDirectoryNameError represents an illegal usage of a reserved name.

func IsSystemOnly

func IsSystemOnly(gvk schema.GroupVersionKind) bool

IsSystemOnly returns true if the GVK is only allowed in the system/ directory. It returns true iff the object is allowed in system/, but no other directories.

func ReservedDirectoryNameError

func ReservedDirectoryNameError(dir cmpath.Relative) status.Error

ReservedDirectoryNameError represents an illegal usage of a reserved name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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