Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpectedWrapperConstraints ¶
func ExpectedWrapperConstraints(fqn protoreflect.FullName) (desc protoreflect.FieldDescriptor, ok bool)
ExpectedWrapperConstraints returns the validate.FieldConstraints field that is expected for the given wrapper well-known type's full name. If ok is false, no standard constraints exist for that type.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a build-through cache to computed standard constraints.
func NewCache ¶
func NewCache() Cache
NewCache constructs a new build-through cache for the standard constraints.
func (*Cache) Build ¶
func (c *Cache) Build( env *cel.Env, fieldDesc protoreflect.FieldDescriptor, fieldConstraints *validate.FieldConstraints, extensionTypeResolver protoregistry.ExtensionTypeResolver, allowUnknownFields bool, forItems bool, ) (set expression.ProgramSet, err error)
Build creates the standard constraints for the given field. If forItems is true, the constraints for repeated list items is built instead of the constraints on the list itself.
Click to show internal directories.
Click to hide internal directories.