Skip to content

Commit

Permalink
Add the protobuf message and the selector API (#3797)
Browse files Browse the repository at this point in the history
* Define the protobuf API for selectors

* Add the selector evalautor

Adds a new module called selectors that initializes CEL environments and
evaluates selectors.

Fixes: #3757

* Move converting entities to SelectorEntity structs to providers

* Support properties in selectors

* Change the selectors to google.protobuf.Struct
  • Loading branch information
jhrozek authored Jul 19, 2024
1 parent edbdb59 commit 8d7f92f
Show file tree
Hide file tree
Showing 11 changed files with 2,145 additions and 89 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ require (
github.com/goccy/go-json v0.10.3
github.com/golang-jwt/jwt/v4 v4.5.0
github.com/golang-migrate/migrate/v4 v4.17.1
github.com/google/cel-go v0.20.1
github.com/google/go-cmp v0.6.0
github.com/google/go-containerregistry v0.20.1
github.com/google/go-github/v63 v63.0.0
Expand Down Expand Up @@ -119,7 +120,6 @@ require (
github.com/go-sql-driver/mysql v1.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/google/cel-go v0.20.1 // indirect
github.com/google/go-github/v61 v61.0.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/hashicorp/go-sockaddr v1.0.5 // indirect
Expand Down
100 changes: 100 additions & 0 deletions internal/engine/selectors/mock/selectors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8d7f92f

Please sign in to comment.