Documentation ¶
Index ¶
- Variables
- func BuildEnvOption(options *Options, descs ...protoreflect.MessageDescriptor) cel.EnvOption
- func BuildMacros(options *Options, expr string, envOpts []cel.EnvOption) ([]parser.Macro, error)
- func GenerateResourceTypePatternMapping(desc protoreflect.Descriptor) map[string]string
- func GetExtension(m protoreflect.ProtoMessage, xt protoreflect.ExtensionType) interface{}
- func IsDefaultValue(m proto.Message, fdesc protoreflect.FieldDescriptor) bool
- func LoadLibrary(pattern string, lib cel.Library) error
- func TypeFromOverloadType(t *Options_Overloads_Type) *v1alpha1.Type
- type Configuration
- func (*Configuration) Descriptor() ([]byte, []int)deprecated
- func (x *Configuration) GetRequiredSupportDisabled() bool
- func (x *Configuration) GetResourceReferenceSupportDisabled() bool
- func (x *Configuration) GetRule() *FileRule
- func (*Configuration) ProtoMessage()
- func (x *Configuration) ProtoReflect() protoreflect.Message
- func (x *Configuration) Reset()
- func (x *Configuration) String() string
- type FieldRule
- type FieldRuleValidater
- type FileRule
- func (*FileRule) Descriptor() ([]byte, []int)deprecated
- func (x *FileRule) GetMessageRules() map[string]*MessageRule
- func (x *FileRule) GetOptions() *Options
- func (x *FileRule) GetServiceRules() map[string]*ServiceRule
- func (*FileRule) ProtoMessage()
- func (x *FileRule) ProtoReflect() protoreflect.Message
- func (x *FileRule) Reset()
- func (x *FileRule) String() string
- type Library
- type Manager
- func (m *Manager) BuildValidaters() error
- func (m *Manager) GetMessageRuleValidater(desc protoreflect.MessageDescriptor) (MessageRuleValidater, error)
- func (m *Manager) GetServiceRuleValidater(desc protoreflect.ServiceDescriptor) (ServiceRuleValidater, error)
- func (m *Manager) LoadLibrary(lib cel.Library) error
- type ManagerOption
- type MessageRule
- func (*MessageRule) Descriptor() ([]byte, []int)deprecated
- func (x *MessageRule) GetFieldRules() map[string]*FieldRule
- func (x *MessageRule) GetOptions() *Options
- func (x *MessageRule) GetRule() *Rule
- func (*MessageRule) ProtoMessage()
- func (x *MessageRule) ProtoReflect() protoreflect.Message
- func (x *MessageRule) Reset()
- func (x *MessageRule) String() string
- type MessageRuleValidater
- type MethodRule
- type MethodRuleValidater
- type Options
- func (*Options) Descriptor() ([]byte, []int)deprecated
- func (x *Options) GetGlobals() *Options_Globals
- func (x *Options) GetOverloads() *Options_Overloads
- func (x *Options) GetStdlibOverridingEnabled() bool
- func (*Options) ProtoMessage()
- func (x *Options) ProtoReflect() protoreflect.Message
- func (x *Options) Reset()
- func (x *Options) String() string
- type Options_Globals
- func (*Options_Globals) Descriptor() ([]byte, []int)deprecated
- func (x *Options_Globals) GetConstants() map[string]string
- func (x *Options_Globals) GetFunctions() map[string]string
- func (*Options_Globals) ProtoMessage()
- func (x *Options_Globals) ProtoReflect() protoreflect.Message
- func (x *Options_Globals) Reset()
- func (x *Options_Globals) String() string
- type Options_Overloads
- func (*Options_Overloads) Descriptor() ([]byte, []int)deprecated
- func (x *Options_Overloads) GetFunctions() map[string]*Options_Overloads_Function
- func (x *Options_Overloads) GetVariables() map[string]*Options_Overloads_Type
- func (*Options_Overloads) ProtoMessage()
- func (x *Options_Overloads) ProtoReflect() protoreflect.Message
- func (x *Options_Overloads) Reset()
- func (x *Options_Overloads) String() string
- type Options_Overloads_Function
- func (*Options_Overloads_Function) Descriptor() ([]byte, []int)deprecated
- func (x *Options_Overloads_Function) GetArgs() []*Options_Overloads_Type
- func (x *Options_Overloads_Function) GetResult() *Options_Overloads_Type
- func (*Options_Overloads_Function) ProtoMessage()
- func (x *Options_Overloads_Function) ProtoReflect() protoreflect.Message
- func (x *Options_Overloads_Function) Reset()
- func (x *Options_Overloads_Function) String() string
- type Options_Overloads_Type
- func (*Options_Overloads_Type) Descriptor() ([]byte, []int)deprecated
- func (x *Options_Overloads_Type) GetArray() *Options_Overloads_Type_Array
- func (x *Options_Overloads_Type) GetMap() *Options_Overloads_Type_Map
- func (x *Options_Overloads_Type) GetObject() string
- func (x *Options_Overloads_Type) GetPrimitive() Options_Overloads_Type_Primitive
- func (m *Options_Overloads_Type) GetType() isOptions_Overloads_Type_Type
- func (*Options_Overloads_Type) ProtoMessage()
- func (x *Options_Overloads_Type) ProtoReflect() protoreflect.Message
- func (x *Options_Overloads_Type) Reset()
- func (x *Options_Overloads_Type) String() string
- type Options_Overloads_Type_Array
- func (*Options_Overloads_Type_Array) Descriptor() ([]byte, []int)deprecated
- func (x *Options_Overloads_Type_Array) GetType() *Options_Overloads_Type
- func (*Options_Overloads_Type_Array) ProtoMessage()
- func (x *Options_Overloads_Type_Array) ProtoReflect() protoreflect.Message
- func (x *Options_Overloads_Type_Array) Reset()
- func (x *Options_Overloads_Type_Array) String() string
- type Options_Overloads_Type_Array_
- type Options_Overloads_Type_Map
- func (*Options_Overloads_Type_Map) Descriptor() ([]byte, []int)deprecated
- func (x *Options_Overloads_Type_Map) GetKey() *Options_Overloads_Type
- func (x *Options_Overloads_Type_Map) GetValue() *Options_Overloads_Type
- func (*Options_Overloads_Type_Map) ProtoMessage()
- func (x *Options_Overloads_Type_Map) ProtoReflect() protoreflect.Message
- func (x *Options_Overloads_Type_Map) Reset()
- func (x *Options_Overloads_Type_Map) String() string
- type Options_Overloads_Type_Map_
- type Options_Overloads_Type_Object
- type Options_Overloads_Type_Primitive
- func (Options_Overloads_Type_Primitive) Descriptor() protoreflect.EnumDescriptor
- func (x Options_Overloads_Type_Primitive) Enum() *Options_Overloads_Type_Primitive
- func (Options_Overloads_Type_Primitive) EnumDescriptor() ([]byte, []int)deprecated
- func (x Options_Overloads_Type_Primitive) Number() protoreflect.EnumNumber
- func (x Options_Overloads_Type_Primitive) String() string
- func (Options_Overloads_Type_Primitive) Type() protoreflect.EnumType
- type Options_Overloads_Type_Primitive_
- type Rule
- type RuleValidater
- type Rule_Program
- func (*Rule_Program) Descriptor() ([]byte, []int)deprecated
- func (x *Rule_Program) GetExpr() string
- func (x *Rule_Program) GetId() string
- func (*Rule_Program) ProtoMessage()
- func (x *Rule_Program) ProtoReflect() protoreflect.Message
- func (x *Rule_Program) Reset()
- func (x *Rule_Program) String() string
- type ServiceRule
- func (*ServiceRule) Descriptor() ([]byte, []int)deprecated
- func (x *ServiceRule) GetMethodRules() map[string]*MethodRule
- func (x *ServiceRule) GetOptions() *Options
- func (x *ServiceRule) GetRule() *Rule
- func (*ServiceRule) ProtoMessage()
- func (x *ServiceRule) ProtoReflect() protoreflect.Message
- func (x *ServiceRule) Reset()
- func (x *ServiceRule) String() string
- type ServiceRuleValidater
- type ValidateProgram
- type Validater
Constants ¶
This section is empty.
Variables ¶
var ( Options_Overloads_Type_Primitive_name = map[int32]string{ 0: "PRIMITIVE_UNSPECIFIED", 1: "BOOL", 2: "INT", 3: "UINT", 4: "DOUBLE", 5: "BYTES", 6: "STRING", 7: "DURATION", 8: "TIMESTAMP", 9: "ERROR", 10: "DYN", 11: "ANY", } Options_Overloads_Type_Primitive_value = map[string]int32{ "PRIMITIVE_UNSPECIFIED": 0, "BOOL": 1, "INT": 2, "UINT": 3, "DOUBLE": 4, "BYTES": 5, "STRING": 6, "DURATION": 7, "TIMESTAMP": 8, "ERROR": 9, "DYN": 10, "ANY": 11, } )
Enum value maps for Options_Overloads_Type_Primitive.
var (
// optional cel.validate.FieldRule field = 1178;
E_Field = &file_validate_validate_proto_extTypes[4]
)
Extension fields to descriptorpb.FieldOptions.
var (
// optional cel.validate.FileRule file = 1178;
E_File = &file_validate_validate_proto_extTypes[0]
)
Extension fields to descriptorpb.FileOptions.
var (
// optional cel.validate.MessageRule message = 1178;
E_Message = &file_validate_validate_proto_extTypes[3]
)
Extension fields to descriptorpb.MessageOptions.
var (
// optional cel.validate.MethodRule method = 1178;
E_Method = &file_validate_validate_proto_extTypes[2]
)
Extension fields to descriptorpb.MethodOptions.
var (
// optional cel.validate.ServiceRule service = 1178;
E_Service = &file_validate_validate_proto_extTypes[1]
)
Extension fields to descriptorpb.ServiceOptions.
var File_validate_validate_proto protoreflect.FileDescriptor
Functions ¶
func BuildEnvOption ¶
func BuildEnvOption(options *Options, descs ...protoreflect.MessageDescriptor) cel.EnvOption
func BuildMacros ¶
func GenerateResourceTypePatternMapping ¶
func GenerateResourceTypePatternMapping(desc protoreflect.Descriptor) map[string]string
func GetExtension ¶
func GetExtension(m protoreflect.ProtoMessage, xt protoreflect.ExtensionType) interface{}
GetExtension wraps proto.GetExtension function with dynamicpb.Message support
func IsDefaultValue ¶
func IsDefaultValue(m proto.Message, fdesc protoreflect.FieldDescriptor) bool
func TypeFromOverloadType ¶
func TypeFromOverloadType(t *Options_Overloads_Type) *v1alpha1.Type
Types ¶
type Configuration ¶
type Configuration struct { Rule *FileRule `protobuf:"bytes,1,opt,name=rule,proto3" json:"rule,omitempty"` RequiredSupportDisabled bool `` /* 133-byte string literal not displayed */ ResourceReferenceSupportDisabled bool `` /* 162-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Configuration) Descriptor
deprecated
func (*Configuration) Descriptor() ([]byte, []int)
Deprecated: Use Configuration.ProtoReflect.Descriptor instead.
func (*Configuration) GetRequiredSupportDisabled ¶
func (x *Configuration) GetRequiredSupportDisabled() bool
func (*Configuration) GetResourceReferenceSupportDisabled ¶
func (x *Configuration) GetResourceReferenceSupportDisabled() bool
func (*Configuration) GetRule ¶
func (x *Configuration) GetRule() *FileRule
func (*Configuration) ProtoMessage ¶
func (*Configuration) ProtoMessage()
func (*Configuration) ProtoReflect ¶
func (x *Configuration) ProtoReflect() protoreflect.Message
func (*Configuration) Reset ¶
func (x *Configuration) Reset()
func (*Configuration) String ¶
func (x *Configuration) String() string
type FieldRule ¶
type FieldRule struct { Rule *Rule `protobuf:"bytes,1,opt,name=rule,proto3" json:"rule,omitempty"` Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"` // contains filtered or unexported fields }
func (*FieldRule) Descriptor
deprecated
func (*FieldRule) GetRequired ¶
func (*FieldRule) ProtoMessage ¶
func (*FieldRule) ProtoMessage()
func (*FieldRule) ProtoReflect ¶
func (x *FieldRule) ProtoReflect() protoreflect.Message
type FieldRuleValidater ¶
type FieldRuleValidater interface { Validater() RuleValidater IsRequired() bool }
type FileRule ¶
type FileRule struct { Options *Options `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` ServiceRules map[string]*ServiceRule `` /* 185-byte string literal not displayed */ MessageRules map[string]*MessageRule `` /* 185-byte string literal not displayed */ // contains filtered or unexported fields }
func (*FileRule) Descriptor
deprecated
func (*FileRule) GetMessageRules ¶
func (x *FileRule) GetMessageRules() map[string]*MessageRule
func (*FileRule) GetOptions ¶
func (*FileRule) GetServiceRules ¶
func (x *FileRule) GetServiceRules() map[string]*ServiceRule
func (*FileRule) ProtoMessage ¶
func (*FileRule) ProtoMessage()
func (*FileRule) ProtoReflect ¶
func (x *FileRule) ProtoReflect() protoreflect.Message
type Library ¶
type Library struct { EnvOpts []cel.EnvOption PgrOpts []cel.ProgramOption }
func (*Library) CompileOptions ¶
func (*Library) ProgramOptions ¶
func (l *Library) ProgramOptions() []cel.ProgramOption
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(file protoreflect.FileDescriptor, opts ...ManagerOption) (*Manager, error)
func (*Manager) BuildValidaters ¶
func (*Manager) GetMessageRuleValidater ¶
func (m *Manager) GetMessageRuleValidater(desc protoreflect.MessageDescriptor) (MessageRuleValidater, error)
func (*Manager) GetServiceRuleValidater ¶
func (m *Manager) GetServiceRuleValidater(desc protoreflect.ServiceDescriptor) (ServiceRuleValidater, error)
type ManagerOption ¶
type ManagerOption interface {
// contains filtered or unexported methods
}
func WithConfiguration ¶
func WithConfiguration(cfgList ...*Configuration) ManagerOption
func WithFallbackOverloads ¶
func WithFallbackOverloads() ManagerOption
type MessageRule ¶
type MessageRule struct { Options *Options `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` Rule *Rule `protobuf:"bytes,2,opt,name=rule,proto3" json:"rule,omitempty"` FieldRules map[string]*FieldRule `` /* 179-byte string literal not displayed */ // contains filtered or unexported fields }
func (*MessageRule) Descriptor
deprecated
func (*MessageRule) Descriptor() ([]byte, []int)
Deprecated: Use MessageRule.ProtoReflect.Descriptor instead.
func (*MessageRule) GetFieldRules ¶
func (x *MessageRule) GetFieldRules() map[string]*FieldRule
func (*MessageRule) GetOptions ¶
func (x *MessageRule) GetOptions() *Options
func (*MessageRule) GetRule ¶
func (x *MessageRule) GetRule() *Rule
func (*MessageRule) ProtoMessage ¶
func (*MessageRule) ProtoMessage()
func (*MessageRule) ProtoReflect ¶
func (x *MessageRule) ProtoReflect() protoreflect.Message
func (*MessageRule) Reset ¶
func (x *MessageRule) Reset()
func (*MessageRule) String ¶
func (x *MessageRule) String() string
type MessageRuleValidater ¶
type MethodRule ¶
type MethodRule struct { Rule *Rule `protobuf:"bytes,1,opt,name=rule,proto3" json:"rule,omitempty"` // contains filtered or unexported fields }
func (*MethodRule) Descriptor
deprecated
func (*MethodRule) Descriptor() ([]byte, []int)
Deprecated: Use MethodRule.ProtoReflect.Descriptor instead.
func (*MethodRule) GetRule ¶
func (x *MethodRule) GetRule() *Rule
func (*MethodRule) ProtoMessage ¶
func (*MethodRule) ProtoMessage()
func (*MethodRule) ProtoReflect ¶
func (x *MethodRule) ProtoReflect() protoreflect.Message
func (*MethodRule) Reset ¶
func (x *MethodRule) Reset()
func (*MethodRule) String ¶
func (x *MethodRule) String() string
type MethodRuleValidater ¶
type MethodRuleValidater interface {
Validater() RuleValidater
}
type Options ¶
type Options struct { Globals *Options_Globals `protobuf:"bytes,1,opt,name=globals,proto3" json:"globals,omitempty"` Overloads *Options_Overloads `protobuf:"bytes,2,opt,name=overloads,proto3" json:"overloads,omitempty"` StdlibOverridingEnabled bool `` /* 133-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Options) Descriptor
deprecated
func (*Options) GetGlobals ¶
func (x *Options) GetGlobals() *Options_Globals
func (*Options) GetOverloads ¶
func (x *Options) GetOverloads() *Options_Overloads
func (*Options) GetStdlibOverridingEnabled ¶
func (*Options) ProtoMessage ¶
func (*Options) ProtoMessage()
func (*Options) ProtoReflect ¶
func (x *Options) ProtoReflect() protoreflect.Message
type Options_Globals ¶
type Options_Globals struct { Functions map[string]string `` /* 159-byte string literal not displayed */ Constants map[string]string `` /* 159-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Options_Globals) Descriptor
deprecated
func (*Options_Globals) Descriptor() ([]byte, []int)
Deprecated: Use Options_Globals.ProtoReflect.Descriptor instead.
func (*Options_Globals) GetConstants ¶
func (x *Options_Globals) GetConstants() map[string]string
func (*Options_Globals) GetFunctions ¶
func (x *Options_Globals) GetFunctions() map[string]string
func (*Options_Globals) ProtoMessage ¶
func (*Options_Globals) ProtoMessage()
func (*Options_Globals) ProtoReflect ¶
func (x *Options_Globals) ProtoReflect() protoreflect.Message
func (*Options_Globals) Reset ¶
func (x *Options_Globals) Reset()
func (*Options_Globals) String ¶
func (x *Options_Globals) String() string
type Options_Overloads ¶
type Options_Overloads struct { Functions map[string]*Options_Overloads_Function `` /* 159-byte string literal not displayed */ Variables map[string]*Options_Overloads_Type `` /* 159-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Options_Overloads) Descriptor
deprecated
func (*Options_Overloads) Descriptor() ([]byte, []int)
Deprecated: Use Options_Overloads.ProtoReflect.Descriptor instead.
func (*Options_Overloads) GetFunctions ¶
func (x *Options_Overloads) GetFunctions() map[string]*Options_Overloads_Function
func (*Options_Overloads) GetVariables ¶
func (x *Options_Overloads) GetVariables() map[string]*Options_Overloads_Type
func (*Options_Overloads) ProtoMessage ¶
func (*Options_Overloads) ProtoMessage()
func (*Options_Overloads) ProtoReflect ¶
func (x *Options_Overloads) ProtoReflect() protoreflect.Message
func (*Options_Overloads) Reset ¶
func (x *Options_Overloads) Reset()
func (*Options_Overloads) String ¶
func (x *Options_Overloads) String() string
type Options_Overloads_Function ¶
type Options_Overloads_Function struct { Args []*Options_Overloads_Type `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"` Result *Options_Overloads_Type `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*Options_Overloads_Function) Descriptor
deprecated
func (*Options_Overloads_Function) Descriptor() ([]byte, []int)
Deprecated: Use Options_Overloads_Function.ProtoReflect.Descriptor instead.
func (*Options_Overloads_Function) GetArgs ¶
func (x *Options_Overloads_Function) GetArgs() []*Options_Overloads_Type
func (*Options_Overloads_Function) GetResult ¶
func (x *Options_Overloads_Function) GetResult() *Options_Overloads_Type
func (*Options_Overloads_Function) ProtoMessage ¶
func (*Options_Overloads_Function) ProtoMessage()
func (*Options_Overloads_Function) ProtoReflect ¶
func (x *Options_Overloads_Function) ProtoReflect() protoreflect.Message
func (*Options_Overloads_Function) Reset ¶
func (x *Options_Overloads_Function) Reset()
func (*Options_Overloads_Function) String ¶
func (x *Options_Overloads_Function) String() string
type Options_Overloads_Type ¶
type Options_Overloads_Type struct { // Types that are assignable to Type: // // *Options_Overloads_Type_Primitive_ // *Options_Overloads_Type_Object // *Options_Overloads_Type_Array_ // *Options_Overloads_Type_Map_ Type isOptions_Overloads_Type_Type `protobuf_oneof:"type"` // contains filtered or unexported fields }
func (*Options_Overloads_Type) Descriptor
deprecated
func (*Options_Overloads_Type) Descriptor() ([]byte, []int)
Deprecated: Use Options_Overloads_Type.ProtoReflect.Descriptor instead.
func (*Options_Overloads_Type) GetArray ¶
func (x *Options_Overloads_Type) GetArray() *Options_Overloads_Type_Array
func (*Options_Overloads_Type) GetMap ¶
func (x *Options_Overloads_Type) GetMap() *Options_Overloads_Type_Map
func (*Options_Overloads_Type) GetObject ¶
func (x *Options_Overloads_Type) GetObject() string
func (*Options_Overloads_Type) GetPrimitive ¶
func (x *Options_Overloads_Type) GetPrimitive() Options_Overloads_Type_Primitive
func (*Options_Overloads_Type) GetType ¶
func (m *Options_Overloads_Type) GetType() isOptions_Overloads_Type_Type
func (*Options_Overloads_Type) ProtoMessage ¶
func (*Options_Overloads_Type) ProtoMessage()
func (*Options_Overloads_Type) ProtoReflect ¶
func (x *Options_Overloads_Type) ProtoReflect() protoreflect.Message
func (*Options_Overloads_Type) Reset ¶
func (x *Options_Overloads_Type) Reset()
func (*Options_Overloads_Type) String ¶
func (x *Options_Overloads_Type) String() string
type Options_Overloads_Type_Array ¶
type Options_Overloads_Type_Array struct { Type *Options_Overloads_Type `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
func (*Options_Overloads_Type_Array) Descriptor
deprecated
func (*Options_Overloads_Type_Array) Descriptor() ([]byte, []int)
Deprecated: Use Options_Overloads_Type_Array.ProtoReflect.Descriptor instead.
func (*Options_Overloads_Type_Array) GetType ¶
func (x *Options_Overloads_Type_Array) GetType() *Options_Overloads_Type
func (*Options_Overloads_Type_Array) ProtoMessage ¶
func (*Options_Overloads_Type_Array) ProtoMessage()
func (*Options_Overloads_Type_Array) ProtoReflect ¶
func (x *Options_Overloads_Type_Array) ProtoReflect() protoreflect.Message
func (*Options_Overloads_Type_Array) Reset ¶
func (x *Options_Overloads_Type_Array) Reset()
func (*Options_Overloads_Type_Array) String ¶
func (x *Options_Overloads_Type_Array) String() string
type Options_Overloads_Type_Array_ ¶
type Options_Overloads_Type_Array_ struct {
Array *Options_Overloads_Type_Array `protobuf:"bytes,3,opt,name=array,proto3,oneof"`
}
type Options_Overloads_Type_Map ¶
type Options_Overloads_Type_Map struct { Key *Options_Overloads_Type `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value *Options_Overloads_Type `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Options_Overloads_Type_Map) Descriptor
deprecated
func (*Options_Overloads_Type_Map) Descriptor() ([]byte, []int)
Deprecated: Use Options_Overloads_Type_Map.ProtoReflect.Descriptor instead.
func (*Options_Overloads_Type_Map) GetKey ¶
func (x *Options_Overloads_Type_Map) GetKey() *Options_Overloads_Type
func (*Options_Overloads_Type_Map) GetValue ¶
func (x *Options_Overloads_Type_Map) GetValue() *Options_Overloads_Type
func (*Options_Overloads_Type_Map) ProtoMessage ¶
func (*Options_Overloads_Type_Map) ProtoMessage()
func (*Options_Overloads_Type_Map) ProtoReflect ¶
func (x *Options_Overloads_Type_Map) ProtoReflect() protoreflect.Message
func (*Options_Overloads_Type_Map) Reset ¶
func (x *Options_Overloads_Type_Map) Reset()
func (*Options_Overloads_Type_Map) String ¶
func (x *Options_Overloads_Type_Map) String() string
type Options_Overloads_Type_Map_ ¶
type Options_Overloads_Type_Map_ struct {
Map *Options_Overloads_Type_Map `protobuf:"bytes,4,opt,name=map,proto3,oneof"`
}
type Options_Overloads_Type_Object ¶
type Options_Overloads_Type_Object struct {
Object string `protobuf:"bytes,2,opt,name=object,proto3,oneof"`
}
type Options_Overloads_Type_Primitive ¶
type Options_Overloads_Type_Primitive int32
const ( Options_Overloads_Type_PRIMITIVE_UNSPECIFIED Options_Overloads_Type_Primitive = 0 Options_Overloads_Type_BOOL Options_Overloads_Type_Primitive = 1 Options_Overloads_Type_INT Options_Overloads_Type_Primitive = 2 Options_Overloads_Type_UINT Options_Overloads_Type_Primitive = 3 Options_Overloads_Type_DOUBLE Options_Overloads_Type_Primitive = 4 Options_Overloads_Type_BYTES Options_Overloads_Type_Primitive = 5 Options_Overloads_Type_STRING Options_Overloads_Type_Primitive = 6 Options_Overloads_Type_DURATION Options_Overloads_Type_Primitive = 7 Options_Overloads_Type_TIMESTAMP Options_Overloads_Type_Primitive = 8 Options_Overloads_Type_ERROR Options_Overloads_Type_Primitive = 9 Options_Overloads_Type_DYN Options_Overloads_Type_Primitive = 10 Options_Overloads_Type_ANY Options_Overloads_Type_Primitive = 11 )
func (Options_Overloads_Type_Primitive) Descriptor ¶
func (Options_Overloads_Type_Primitive) Descriptor() protoreflect.EnumDescriptor
func (Options_Overloads_Type_Primitive) Enum ¶
func (x Options_Overloads_Type_Primitive) Enum() *Options_Overloads_Type_Primitive
func (Options_Overloads_Type_Primitive) EnumDescriptor
deprecated
func (Options_Overloads_Type_Primitive) EnumDescriptor() ([]byte, []int)
Deprecated: Use Options_Overloads_Type_Primitive.Descriptor instead.
func (Options_Overloads_Type_Primitive) Number ¶
func (x Options_Overloads_Type_Primitive) Number() protoreflect.EnumNumber
func (Options_Overloads_Type_Primitive) String ¶
func (x Options_Overloads_Type_Primitive) String() string
func (Options_Overloads_Type_Primitive) Type ¶
func (Options_Overloads_Type_Primitive) Type() protoreflect.EnumType
type Options_Overloads_Type_Primitive_ ¶
type Options_Overloads_Type_Primitive_ struct {
Primitive Options_Overloads_Type_Primitive `protobuf:"varint,1,opt,name=primitive,proto3,enum=cel.validate.Options_Overloads_Type_Primitive,oneof"`
}
type Rule ¶
type Rule struct { Options *Options `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` Programs []*Rule_Program `protobuf:"bytes,2,rep,name=programs,proto3" json:"programs,omitempty"` // contains filtered or unexported fields }
func (*Rule) Descriptor
deprecated
func (*Rule) GetOptions ¶
func (*Rule) GetPrograms ¶
func (x *Rule) GetPrograms() []*Rule_Program
func (*Rule) ProtoMessage ¶
func (*Rule) ProtoMessage()
func (*Rule) ProtoReflect ¶
func (x *Rule) ProtoReflect() protoreflect.Message
type RuleValidater ¶
type RuleValidater interface {
Programs() []*ValidateProgram
}
func BuildRuleValidater ¶
func BuildRuleValidater(rule *Rule, envOpt cel.EnvOption) (RuleValidater, error)
type Rule_Program ¶
type Rule_Program struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Expr string `protobuf:"bytes,2,opt,name=expr,proto3" json:"expr,omitempty"` // contains filtered or unexported fields }
func (*Rule_Program) Descriptor
deprecated
func (*Rule_Program) Descriptor() ([]byte, []int)
Deprecated: Use Rule_Program.ProtoReflect.Descriptor instead.
func (*Rule_Program) GetExpr ¶
func (x *Rule_Program) GetExpr() string
func (*Rule_Program) GetId ¶
func (x *Rule_Program) GetId() string
func (*Rule_Program) ProtoMessage ¶
func (*Rule_Program) ProtoMessage()
func (*Rule_Program) ProtoReflect ¶
func (x *Rule_Program) ProtoReflect() protoreflect.Message
func (*Rule_Program) Reset ¶
func (x *Rule_Program) Reset()
func (*Rule_Program) String ¶
func (x *Rule_Program) String() string
type ServiceRule ¶
type ServiceRule struct { Options *Options `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` Rule *Rule `protobuf:"bytes,2,opt,name=rule,proto3" json:"rule,omitempty"` MethodRules map[string]*MethodRule `` /* 182-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ServiceRule) Descriptor
deprecated
func (*ServiceRule) Descriptor() ([]byte, []int)
Deprecated: Use ServiceRule.ProtoReflect.Descriptor instead.
func (*ServiceRule) GetMethodRules ¶
func (x *ServiceRule) GetMethodRules() map[string]*MethodRule
func (*ServiceRule) GetOptions ¶
func (x *ServiceRule) GetOptions() *Options
func (*ServiceRule) GetRule ¶
func (x *ServiceRule) GetRule() *Rule
func (*ServiceRule) ProtoMessage ¶
func (*ServiceRule) ProtoMessage()
func (*ServiceRule) ProtoReflect ¶
func (x *ServiceRule) ProtoReflect() protoreflect.Message
func (*ServiceRule) Reset ¶
func (x *ServiceRule) Reset()
func (*ServiceRule) String ¶
func (x *ServiceRule) String() string
type ServiceRuleValidater ¶
type ServiceRuleValidater interface {
Validate(ctx context.Context, attr *attribute_context.AttributeContext, m proto.Message) error
}