cel-eval

command
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

README

cel-eval

cel-eval is a tool that you can use to evaluate CEL expressions locally. It works by allowing you to define an HTTP request and a CEL expression that is evaluated against the request.

How to use

  1. Build cel-eval by running go build in this directory.
  2. Define an HTTP request
$ cat > request <<EOF
POST /foo HTTP/1.1
Content-Length: 29
Content-Type: application/json
X-Header: tacocat

{"test": {"nested": "value"}}
EOF
  1. Define the CEL expression
$ cat > expression <<EOF
body.test.nested == "value"
EOF
  1. Run cel-eval
$ ./cel-eval --expression ./expression --http-request ./request
true

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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