This repository has been archived by the owner on Jun 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit of protobuf specifications
- Loading branch information
0 parents
commit 00e5549
Showing
4 changed files
with
72 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# CodeCtrl Protobuf Files | ||
|
||
This repository contains the files that define the communication between the | ||
CodeCtrl language loggers and the CodeCtrl log server that runs in the | ||
background. This repository is intended to be used as a submodule for each | ||
language logger to use to build against. | ||
|
||
gPRC-specific documentation for most languages can be seen | ||
[here](https://grpc.io/docs/languages/), though not all languages are listed. | ||
Rust has [tonic](https://crates.io/crates/tonic) which is what is being used | ||
inside CodeCtrl and works more than well enough. C has | ||
[juniper/gprc-c](https://github.com/juniper/grpc-c), but it seems unmaintained, | ||
may be worth using the main gPRC repo and using the core library instead as | ||
mentioned in the [table under this heading in the main | ||
repository](https://github.com/grpc/grpc#about-this-repository). |
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,11 @@ | ||
syntax = "proto3"; | ||
|
||
package backtrace_data; | ||
|
||
message BacktraceData { | ||
string name = 1; | ||
string filePath = 2; | ||
uint32 lineNumber = 3; | ||
uint32 columnNumber = 4; | ||
string code = 5; | ||
} |
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,29 @@ | ||
|
||
syntax = "proto3"; | ||
|
||
package logs_service; | ||
|
||
import "log.proto"; | ||
|
||
message Empty {} | ||
|
||
enum Received { | ||
CONFIRMED = 0; | ||
ERROR = 1; | ||
} | ||
|
||
message ReceivedResult { | ||
string message = 1; | ||
Received status = 2; | ||
} | ||
|
||
service Logs { | ||
// Implemented and used by the GUI | ||
rpc GetLog(Empty) returns (log.Log) {} | ||
rpc GetLogs(Empty) returns (stream log.Log) {} | ||
|
||
// Implemented and used by each language logger | ||
rpc SendLog(log.Log) returns (ReceivedResult) {} | ||
rpc SendLogs(stream log.Log) returns (ReceivedResult) {} | ||
} | ||
|
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,17 @@ | ||
syntax = "proto3"; | ||
|
||
package log; | ||
|
||
import "backtrace_data.proto"; | ||
|
||
message Log { | ||
repeated backtrace_data.BacktraceData stack = 1; | ||
uint32 lineNumber = 2; | ||
map<string, string> codeSnippet = 3; | ||
string message = 4; | ||
string messageType = 5; | ||
string fileName = 6; | ||
string address = 7; | ||
string language = 8; | ||
repeated string warnings = 9; | ||
} |