Skip to content

Commit

Permalink
Move messages for datatypes to shared
Browse files Browse the repository at this point in the history
  • Loading branch information
Taucher2003 committed Nov 22, 2024
1 parent 405a0dd commit e8e9b55
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 37 deletions.
39 changes: 2 additions & 37 deletions proto/sagittarius/datatype.proto
Original file line number Diff line number Diff line change
@@ -1,47 +1,12 @@
syntax = "proto3";
import "translations.proto";
import "google/protobuf/any.proto";
import "datatype_definition.proto";

option ruby_package = "Tucana::Sagittarius";

package sagittarius;

message DataType {
enum Variant {
UNKNOWN = 0;
PRIMITIVE = 1;
TYPE = 2;
OBJECT = 3;
DATATYPE = 4;
ARRAY = 5;
GENERIC = 6;
FUNCTION = 7;
}

shared.Translation name = 1;
Variant variant = 2;
repeated DataTypeRule rules = 3;
repeated DataType input_types = 4;
optional DataType return_type = 5;
optional DataType parent_type = 6;
}

message DataTypeRule {
enum Variant {
UNKNOWN = 0;
REGEX = 1;
NUMBER_RANGE = 2;
ITEM_OF_COLLECTION = 3;
CONTAINS_TYPE = 4;
CONTAINS_KEY = 5;
}

Variant variant = 1;
map<string, google.protobuf.Any> config = 2;
}

message DataTypeUpdateRequest {
repeated DataType data_types = 1;
repeated shared.DataType data_types = 1;
}

message DataTypeUpdateResponse {
Expand Down
41 changes: 41 additions & 0 deletions proto/shared/datatype_definition.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
syntax = "proto3";
import "google/protobuf/any.proto";
import "translations.proto";

option ruby_package = "Tucana::Shared";

package shared;

message DataType {
enum Variant {
UNKNOWN = 0;
PRIMITIVE = 1;
TYPE = 2;
OBJECT = 3;
DATATYPE = 4;
ARRAY = 5;
GENERIC = 6;
FUNCTION = 7;
}

Translation name = 1;
Variant variant = 2;
repeated DataTypeRule rules = 3;
repeated DataType input_types = 4;
optional DataType return_type = 5;
optional DataType parent_type = 6;
}

message DataTypeRule {
enum Variant {
UNKNOWN = 0;
REGEX = 1;
NUMBER_RANGE = 2;
ITEM_OF_COLLECTION = 3;
CONTAINS_TYPE = 4;
CONTAINS_KEY = 5;
}

Variant variant = 1;
map<string, google.protobuf.Any> config = 2;
}

0 comments on commit e8e9b55

Please sign in to comment.