Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 2.02 KB

cel.md

File metadata and controls

51 lines (38 loc) · 2.02 KB

gRPC Federation CEL API References

In the gRPC Federation, you can use by to write CEL(Common Expression Language) expressions.

For more information on CEL, please see here.

Here is a list of macros that CEL supports by default.

In addition to the standard CEL operations, the gRPC Federation supports a number of its own APIs. This page introduces those APIs.

Refer to the defined variable

If you have defined variables using def feature, you can use them in CEL.
Also, the message argument should be $. can be used to refer to them.

error

error is a reserved word. The error variable is used to represent errors in gRPC method calls. The type of the error variable is defined here.

Example

if: "error.precondition_failures[0].violations[0].subject == 'subject value'"

Type Definition

field type
code int32
message string
details repeated google.protobuf.Any
custom_messages repeated google.protobuf.Any
error_info repeated google.rpc.ErrorInfo
retry_info repeated google.rpc.RetryInfo
debug_info repeated google.rpc.DebugInfo
quota_failures repeated google.rpc.QuotaFailure
precondition_failures repeated google.rpc.PreconditionFailure
bad_requests repeated google.rpc.BadRequest
request_info repeated google.rpc.RequestInfo
resource_info repeated google.rpc.ResourceInfo
helps repeated google.rpc.Help
localized_messages repeated google.rpc.LocalizedMessage