Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Strings CEL library #245

Merged
merged 10 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
408 changes: 212 additions & 196 deletions _examples/02_simple/federation/federation.pb.go

Large diffs are not rendered by default.

143 changes: 93 additions & 50 deletions _examples/02_simple/federation/federation_grpc_federation.pb.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions _examples/02_simple/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ func TestFederation(t *testing.T) {
NullTimestamp2: nil,
NullTimestamp3: nil,
JpLoc: "JST",
StringsJoin: "a,b,c",
}, cmpopts.IgnoreUnexported(
federation.GetPostResponse{},
federation.Post{},
Expand Down
2 changes: 2 additions & 0 deletions _examples/02_simple/proto/federation/federation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ message GetPostResponse {
args { name: "id", by: "$.id" }
}
}
def { name: "strings_join" by: "grpc.federation.strings.join(['a', 'b', 'c'], ',')" }
def { name: "date" by: "grpc.federation.time.date(2023, 12, 25, 12, 10, 5, 0, grpc.federation.time.UTC())" }
def { name: "rand_source" by: "grpc.federation.rand.newSource(date.unix())" }
def { name: "fixed_rand" by: "grpc.federation.rand.new(rand_source)" }
Expand Down Expand Up @@ -76,6 +77,7 @@ message GetPostResponse {
google.protobuf.Timestamp null_timestamp2 = 29 [(grpc.federation.field).by = "null_value"];
google.protobuf.Timestamp null_timestamp3 = 30 [(grpc.federation.field).by = "true ? null : google.protobuf.Timestamp{}"];
string jp_loc = 31 [(grpc.federation.field).by = "jp_time.location().string()"];
string strings_join = 32 [(grpc.federation.field).by = "strings_join"];
}

message A {
Expand Down
Loading
Loading