-
Notifications
You must be signed in to change notification settings - Fork 51
/
kuksa.proto
95 lines (78 loc) · 1.99 KB
/
kuksa.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/********************************************************************************
* Copyright (c) 2021 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License 2.0 which is available at
* http://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/
syntax = "proto3";
package kuksa;
import "google/protobuf/timestamp.proto";
option go_package = "/kuksa_grpc_proto";
// The connecting service definition.
service kuksa_grpc_if {
rpc get (GetRequest) returns (GetResponse) {}
rpc set (SetRequest) returns (SetResponse) {}
rpc subscribe (stream SubscribeRequest) returns (stream SubscribeResponse) {}
rpc authorize (AuthRequest) returns (AuthResponse) {}
}
message AuthRequest {
string token = 1;
}
message GetRequest {
RequestType type = 1;
repeated string path = 2;
}
message GetResponse {
repeated Value values = 1;
Status status = 2;
}
message SetRequest {
RequestType type = 1;
repeated Value values = 2;
}
message SetResponse {
Status status = 1;
}
message AuthResponse {
string connectionId = 1;
Status status = 2;
}
message SubscribeRequest {
RequestType type = 1;
string path = 2;
bool start = 3;
}
message SubscribeResponse {
Value values = 1;
Status status = 2;
}
message Value {
string path = 1;
oneof val {
uint32 valueUint32 = 2;
int32 valueInt32 = 3;
uint64 valueUint64 = 4;
int64 valueInt64 = 5;
bool valueBool = 6;
float valueFloat = 7;
double valueDouble = 8;
string valueString = 9;
}
google.protobuf.Timestamp timestamp=10;
}
message Status {
uint32 statusCode = 1;
string statusDescription = 2;
}
enum RequestType {
UNKNOWN_TYPE = 0;
CURRENT_VALUE = 1;
TARGET_VALUE = 2;
METADATA = 3;
};