Skip to content

Commit b707d13

Browse files
authored
Merge pull request #3 from authzed/update-rename
Rename for recent update
2 parents bf934ab + 7f10e5f commit b707d13

216 files changed

Lines changed: 713 additions & 687 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Common Expression Language
22

3-
[![Go Report Card](https://goreportcard.com/badge/github.com/google/cel-go)](https://goreportcard.com/report/github.com/google/cel-go)
4-
[![GoDoc](https://godoc.org/github.com/google/cel-go?status.svg)][6]
3+
[![Go Report Card](https://goreportcard.com/badge/github.com/authzed/cel-go)](https://goreportcard.com/report/github.com/authzed/cel-go)
4+
[![GoDoc](https://godoc.org/github.com/authzed/cel-go?status.svg)][6]
55

66
The Common Expression Language (CEL) is a non-Turing complete language designed
77
for simplicity, speed, safety, and portability. CEL's C-like [syntax][1] looks
@@ -19,7 +19,7 @@ request.time - resource.age < duration("24h")
1919

2020
```typescript
2121
// Check whether all resource names in a list match a given filter.
22-
auth.claims.email_verified && resources.all(r, r.startsWith(auth.claims.email))
22+
auth.claims.email_verified && resources.all(r, r.startsWith(auth.claims.email));
2323
```
2424

2525
A CEL "program" is a single expression. The examples have been tagged as
@@ -35,16 +35,16 @@ A dashboard that shows results of cel-go conformance tests can be found
3535

3636
---
3737

38-
* [Overview](#overview)
39-
* [Environment Setup](#environment-setup)
40-
* [Parse and Check](#parse-and-check)
41-
* [Macros](#macros)
42-
* [Evaluate](#evaluate)
43-
* [Errors](#Errors)
44-
* [Examples](examples/README.md)
45-
* [Install](#install)
46-
* [Common Questions](#common-questions)
47-
* [License](#license)
38+
- [Overview](#overview)
39+
- [Environment Setup](#environment-setup)
40+
- [Parse and Check](#parse-and-check)
41+
- [Macros](#macros)
42+
- [Evaluate](#evaluate)
43+
- [Errors](#Errors)
44+
- [Examples](examples/README.md)
45+
- [Install](#install)
46+
- [Common Questions](#common-questions)
47+
- [License](#license)
4848

4949
---
5050

@@ -56,11 +56,11 @@ against some input. Checking is optional, but strongly encouraged.
5656

5757
### Environment Setup
5858

59-
Let's expose `name` and `group` variables to CEL using the `cel.Declarations`
59+
Let's expose `name` and `group` variables to CEL using the `cel.Declarations`
6060
environment option:
6161

6262
```go
63-
import "github.com/google/cel-go/cel"
63+
import "github.com/authzed/cel-go/cel"
6464

6565
env, err := cel.NewEnv(
6666
cel.Variable("name", cel.StringType),
@@ -116,7 +116,7 @@ list and map values.
116116

117117
```javascript
118118
// Ensure all tweets are less than 140 chars
119-
tweets.all(t, t.size() <= 140)
119+
tweets.all(t, t.size() <= 140);
120120
```
121121

122122
The `has` macro is useful for unifying field presence testing logic across
@@ -125,7 +125,7 @@ protobuf types and dynamic (JSON-like) types.
125125
```javascript
126126
// Test whether the field is a non-default value if proto-based, or defined
127127
// in the JSON case.
128-
has(message.field)
128+
has(message.field);
129129
```
130130

131131
Both cases traditionally require special syntax at the language level, but
@@ -170,22 +170,22 @@ unknown values, with the `?` indicating that the branch is not taken due to
170170
short-circuiting. When the result is `<x, y>` this means that the both args
171171
are possibly relevant to the result.
172172

173-
| Expression | Result |
174-
|---------------------|----------|
175-
| `false && ?` | `false` |
176-
| `true && false` | `false` |
177-
| `<x> && false` | `false` |
178-
| `true && true` | `true` |
179-
| `true && <x>` | `<x>` |
180-
| `<x> && true` | `<x>` |
181-
| `<x> && <y>` | `<x, y>` |
182-
| `true \|\| ?` | `true` |
183-
| `false \|\| true` | `true` |
184-
| `<x> \|\| true` | `true` |
185-
| `false \|\| false` | `false` |
186-
| `false \|\| <x>` | `<x>` |
187-
| `<x> \|\| false` | `<x>` |
188-
| `<x> \|\| <y>` | `<x, y>` |
173+
| Expression | Result |
174+
| ------------------ | -------- |
175+
| `false && ?` | `false` |
176+
| `true && false` | `false` |
177+
| `<x> && false` | `false` |
178+
| `true && true` | `true` |
179+
| `true && <x>` | `<x>` |
180+
| `<x> && true` | `<x>` |
181+
| `<x> && <y>` | `<x, y>` |
182+
| `true \|\| ?` | `true` |
183+
| `false \|\| true` | `true` |
184+
| `<x> \|\| true` | `true` |
185+
| `false \|\| false` | `false` |
186+
| `false \|\| <x>` | `<x>` |
187+
| `<x> \|\| false` | `<x>` |
188+
| `<x> \|\| <y>` | `<x, y>` |
189189

190190
In the cases where unknowns are expected, `cel.EvalOptions(cel.OptTrackState)`
191191
should be enabled. The `details` value returned by `Eval()` will contain the
@@ -253,19 +253,19 @@ runtime bindings and error handling to do the right thing.
253253

254254
### Where can I learn more about the language?
255255

256-
* See the [CEL Spec][1] for the specification and conformance test suite.
257-
* Ask for support on the [CEL Go Discuss][2] Google group.
256+
- See the [CEL Spec][1] for the specification and conformance test suite.
257+
- Ask for support on the [CEL Go Discuss][2] Google group.
258258

259259
### Where can I learn more about the internals?
260260

261-
* See [GoDoc][6] to learn how to integrate CEL into services written in Go.
262-
* See the [CEL C++][3] toolchain (under development) for information about how
261+
- See [GoDoc][6] to learn how to integrate CEL into services written in Go.
262+
- See the [CEL C++][3] toolchain (under development) for information about how
263263
to integrate CEL evaluation into other environments.
264264

265265
### How can I contribute?
266266

267-
* See [CONTRIBUTING.md](./CONTRIBUTING.md) to get started.
268-
* Use [GitHub Issues][4] to request features or report bugs.
267+
- See [CONTRIBUTING.md](./CONTRIBUTING.md) to get started.
268+
- Use [GitHub Issues][4] to request features or report bugs.
269269

270270
### Some tests don't work with `go test`?
271271

@@ -283,9 +283,9 @@ Released under the [Apache License](LICENSE).
283283

284284
Disclaimer: This is not an official Google product.
285285

286-
[1]: https://github.com/google/cel-spec
287-
[2]: https://groups.google.com/forum/#!forum/cel-go-discuss
288-
[3]: https://github.com/google/cel-cpp
289-
[4]: https://github.com/google/cel-go/issues
290-
[5]: https://bazel.build
291-
[6]: https://godoc.org/github.com/google/cel-go
286+
[1]: https://github.com/google/cel-spec
287+
[2]: https://groups.google.com/forum/#!forum/cel-go-discuss
288+
[3]: https://github.com/google/cel-cpp
289+
[4]: https://github.com/authzed/cel-go/issues
290+
[5]: https://bazel.build
291+
[6]: https://godoc.org/github.com/authzed/cel-go

cel/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ go_library(
2020
"program.go",
2121
"validator.go",
2222
],
23-
importpath = "github.com/google/cel-go/cel",
23+
importpath = "github.com/authzed/cel-go/cel",
2424
visibility = ["//visibility:public"],
2525
deps = [
2626
"//checker:go_default_library",

cel/cel_example_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ import (
1919
"fmt"
2020
"log"
2121

22-
"github.com/google/cel-go/cel"
23-
"github.com/google/cel-go/common/types"
24-
"github.com/google/cel-go/common/types/ref"
22+
"github.com/authzed/cel-go/cel"
23+
"github.com/authzed/cel-go/common/types"
24+
"github.com/authzed/cel-go/common/types/ref"
2525
)
2626

2727
func Example() {

cel/cel_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ import (
2929
"google.golang.org/protobuf/reflect/protodesc"
3030
"google.golang.org/protobuf/reflect/protoreflect"
3131

32-
"github.com/google/cel-go/checker"
33-
celast "github.com/google/cel-go/common/ast"
34-
"github.com/google/cel-go/common/operators"
35-
"github.com/google/cel-go/common/overloads"
36-
"github.com/google/cel-go/common/types"
37-
"github.com/google/cel-go/common/types/ref"
38-
"github.com/google/cel-go/common/types/traits"
39-
"github.com/google/cel-go/interpreter"
40-
"github.com/google/cel-go/parser"
41-
"github.com/google/cel-go/test"
32+
"github.com/authzed/cel-go/checker"
33+
celast "github.com/authzed/cel-go/common/ast"
34+
"github.com/authzed/cel-go/common/operators"
35+
"github.com/authzed/cel-go/common/overloads"
36+
"github.com/authzed/cel-go/common/types"
37+
"github.com/authzed/cel-go/common/types/ref"
38+
"github.com/authzed/cel-go/common/types/traits"
39+
"github.com/authzed/cel-go/interpreter"
40+
"github.com/authzed/cel-go/parser"
41+
"github.com/authzed/cel-go/test"
4242

4343
exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
4444
descpb "google.golang.org/protobuf/types/descriptorpb"
@@ -47,8 +47,8 @@ import (
4747
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
4848
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
4949

50-
proto2pb "github.com/google/cel-go/test/proto2pb"
51-
proto3pb "github.com/google/cel-go/test/proto3pb"
50+
proto2pb "github.com/authzed/cel-go/test/proto2pb"
51+
proto3pb "github.com/authzed/cel-go/test/proto3pb"
5252
)
5353

5454
func Test_ExampleWithBuiltins(t *testing.T) {

cel/decls.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ package cel
1717
import (
1818
"fmt"
1919

20-
"github.com/google/cel-go/common/ast"
21-
"github.com/google/cel-go/common/decls"
22-
"github.com/google/cel-go/common/functions"
23-
"github.com/google/cel-go/common/types"
24-
"github.com/google/cel-go/common/types/ref"
20+
"github.com/authzed/cel-go/common/ast"
21+
"github.com/authzed/cel-go/common/decls"
22+
"github.com/authzed/cel-go/common/functions"
23+
"github.com/authzed/cel-go/common/types"
24+
"github.com/authzed/cel-go/common/types/ref"
2525

2626
exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
2727
)

cel/decls_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ import (
2121
"strings"
2222
"testing"
2323

24-
chkdecls "github.com/google/cel-go/checker/decls"
25-
"github.com/google/cel-go/common/decls"
26-
"github.com/google/cel-go/common/functions"
27-
"github.com/google/cel-go/common/operators"
28-
"github.com/google/cel-go/common/overloads"
29-
"github.com/google/cel-go/common/types"
30-
"github.com/google/cel-go/common/types/ref"
31-
"github.com/google/cel-go/common/types/traits"
24+
chkdecls "github.com/authzed/cel-go/checker/decls"
25+
"github.com/authzed/cel-go/common/decls"
26+
"github.com/authzed/cel-go/common/functions"
27+
"github.com/authzed/cel-go/common/operators"
28+
"github.com/authzed/cel-go/common/overloads"
29+
"github.com/authzed/cel-go/common/types"
30+
"github.com/authzed/cel-go/common/types/ref"
31+
"github.com/authzed/cel-go/common/types/traits"
3232

3333
exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
3434
)

cel/env.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ import (
1818
"errors"
1919
"sync"
2020

21-
"github.com/google/cel-go/checker"
22-
chkdecls "github.com/google/cel-go/checker/decls"
23-
"github.com/google/cel-go/common"
24-
celast "github.com/google/cel-go/common/ast"
25-
"github.com/google/cel-go/common/containers"
26-
"github.com/google/cel-go/common/decls"
27-
"github.com/google/cel-go/common/types"
28-
"github.com/google/cel-go/common/types/ref"
29-
"github.com/google/cel-go/interpreter"
30-
"github.com/google/cel-go/parser"
21+
"github.com/authzed/cel-go/checker"
22+
chkdecls "github.com/authzed/cel-go/checker/decls"
23+
"github.com/authzed/cel-go/common"
24+
celast "github.com/authzed/cel-go/common/ast"
25+
"github.com/authzed/cel-go/common/containers"
26+
"github.com/authzed/cel-go/common/decls"
27+
"github.com/authzed/cel-go/common/types"
28+
"github.com/authzed/cel-go/common/types/ref"
29+
"github.com/authzed/cel-go/interpreter"
30+
"github.com/authzed/cel-go/parser"
3131

3232
exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
3333
)

cel/env_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ import (
2020
"sync"
2121
"testing"
2222

23-
"github.com/google/cel-go/common"
24-
"github.com/google/cel-go/common/operators"
25-
"github.com/google/cel-go/common/types"
26-
"github.com/google/cel-go/common/types/ref"
23+
"github.com/authzed/cel-go/common"
24+
"github.com/authzed/cel-go/common/operators"
25+
"github.com/authzed/cel-go/common/types"
26+
"github.com/authzed/cel-go/common/types/ref"
2727

28-
proto3pb "github.com/google/cel-go/test/proto3pb"
28+
proto3pb "github.com/authzed/cel-go/test/proto3pb"
2929
exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
3030
)
3131

cel/folding.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ package cel
1717
import (
1818
"fmt"
1919

20-
"github.com/google/cel-go/common/ast"
21-
"github.com/google/cel-go/common/operators"
22-
"github.com/google/cel-go/common/overloads"
23-
"github.com/google/cel-go/common/types"
24-
"github.com/google/cel-go/common/types/ref"
25-
"github.com/google/cel-go/common/types/traits"
20+
"github.com/authzed/cel-go/common/ast"
21+
"github.com/authzed/cel-go/common/operators"
22+
"github.com/authzed/cel-go/common/overloads"
23+
"github.com/authzed/cel-go/common/types"
24+
"github.com/authzed/cel-go/common/types/ref"
25+
"github.com/authzed/cel-go/common/types/traits"
2626
)
2727

2828
// ConstantFoldingOption defines a functional option for configuring constant folding.

cel/folding_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import (
2222
"google.golang.org/protobuf/encoding/prototext"
2323
"google.golang.org/protobuf/proto"
2424

25-
"github.com/google/cel-go/common/ast"
25+
"github.com/authzed/cel-go/common/ast"
2626

27-
proto3pb "github.com/google/cel-go/test/proto3pb"
27+
proto3pb "github.com/authzed/cel-go/test/proto3pb"
2828
exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
2929
)
3030

0 commit comments

Comments
 (0)