Skip to content

Commit

Permalink
Merge pull request #245 from mercari/strings
Browse files Browse the repository at this point in the history
Support Strings CEL library
  • Loading branch information
pikachu0310 authored Sep 27, 2024
2 parents b948f38 + 8116ee6 commit e478944
Show file tree
Hide file tree
Showing 8 changed files with 2,128 additions and 246 deletions.
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

0 comments on commit e478944

Please sign in to comment.