@tdxvolt/volt-client-grpc 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@tdxvolt/volt-client-grpc",
3
+ "publishConfig": {
4
+ "access": "public"
5
+ },
6
+ "version": "0.1.0",
7
+ "description": "tdx Volt library for nodejs clients",
8
+ "type": "module",
9
+ "exports": {
10
+ ".": {
11
+ "require": "./lib/index.cjs",
12
+ "import": "./src/index.js"
13
+ },
14
+ "./package.json": "./package.json"
15
+ },
16
+ "files": [
17
+ "lib",
18
+ "src",
19
+ "protobuf"
20
+ ],
21
+ "scripts": {
22
+ "build": "rollup -c",
23
+ "dev": "rollup -c -w",
24
+ "prepare": "npm run build"
25
+ },
26
+ "devDependencies": {
27
+ "@rollup/plugin-commonjs": "^19.0.0",
28
+ "@rollup/plugin-node-resolve": "^13.0.0",
29
+ "escodegen": "^1.14.3",
30
+ "espree": "^3.5.4",
31
+ "installing": "^1.0.0",
32
+ "jsdoc": "^3.6.10",
33
+ "rollup": "^2.52.6",
34
+ "uglify-js": "^3.15.5"
35
+ },
36
+ "author": "toby.ealden@gmail.com",
37
+ "license": "ISC",
38
+ "dependencies": {
39
+ "@grpc/proto-loader": "^0.6.4",
40
+ "bent": "^7.3.12",
41
+ "bs58": "^4.0.1",
42
+ "debug": "^4.1.1",
43
+ "ip": "^1.1.5",
44
+ "jsonwebtoken": "^8.5.1",
45
+ "lodash": "^4.17.15",
46
+ "minimist": "^1.2.0",
47
+ "node-forge": "^0.9.0",
48
+ "uuid": "^8.1.0"
49
+ }
50
+ }
@@ -0,0 +1,4 @@
1
+ # tdx Volt protobuf
2
+
3
+ **WARNING** - this is a duplication of the protobuf defined in https://github.com/tdxvolt/tdxvolt-core, which is the
4
+ source of truth.
@@ -0,0 +1,43 @@
1
+ syntax = "proto3";
2
+
3
+ package tdx.volt_api.data.v1;
4
+
5
+ // Just reflect SQLite types for now.
6
+ enum ColumnType {
7
+ COLUMN_TYPE_UNKNOWN = 0;
8
+ COLUMN_TYPE_TEXT = 1;
9
+ COLUMN_TYPE_INTEGER = 2;
10
+ COLUMN_TYPE_REAL = 3;
11
+ COLUMN_TYPE_BLOB = 4;
12
+ COLUMN_TYPE_NULL = 5;
13
+ }
14
+
15
+ message Column {
16
+ string name = 1;
17
+ string description = 2;
18
+ ColumnType type = 3;
19
+ }
20
+
21
+ message Schema {
22
+ string name = 1;
23
+ string description = 2;
24
+ repeated Column column = 3;
25
+ }
26
+
27
+ message Variant {
28
+ ColumnType type = 1;
29
+ oneof data {
30
+ string text = 2;
31
+ int64 integer = 3;
32
+ double real = 4;
33
+ bytes blob = 5;
34
+ }
35
+ }
36
+
37
+ message RowHeader {
38
+ repeated Column column = 1;
39
+ }
40
+
41
+ message VariantRow {
42
+ repeated Variant column = 1;
43
+ }
@@ -0,0 +1,105 @@
1
+ syntax = "proto3";
2
+
3
+ package tdx.volt_api.data.v1;
4
+
5
+ import "tdx/volt_api/volt/v1/status.proto";
6
+ import "tdx/volt_api/data/v1/sqlite.proto";
7
+
8
+ // The Sqlite Database API exposes functions that enable clients to manipulate data in a given Volt database.
9
+ // Use the Sqlite Server API to create the database resource.
10
+ service SqliteDatabaseAPI {
11
+ // Execute multiple SQL statements in a single transaction via a single RPC.
12
+ rpc BulkUpdate(SqlBulkUpdateRequest) returns (SqlBulkUpdateResponse);
13
+
14
+ // Execute a single SQL statement. Any valid SQL is accepted. In order to execute non-SELECT statements, the caller must have the "write" permission.
15
+ rpc Execute(stream SqlExecuteRequest) returns (stream SqlExecuteResponse);
16
+
17
+ // Import CSV data into a table.
18
+ // The data can either be streamed in chunks or retrieved from an existing resource.
19
+ // If the data is streamed in chunks, the client must call the Close() method on the stream to indicate that it has finished.
20
+ rpc ImportCSV(stream SqlImportCSVRequest) returns (stream SqlImportCSVResponse);
21
+ }
22
+
23
+ message SqlBulkUpdateRequest {
24
+ // The id of the database to update.
25
+ string database_id = 1;
26
+
27
+ // The SQL statements to execute. The statements will be executed within a transaction and will be committed if all statements succeed.
28
+ // Bear in mind the maximum size limit of a single message is 64MB, and around 1MB seems to be optimal in terms of performance.
29
+ repeated string statement = 2;
30
+ }
31
+
32
+ message SqlBulkUpdateResponse {
33
+ // Details of any error that occurred on the call.
34
+ tdx.volt_api.volt.v1.Status status = 1;
35
+ }
36
+
37
+ // The initial request should include the `database_id` and `statement` fields and an optional `page_size` for SELECT statements.
38
+ // To retrieve subsequent pages, send another request with just the `page_size` field set.
39
+ message SqlExecuteRequest {
40
+ // The id of the database to execute the statement on, only necessary on the first request message.
41
+ string database_id = 1;
42
+
43
+ // The SQL statement to execute, only necessary on the first request message.
44
+ string statement = 2;
45
+
46
+ // This can be used to limit the number of rows returned by `SELECT` statements to avoid overloading a client. It is similar to using 'LIMIT/OFFSET' clauses on the 'SELECT' statement, but this method is easier to manage and the entire result set will be prepared on the Volt, and the client can then page through it by sending successive messages.
47
+ uint32 page_size = 3;
48
+ }
49
+
50
+ message SqlExecuteResponse {
51
+ oneof payload {
52
+ // A status will be sent on error.
53
+ tdx.volt_api.volt.v1.Status status = 1;
54
+
55
+ // The initial response for SELECT statements will be a header containing the column names and types.
56
+ RowHeader header = 2;
57
+
58
+ // Each row in the result set will be sent as a VariantRow.
59
+ VariantRow row = 3;
60
+
61
+ // NYI - For INSERT/UPDATE statements the number of affected rows will be sent.
62
+ uint32 affected_rows = 4;
63
+ }
64
+ }
65
+
66
+ message SqlImportCSVConfiguration {
67
+ // The target database resource id, which must already exist, and the authenticated account must have write access to the resource.
68
+ string database_id = 1;
69
+
70
+ // The target table name.
71
+ string table_name = 2;
72
+
73
+ // Not yet implemented - flag indicating that data is to be inserted into an existing table.
74
+ bool create_table = 3;
75
+
76
+ // Optional - when not sending the data via this RPC, this should contain the id of a resource that contains the CSV data. If set, the authenticated account must have read access to the resource.
77
+ string source_resource_id = 4;
78
+
79
+ // Optional - the interval to receive progress updates, in number of rows. E.g. set to 1000 to receive progress updates every 1000 rows. Set to 0 to disable progress updates.
80
+ uint32 progress_interval = 5;
81
+ }
82
+
83
+ message SqlImportCSVRequest {
84
+ oneof payload {
85
+ // The initial request must contain the configuration parameters for the import.
86
+ SqlImportCSVConfiguration configuration = 1;
87
+
88
+ // Subsequent requests may contain the data to be imported, unless importing from an existing resource that contains the CSV data. It is recommended that the block size is less than 1MB.
89
+ bytes block = 2;
90
+
91
+ // Set to abort the import.
92
+ bool abort = 3;
93
+ }
94
+ }
95
+
96
+ message SqlImportCSVResponse {
97
+ // The status will contain any error info.
98
+ tdx.volt_api.volt.v1.Status status = 1;
99
+
100
+ // The number of rows processed - this will be sent after every `progress_interval` rows.
101
+ int64 row_count = 2;
102
+
103
+ // The total number of rows to be imported.
104
+ int64 total_rows = 3;
105
+ }
@@ -0,0 +1,42 @@
1
+ syntax = "proto3";
2
+
3
+ package tdx.volt_api.data.v1;
4
+
5
+ import "tdx/volt_api/volt/v1/status.proto";
6
+ import "tdx/volt_api/volt/v1/volt.proto";
7
+
8
+ // The Sqlite Server API provides database management functions.
9
+ // Use the VoltAPI DeleteResource function to delete a database.
10
+ service SqliteServerAPI {
11
+ // Create a new database resource.
12
+ rpc CreateDatabase(CreateDatabaseRequest) returns (CreateDatabaseResponse);
13
+ }
14
+
15
+ message CreateDatabaseRequest {
16
+ // The name of the database to create.
17
+ string name = 1;
18
+
19
+ // Optional - the id of the folder resource in which to create the database. If omitted, the callers home folder is used.
20
+ string create_in_parent_id = 2;
21
+
22
+ // Set to encrypt the database. The encryption key will be generated by the server, the internal Volt server uses the root volt key.
23
+ bool encrypted = 3;
24
+
25
+ // Set to audit all SELECT database operations.
26
+ bool read_audit = 4;
27
+
28
+ // Set to audit all INSERT, UPDATE, and DELETE database operations.
29
+ bool write_audit = 5;
30
+
31
+ // The discovery mode of the underlying Volt resource.
32
+ tdx.volt_api.volt.v1.DiscoveryMode discoverable = 6;
33
+ }
34
+
35
+ message CreateDatabaseResponse {
36
+ // Any error message will be returned here.
37
+ tdx.volt_api.volt.v1.Status status = 1;
38
+
39
+ // The new database resource on success.
40
+ tdx.volt_api.volt.v1.Resource resource = 2;
41
+ }
42
+
@@ -0,0 +1,37 @@
1
+ syntax = "proto3";
2
+
3
+ package tdx.volt_api.ssi.v1;
4
+
5
+ import "tdx/volt_api/volt/v1/status.proto";
6
+
7
+ // Volt DIDs are essentially 'peer DIDs', i.e. they are not globally resolvable.
8
+ // TDX DIDs are globally resolvable.
9
+
10
+ service SsiAPI {
11
+ rpc ResolveDID(ResolveDIDRequest) returns (ResolveDIDResponse);
12
+ rpc TrustVerifiableCredential(TrustVerifiableCredentialRequest) returns (TrustVerifiableCredentialResponse);
13
+ }
14
+
15
+ //
16
+ // Do we need to support/differentiate between plain DIDs and DID urls here?
17
+ // Where a DID url is a DID followed by some additional lookup info,
18
+ // e.g. did:tdx:volt:92181ffa-072a-452a-ae79-a243ab2812fc;service=/some/service?query#fragment
19
+ //
20
+ message ResolveDIDRequest {
21
+ string did_url = 1;
22
+ }
23
+
24
+ message ResolveDIDResponse {
25
+ tdx.volt_api.volt.v1.Status status = 1;
26
+ string did_document_json = 2;
27
+ }
28
+
29
+ // Empty ATM - a VC is issued for the authenticated identity.
30
+ message TrustVerifiableCredentialRequest {
31
+ }
32
+
33
+ message TrustVerifiableCredentialResponse {
34
+ tdx.volt_api.volt.v1.Status status = 1;
35
+ string verifiable_credential_json = 2;
36
+ }
37
+
@@ -0,0 +1,14 @@
1
+ syntax = "proto3";
2
+
3
+ package tdx.volt_api.sync.v1;
4
+
5
+ message ProtobufSyncConfiguration {
6
+ // The actual protobuf definition text.
7
+ string message_proto = 1;
8
+ // The name of the message within `message_proto` above that represents the data to be synched.
9
+ string message_name = 2;
10
+ // The name of the table within the target database.
11
+ string table_name = 3;
12
+ // Optional maximum size of the serialised messages, this doesn't need to be exact and the default is 64K if omitted.
13
+ int32 maximum_message_size = 6;
14
+ }
@@ -0,0 +1,9 @@
1
+ syntax = "proto3";
2
+
3
+ package tdx.volt_api.tunnel.v1;
4
+
5
+ // Placeholder API for the proxy.
6
+ // Methods are injected into this service at runtime
7
+ // when a remote volt connects via the TunnelAPI.
8
+ service ProxyAPI {
9
+ }
@@ -0,0 +1,77 @@
1
+ syntax = "proto3";
2
+
3
+ package tdx.volt_api.tunnel.v1;
4
+
5
+ import "tdx/volt_api/volt/v1/status.proto";
6
+ import "tdx/volt_api/volt/v1/remote.proto";
7
+ import "tdx/volt_api/volt/v1/volt.proto";
8
+
9
+ service TunnelAPI {
10
+ // Retrieve the list of Volts available on the tunnel server (Volt-based or cloud-based).
11
+ rpc GetVoltEndpoint(GetVoltEndpointRequest) returns (GetVoltEndpointResponse);
12
+
13
+ // This is the actual tunnel stream.
14
+ rpc Tunnel(stream tdx.volt_api.volt.v1.RemoteRequest) returns (stream tdx.volt_api.volt.v1.RemoteResponse);
15
+
16
+ // This is the tunnel stream for cloud-based tunnels.
17
+ rpc CloudTunnel(stream TunnelRequest) returns (stream TunnelResponse);
18
+ }
19
+
20
+ message GetVoltEndpointRequest {
21
+ // Optional - if omitted a list of all volts known to the authenticated
22
+ // account will be returned.
23
+ oneof filter {
24
+ // Filter on the owning identity.
25
+ string owner_id = 2;
26
+ // Filter on volt id.
27
+ string volt_id = 1;
28
+ }
29
+ }
30
+
31
+ message GetVoltEndpointResponse {
32
+ tdx.volt_api.volt.v1.Status status = 1;
33
+ repeated tdx.volt_api.volt.v1.VoltEndpoint endpoints = 2;
34
+ }
35
+
36
+ message TunnelStart {
37
+ uint32 preferred_port = 1;
38
+ string local_address = 2;
39
+ string public_key = 3;
40
+ string fingerprint = 4;
41
+ string ca_pem = 5;
42
+ string volt_version = 6;
43
+ }
44
+
45
+ message TunnelServiceControl {
46
+ string resource_id = 1;
47
+ string service_name = 2;
48
+ tdx.volt_api.volt.v1.ServiceDescription service_description = 3;
49
+ }
50
+
51
+ message TunnelControl {
52
+ oneof msg {
53
+ TunnelStart start = 2;
54
+ TunnelServiceControl add_service = 3;
55
+ TunnelServiceControl remove_service = 4;
56
+ }
57
+ }
58
+
59
+ message TunnelRequest {
60
+ oneof payload {
61
+ tdx.volt_api.volt.v1.RemotePing ping = 1;
62
+ TunnelControl control = 2;
63
+ tdx.volt_api.volt.v1.MethodPayload method_payload = 3;
64
+ tdx.volt_api.volt.v1.MethodEnd method_end = 4;
65
+ tdx.volt_api.volt.v1.HttpResponse http_response = 5;
66
+ }
67
+ }
68
+
69
+ message TunnelResponse {
70
+ oneof payload {
71
+ tdx.volt_api.volt.v1.RemotePing ping = 1;
72
+ tdx.volt_api.volt.v1.MethodInvoke method_invoke = 2;
73
+ tdx.volt_api.volt.v1.MethodPayload method_payload = 3;
74
+ tdx.volt_api.volt.v1.MethodEnd method_end = 4;
75
+ tdx.volt_api.volt.v1.HttpRequest http_request = 5;
76
+ }
77
+ }
@@ -0,0 +1,39 @@
1
+ syntax = "proto3";
2
+
3
+ package tdx.volt_api.volt.v1;
4
+
5
+ import "tdx/volt_api/volt/v1/status.proto";
6
+ import "tdx/volt_api/volt/v1/volt.proto";
7
+
8
+ // The public Volt discovery service.
9
+ // This is exposed by the Volt battery over an INSECURE grpc channel.
10
+ // This insecurity is ameliorated by the fact that discovered Volts return signatures of their challenge code and owner credential.
11
+ // Note that only Volts that have explicitly set 'discoverable' in the Volt settings will be discovered.
12
+ service DiscoveryAPI {
13
+ rpc Discover(DiscoverRequest) returns (DiscoverResponse) {};
14
+ }
15
+
16
+ message DiscoverRequest {
17
+ // Set to require that only Volts that expose a tunnel be included in the response.
18
+ bool require_tunnel = 1;
19
+ }
20
+
21
+ message SignedEndpoint {
22
+ // The discovered Volt endpoint information.
23
+ tdx.volt_api.volt.v1.VoltEndpoint endpoint = 1;
24
+
25
+ // The discovered Volt's challenge code, signed by the Volt private key and base64 encoded.
26
+ // If a client knows the Volt challenge code by some out-of-band means, it can use the Volt public key (contained in the endpoint information above) to determine that the discovered Volt also knows the same challenge code.
27
+ string challenge_signature = 2;
28
+
29
+ // The discovered Volt's owner credential, signed by the Volt private key and base64 encoded.
30
+ // A client can use this to discover all Volts owned by a specific user.
31
+ string owner_credential_signature = 4;
32
+ }
33
+
34
+ message DiscoverResponse {
35
+ tdx.volt_api.volt.v1.Status status = 1;
36
+
37
+ // A list of endpoints that match the request criteria.
38
+ repeated SignedEndpoint endpoints = 2;
39
+ }
@@ -0,0 +1,17 @@
1
+ syntax = "proto3";
2
+
3
+ package tdx.volt_api.volt.v1;
4
+
5
+ message File {
6
+ string file_path = 1;
7
+ string absolute_path = 2;
8
+ string file_name = 3;
9
+ string extension = 4;
10
+ uint64 size = 5;
11
+ string media_type = 6;
12
+ bool is_directory = 7;
13
+ uint64 modified = 8;
14
+
15
+ string resource_id = 100;
16
+ string owner_resource_id = 101;
17
+ }
@@ -0,0 +1,117 @@
1
+ syntax = "proto3";
2
+
3
+ package tdx.volt_api.volt.v1;
4
+
5
+ import "tdx/volt_api/volt/v1/status.proto";
6
+ import "tdx/volt_api/volt/v1/file.proto";
7
+
8
+ // The File API exposes basic file management functions.
9
+ service FileAPI {
10
+
11
+ // Download from file resource.
12
+ rpc DownloadFile(DownloadFileRequest) returns (stream DownloadFileResponse);
13
+
14
+ // Get file resource metadata.
15
+ rpc GetFile(GetFileRequest) returns (GetFileResponse);
16
+
17
+ // Get the file resource metadata of all descendants of a given file resource.
18
+ rpc GetFileDescendants(GetFileDescendantsRequest) returns (GetFileDescendantsResponse);
19
+
20
+ // Upload data to a file resource.
21
+ rpc UploadFile(stream UploadFileRequest) returns (stream UploadFileResponse);
22
+ }
23
+
24
+ message DownloadFileRequest {
25
+ // The id of the resource to download.
26
+ string resource_id = 1;
27
+
28
+ // This is required for linked folders, and represents the relative path to the source file from the base folder.
29
+ string file_path = 2;
30
+ }
31
+
32
+ message DownloadFileResponse {
33
+ oneof payload {
34
+ // A chunk of file data.
35
+ bytes block = 1;
36
+
37
+ // A status will be sent when the file is completely downloaded, or if an error occurs.
38
+ tdx.volt_api.volt.v1.Status status = 2;
39
+ }
40
+ }
41
+
42
+ message GetFileRequest {
43
+ // The resource id of the base folder.
44
+ string resource_id = 1;
45
+
46
+ // Optional - the path to the file, relative to the base folder. Required for linked folders.
47
+ string file_path = 2;
48
+ }
49
+
50
+ message GetFileResponse {
51
+ // Details of any error that occurred on the call.
52
+ tdx.volt_api.volt.v1.Status status = 1;
53
+
54
+ // The file metadata.
55
+ File file = 2;
56
+ }
57
+
58
+ message GetFileDescendantsRequest {
59
+ // The resource id of the base folder.
60
+ string resource_id = 1;
61
+
62
+ // For linked files, this is the relative path to the 'parent' file from the base folder.
63
+ string file_path = 2;
64
+
65
+ // Optional - only match descendants of the given kind.
66
+ string extension = 3;
67
+
68
+ // Optional - can be used to determine if a resource is a descendant.
69
+ string descendant_id = 5;
70
+ }
71
+
72
+ message GetFileDescendantsResponse {
73
+ // Details of any error that occurred on the call.
74
+ tdx.volt_api.volt.v1.Status status = 1;
75
+
76
+ // The list of descendants.
77
+ repeated File descendants = 2;
78
+ }
79
+
80
+ message UploadFileStart {
81
+ // The resource to upload to, required.
82
+ string resource_id = 1;
83
+
84
+ // Optional store name to use.
85
+ string store_name = 2;
86
+
87
+ // Optionally set streaming mode.
88
+ // When in streaming mode, data is written directly to the resource.
89
+ // Otherwise, data is written to a temporary file and then copied over once the upload completes successfully.
90
+ bool streaming_mode = 3;
91
+
92
+ // Optional, truncates the file prior to beginning the upload. This is only really relevant if 'streaming_mode' is set.
93
+ bool truncate = 4;
94
+
95
+ // Optional, buffer will flush after each write.
96
+ bool eager_flush = 5;
97
+ }
98
+
99
+ // One of the following fields must be present.
100
+ message UploadFileRequest {
101
+ oneof payload {
102
+ // Describes the file upload, should only be sent as first message.
103
+ UploadFileStart start = 1;
104
+
105
+ // The next block of data.
106
+ bytes block = 2;
107
+ }
108
+ }
109
+
110
+ message UploadFileResponse {
111
+ // Details of any error that occurred on the call.
112
+ tdx.volt_api.volt.v1.Status status = 1;
113
+
114
+ // Reserved for internal use.
115
+ bool back_off = 2;
116
+ }
117
+
@@ -0,0 +1,94 @@
1
+ syntax = "proto3";
2
+
3
+ package tdx.volt_api.volt.v1;
4
+
5
+ message HttpInvoke {
6
+ string host = 1;
7
+ int32 port = 2;
8
+ string method = 3;
9
+ string url = 4;
10
+ string version = 5;
11
+ map <string, string> headers = 6;
12
+ bytes body = 7;
13
+ }
14
+
15
+ message HttpPayload {
16
+ bytes chunk = 1;
17
+ oneof end_ {
18
+ bool end = 2;
19
+ }
20
+ oneof error_ {
21
+ int32 error = 3;
22
+ }
23
+ }
24
+
25
+ message HttpRequest {
26
+ uint64 id = 1;
27
+ oneof payload {
28
+ HttpInvoke http_invoke = 2;
29
+ HttpPayload http_payload = 3;
30
+ }
31
+ }
32
+
33
+ message HttpResponse {
34
+ uint64 id = 1;
35
+ HttpPayload http_payload = 7;
36
+ }
37
+
38
+ enum MethodType {
39
+ METHOD_TYPE_UNKNOWN = 0;
40
+ METHOD_TYPE_UNARY = 1;
41
+ METHOD_TYPE_CLIENT_STREAM = 2;
42
+ METHOD_TYPE_SERVER_STREAM = 3;
43
+ METHOD_TYPE_BIDI = 4;
44
+ }
45
+
46
+ message MethodInvoke {
47
+ uint64 id = 1;
48
+ string service_id = 2;
49
+ string method_name = 3;
50
+ MethodType method_type = 4;
51
+ string token = 5;
52
+ oneof invoke_request {
53
+ bytes request = 6;
54
+ string json_request = 7;
55
+ }
56
+ }
57
+
58
+ message MethodPayload {
59
+ uint64 id = 1;
60
+ oneof method_payload {
61
+ bytes payload = 2;
62
+ string json_payload = 3;
63
+ }
64
+ }
65
+
66
+ message MethodEnd {
67
+ uint64 id = 1;
68
+ bool ended = 4;
69
+ string error = 5;
70
+ int32 error_code = 6;
71
+ }
72
+
73
+ message RemotePing {
74
+ uint64 timestamp = 1;
75
+ }
76
+
77
+ message RemoteRequest {
78
+ oneof payload {
79
+ RemotePing ping = 1;
80
+ MethodPayload method_payload = 3;
81
+ MethodEnd method_end = 4;
82
+ HttpResponse http_response = 5;
83
+ }
84
+ }
85
+
86
+ message RemoteResponse {
87
+ oneof payload {
88
+ RemotePing ping = 1;
89
+ MethodInvoke method_invoke = 2;
90
+ MethodPayload method_payload = 3;
91
+ MethodEnd method_end = 4;
92
+ HttpRequest http_request = 5;
93
+ }
94
+ }
@@ -0,0 +1,15 @@
1
+ syntax = "proto3";
2
+
3
+ package tdx.volt_api.volt.v1;
4
+
5
+ message Status {
6
+ // A simple error code that can be easily handled by the client.
7
+ // Mirrors the grpc StatusCode enum, 0 => OK
8
+ int32 code = 1;
9
+
10
+ // A developer-facing human-readable error message in English. It should both explain the error and offer an actionable resolution to it.
11
+ string message = 2;
12
+
13
+ // Long form error description.
14
+ string description = 3;
15
+ }