1 // Copyright 2020 gRPC authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #ifndef GRPC_CORE_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_CEL_EXPR_BUILDER_FACTORY_H 16 #define GRPC_CORE_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_CEL_EXPR_BUILDER_FACTORY_H 17 18 #include <grpc/support/port_platform.h> 19 20 #include <memory> 21 22 #include "absl/memory/memory.h" 23 24 #include "src/core/lib/security/authorization/mock_cel/flat_expr_builder.h" 25 26 namespace grpc_core { 27 namespace mock_cel { 28 29 // This is a temporary stub implementation of CEL APIs. 30 // Once gRPC imports the CEL library, this file will be removed. 31 32 struct InterpreterOptions { 33 bool short_circuiting = true; 34 }; 35 CreateCelExpressionBuilder(const InterpreterOptions & options)36inline std::unique_ptr<CelExpressionBuilder> CreateCelExpressionBuilder( 37 const InterpreterOptions& options) { 38 return absl::make_unique<FlatExprBuilder>(); 39 } 40 41 } // namespace mock_cel 42 } // namespace grpc_core 43 44 #endif // GRPC_CORE_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_CEL_EXPR_BUILDER_FACTORY_H