Signed-off-by: Faumaray <faumaray@gmail.com>
This commit is contained in:
faumaray committed 2026-10-04 19:11:37 +03:00
1 parent 9c305f2a4d
commit 21261db8ef
185 files changed
+52751 -217

No files matched your search

@@ -0,0 +1,108 @@
syntax = "proto3";
package google.api.expr.v1alpha1;
import "google/api/expr/v1alpha1/syntax.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/struct.proto";
option cc_enable_arenas = true;
option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr";
option java_multiple_files = true;
option java_outer_classname = "DeclProto";
option java_package = "com.google.api.expr.v1alpha1";
message CheckedExpr {
map<int64, Reference> reference_map = 2;
map<int64, Type> type_map = 3;
SourceInfo source_info = 5;
string expr_version = 6;
Expr expr = 4;
}
message Type {
oneof type_kind {
protobuf.Empty dyn = 1;
protobuf.NullValue null = 2;
PrimitiveType primitive = 3;
PrimitiveType wrapper = 4;
WellKnownType well_known = 5;
ListType list_type = 6;
MapType map_type = 7;
FunctionType function = 8;
string message_type = 9;
string type_param = 10;
Type type = 11;
protobuf.Empty error = 12;
AbstractType abstract_type = 14;
}
message ListType {
Type elem_type = 1;
}
message MapType {
Type key_type = 1;
Type value_type = 2;
}
message FunctionType {
Type result_type = 1;
repeated Type arg_types = 2;
}
message AbstractType {
string name = 1;
repeated Type parameter_types = 2;
}
enum PrimitiveType {
PRIMITIVE_TYPE_UNSPECIFIED = 0;
BOOL = 1;
INT64 = 2;
UINT64 = 3;
DOUBLE = 4;
STRING = 5;
BYTES = 6;
}
enum WellKnownType {
WELL_KNOWN_TYPE_UNSPECIFIED = 0;
ANY = 1;
TIMESTAMP = 2;
DURATION = 3;
}
}
message Decl {
string name = 1;
oneof decl_kind {
IdentDecl ident = 2;
FunctionDecl function = 3;
}
message IdentDecl {
Type type = 1;
Constant value = 2;
string doc = 3;
}
message FunctionDecl {
repeated Overload overloads = 1;
message Overload {
string overload_id = 1;
repeated Type params = 2;
repeated string type_params = 3;
Type result_type = 4;
bool is_instance_function = 5;
string doc = 6;
}
}
}
message Reference {
string name = 1;
repeated string overload_id = 3;
Constant value = 4;
}
@@ -0,0 +1,128 @@
syntax = "proto3";
package google.api.expr.v1alpha1;
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
option cc_enable_arenas = true;
option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr";
option java_multiple_files = true;
option java_outer_classname = "SyntaxProto";
option java_package = "com.google.api.expr.v1alpha1";
message ParsedExpr {
Expr expr = 2;
SourceInfo source_info = 3;
}
message Expr {
int64 id = 2;
oneof expr_kind {
Constant const_expr = 3;
Ident ident_expr = 4;
Select select_expr = 5;
Call call_expr = 6;
CreateList list_expr = 7;
CreateStruct struct_expr = 8;
Comprehension comprehension_expr = 9;
}
message Ident {
string name = 1;
}
message Select {
Expr operand = 1;
string field = 2;
bool test_only = 3;
}
message Call {
Expr target = 1;
string function = 2;
repeated Expr args = 3;
}
message CreateList {
repeated Expr elements = 1;
repeated int32 optional_indices = 2;
}
message CreateStruct {
string message_name = 1;
repeated Entry entries = 2;
message Entry {
int64 id = 1;
Expr value = 4;
bool optional_entry = 5;
oneof key_kind {
string field_key = 2;
Expr map_key = 3;
}
}
}
message Comprehension {
string iter_var = 1;
string iter_var2 = 8;
Expr iter_range = 2;
string accu_var = 3;
Expr accu_init = 4;
Expr loop_condition = 5;
Expr loop_step = 6;
Expr result = 7;
}
}
message Constant {
oneof constant_kind {
protobuf.NullValue null_value = 1;
bool bool_value = 2;
int64 int64_value = 3;
uint64 uint64_value = 4;
double double_value = 5;
string string_value = 6;
bytes bytes_value = 7;
protobuf.Duration duration_value = 8 [deprecated = true];
protobuf.Timestamp timestamp_value = 9 [deprecated = true];
}
}
message SourceInfo {
string syntax_version = 1;
string location = 2;
repeated int32 line_offsets = 3;
map<int64, int32> positions = 4;
map<int64, Expr> macro_calls = 5;
repeated Extension extensions = 6;
message Extension {
string id = 1;
repeated Component affected_components = 2;
enum Component {
COMPONENT_UNSPECIFIED = 0;
COMPONENT_PARSER = 1;
COMPONENT_TYPE_CHECKER = 2;
COMPONENT_RUNTIME = 3;
}
Version version = 3;
message Version {
int64 major = 1;
int64 minor = 2;
}
}
}
message SourcePosition {
string location = 1;
int32 offset = 2;
int32 line = 3;
int32 column = 4;
}