metadata

package
v1.16.0-rc.2 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: 9 Imported by: 0

Documentation

Overview

Package metadata provides validation checks for errors in Resource metadata

These checks are specifically on the `metadata` fields, which are defined for all Resources. Validators MAY be triggered by Group/Version/Kind, but SHOULD NOT access Kind-specific fields. Kinds with validation specific to their fields SHOULD have their own dedicated package.

Index

Constants

View Source
const IllegalAnnotationDefinitionErrorCode = "1010"

IllegalAnnotationDefinitionErrorCode is the error code for IllegalAnnotationDefinitionError

View Source
const IllegalLabelDefinitionErrorCode = "1011"

IllegalLabelDefinitionErrorCode is the error code for IllegalLabelDefinitionError

View Source
const IllegalMetadataNamespaceDeclarationErrorCode = "1009"

IllegalMetadataNamespaceDeclarationErrorCode is the error code for IllegalNamespaceDeclarationError

View Source
const IllegalTopLevelNamespaceErrorCode = "1019"

IllegalTopLevelNamespaceErrorCode is the error code for IllegalTopLevelNamespaceError

View Source
const InvalidNamespaceNameErrorCode = "1020"

InvalidNamespaceNameErrorCode is the error code for InvalidNamespaceNameError

Variables

This section is empty.

Functions

func IllegalAnnotationDefinitionError

func IllegalAnnotationDefinitionError(resource client.Object, annotations []string) status.Error

IllegalAnnotationDefinitionError represents a set of illegal annotation definitions.

func IllegalLabelDefinitionError

func IllegalLabelDefinitionError(resource client.Object, labels []string) status.Error

IllegalLabelDefinitionError represent a set of illegal label definitions.

func IllegalMetadataNamespaceDeclarationError

func IllegalMetadataNamespaceDeclarationError(resource client.Object, expectedNamespace string) status.Error

IllegalMetadataNamespaceDeclarationError represents illegally declaring metadata.namespace

func IllegalTopLevelNamespaceError

func IllegalTopLevelNamespaceError(resource client.Object) status.Error

IllegalTopLevelNamespaceError reports that there may not be a Namespace declared directly in namespaces/ Error implements error

func InvalidNamespaceNameError

func InvalidNamespaceNameError(resource client.Object, expected string) status.Error

InvalidNamespaceNameError reports that a Namespace has an invalid name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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