Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
z
Classes
Class List
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
grpc
src
core
lib
security
authorization
mock_cel
cel_expression.h
Go to the documentation of this file.
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_EXPRESSION_H
16
#define GRPC_CORE_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_CEL_EXPRESSION_H
17
18
#include <
grpc/support/port_platform.h
>
19
20
#include <memory>
21
#include <vector>
22
23
#include "absl/status/status.h"
24
#include "absl/status/statusor.h"
25
#include "
google/api/expr/v1alpha1/syntax.upb.h
"
26
27
#include "
src/core/lib/security/authorization/mock_cel/activation.h
"
28
#include "
src/core/lib/security/authorization/mock_cel/cel_value.h
"
29
30
namespace
grpc_core
{
31
namespace
mock_cel {
32
33
// This is a temporary stub implementation of CEL APIs.
34
// Once gRPC imports the CEL library, this file will be removed.
35
36
// Base interface for expression evaluating objects.
37
class
CelExpression
{
38
public
:
39
virtual
~CelExpression
() =
default
;
40
41
// Evaluates expression and returns value.
42
// activation contains bindings from parameter names to values
43
virtual
absl::StatusOr<CelValue>
Evaluate
(
44
const
BaseActivation
& activation)
const
= 0;
45
};
46
47
// Base class for Expression Builder implementations
48
// Provides user with factory to register extension functions.
49
// ExpressionBuilder MUST NOT be destroyed before CelExpression objects
50
// it built.
51
class
CelExpressionBuilder
{
52
public
:
53
virtual
~CelExpressionBuilder
() =
default
;
54
55
// Creates CelExpression object from AST tree.
56
// expr specifies root of AST tree
57
virtual
absl::StatusOr<std::unique_ptr<CelExpression>
>
CreateExpression
(
58
const
google_api_expr_v1alpha1_Expr
* expr,
59
const
google_api_expr_v1alpha1_SourceInfo
* source_info)
const
= 0;
60
61
virtual
absl::StatusOr<std::unique_ptr<CelExpression>
>
CreateExpression
(
62
const
google_api_expr_v1alpha1_Expr
* expr,
63
const
google_api_expr_v1alpha1_SourceInfo
* source_info,
64
std::vector<absl::Status>* warnings)
const
= 0;
65
};
66
67
}
// namespace mock_cel
68
}
// namespace grpc_core
69
70
#endif // GRPC_CORE_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_CEL_EXPRESSION_H
syntax.upb.h
grpc_core
Definition:
call_metric_recorder.h:31
grpc_core::mock_cel::CelExpression::Evaluate
virtual absl::StatusOr< CelValue > Evaluate(const BaseActivation &activation) const =0
grpc_core::mock_cel::BaseActivation
Definition:
activation.h:29
activation.h
google_api_expr_v1alpha1_SourceInfo
struct google_api_expr_v1alpha1_SourceInfo google_api_expr_v1alpha1_SourceInfo
Definition:
syntax.upb.h:47
grpc_core::mock_cel::CelExpression::~CelExpression
virtual ~CelExpression()=default
grpc_core::mock_cel::CelExpressionBuilder::~CelExpressionBuilder
virtual ~CelExpressionBuilder()=default
grpc_core::mock_cel::CelExpression
Definition:
cel_expression.h:37
google_api_expr_v1alpha1_Expr
struct google_api_expr_v1alpha1_Expr google_api_expr_v1alpha1_Expr
Definition:
syntax.upb.h:38
absl::StatusOr
Definition:
abseil-cpp/absl/status/statusor.h:187
cel_value.h
grpc_core::mock_cel::CelExpressionBuilder
Definition:
cel_expression.h:51
grpc_core::mock_cel::CelExpressionBuilder::CreateExpression
virtual absl::StatusOr< std::unique_ptr< CelExpression > > CreateExpression(const google_api_expr_v1alpha1_Expr *expr, const google_api_expr_v1alpha1_SourceInfo *source_info) const =0
port_platform.h
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:43