-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement datatypes into sagittarius protocol
- Loading branch information
1 parent
d23f291
commit 68dbe87
Showing
3 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
syntax = "proto3"; | ||
import "translations.proto"; | ||
import "google/protobuf/any.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; | ||
} | ||
|
||
message DataTypeUpdateResponse { | ||
bool success = 1; | ||
} | ||
|
||
service DataTypeService { | ||
rpc Update(DataTypeUpdateRequest) returns (DataTypeUpdateResponse) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
syntax = "proto3"; | ||
|
||
option ruby_package = "Tucana::Shared"; | ||
|
||
package shared; | ||
|
||
message Translation { | ||
string code = 1; | ||
string text = 2; | ||
} |