buflintvalidate

package
v1.45.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckField

func CheckField(

	addAnnotationFunc func(bufprotosource.Descriptor, bufprotosource.Location, []bufprotosource.Location, string, ...interface{}),
	field bufprotosource.Field,
	extensionTypeResolver protoencoding.Resolver,
) error

CheckField validates that all rules on the field are valid, and any CEL expressions compile.

For a set of rules to be valid, it must

  1. permit _some_ value and all example values, if any
  2. have a type compatible with the field it validates.

func CheckMessage

func CheckMessage(

	addAnnotationFunc func(bufprotosource.Descriptor, bufprotosource.Location, []bufprotosource.Location, string, ...interface{}),
	message bufprotosource.Message,
) error

CheckMessage validates that all rules on the message are valid, and any CEL expressions compile. It also checks all predefined rule extensions on the messages.

func CheckPredefinedRuleExtension added in v1.44.0

func CheckPredefinedRuleExtension(

	addAnnotationFunc func(bufprotosource.Descriptor, bufprotosource.Location, []bufprotosource.Location, string, ...interface{}),
	field bufprotosource.Field,
	extensionResolver protoencoding.Resolver,
) error

CheckPredefinedRuleExtension checks that a predefined extension is valid, and any CEL expressions compile.

Types

This section is empty.

Jump to

Keyboard shortcuts

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