Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithCELContext ¶
func WithCELContext(ctx context.Context, celCtx *CELContext) context.Context
Types ¶
type CELContext ¶
type CELContext struct {
MethodDescriptor protoreflect.MethodDescriptor
Req proto.Message
}
func GetCELContext ¶
func GetCELContext(ctx context.Context) *CELContext
func (*CELContext) ToInput ¶
func (c *CELContext) ToInput() map[string]any
type CELMessage ¶
type CELMessage interface {
NewMessage(ctx context.Context) (proto.Message, error)
SetDataOnMessage(ctx context.Context, msg protoreflect.ProtoMessage) error
}
func New ¶
func New(files *protoregistry.Files, md protoreflect.MessageDescriptor, celString string) (CELMessage, error)
type Compiler ¶ added in v0.18.0
type Compiler struct {
// contains filtered or unexported fields
}
func NewCompiler ¶ added in v0.18.0
func NewCompiler(files *protoregistry.Files) (*Compiler, error)
func (*Compiler) Compile ¶ added in v0.18.0
func (c *Compiler) Compile(md protoreflect.MessageDescriptor, celString string) (CELMessage, error)
Click to show internal directories.
Click to hide internal directories.