validate

package
v54.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MgmtCheck

func MgmtCheck(ctx *MetadataValidateContext, tag string, metadata model.Metadata) error

MgmtCheck ensures that the management plane package has the correct output-folder

func NamespaceCheck

func NamespaceCheck(ctx *MetadataValidateContext, tag string, metadata model.Metadata) error

NamespaceCheck ensures that the namespace only contains lower case letters, numbers and underscores

func PreviewCheck

func PreviewCheck(ctx *MetadataValidateContext, tag string, metadata model.Metadata) error

PreviewCheck ensures the output-folder of a preview package is under the preview sub-directory

Types

type MetadataValidateContext

type MetadataValidateContext struct {
	Readme     string
	SDKRoot    string
	Validators []MetadataValidateFunc
}

MetadataValidateContext describes the context needed in validation of the metadata

func (*MetadataValidateContext) Validate

func (ctx *MetadataValidateContext) Validate(tag string, metadata model.Metadata) []error

Validate validates the metadata

type MetadataValidateFunc

type MetadataValidateFunc func(ctx *MetadataValidateContext, tag string, metadata model.Metadata) error

MetadataValidateFunc is a function that validates a metadata is legal or not

Jump to

Keyboard shortcuts

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