aboutsummaryrefslogtreecommitdiffstats
path: root/proto/val.proto
diff options
context:
space:
mode:
authorRoger Zanoni <rzanoni@igalia.com>2024-01-03 13:52:10 -0300
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2024-01-29 12:07:45 +0000
commit52aabdb011279871468269802e056f0ec48511e4 (patch)
treed040640cad2272f58e097909cb4eb59daec997a1 /proto/val.proto
parent38587cf96c096a204cd742fff9fea4f8e465393a (diff)
Update mixer app to use grpc-web instead of websockets
Adapt the HTML5 applications to use kuksa.val service Bug-AGL: SPEC-4599 Signed-off-by: Roger Zanoni <rzanoni@igalia.com> Change-Id: Ic67ff781be4080c45bdbc6abe20d696aeda08eb1
Diffstat (limited to 'proto/val.proto')
-rw-r--r--proto/val.proto115
1 files changed, 115 insertions, 0 deletions
diff --git a/proto/val.proto b/proto/val.proto
new file mode 100644
index 0000000..2d65b7c
--- /dev/null
+++ b/proto/val.proto
@@ -0,0 +1,115 @@
+/********************************************************************************
+ * Copyright (c) 2022 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.val.v1;
+
+option go_package = "kuksa/val/v1";
+
+import "types.proto";
+
+// Note on authorization:
+// Tokens (auth-token or auth-uuid) are sent as (GRPC / http2) metadata.
+//
+// The auth-token is a JWT compliant token as the examples found here:
+// https://github.com/eclipse/kuksa.val/tree/master/kuksa_certificates/jwt
+//
+// See also https://github.com/eclipse/kuksa.val/blob/master/doc/jwt.md
+//
+// Upon reception of auth-token, server shall generate an auth-uuid in metadata
+// that the client can use instead of auth-token in subsequent calls.
+
+service VAL {
+ // Get entries
+ rpc Get(GetRequest) returns (GetResponse);
+
+ // Set entries
+ rpc Set(SetRequest) returns (SetResponse);
+
+ // Subscribe to a set of entries
+ //
+ // Returns a stream of notifications.
+ //
+ // InvalidArgument is returned if the request is malformed.
+ rpc Subscribe(SubscribeRequest) returns (stream SubscribeResponse);
+
+ // Shall return information that allows the client to determine
+ // what server/server implementation/version it is talking to
+ // eg. kuksa-databroker 0.5.1
+ rpc GetServerInfo(GetServerInfoRequest) returns (GetServerInfoResponse);
+}
+
+// Define which data we want
+message EntryRequest {
+ string path = 1;
+ View view = 2;
+ repeated Field fields = 3;
+}
+
+// Request a set of entries.
+message GetRequest {
+ repeated EntryRequest entries = 1;
+}
+
+// Global errors are specified in `error`.
+// Errors for individual entries are specified in `errors`.
+message GetResponse {
+ repeated DataEntry entries = 1;
+ repeated DataEntryError errors = 2;
+ Error error = 3;
+}
+
+// Define the data we want to set
+message EntryUpdate {
+ DataEntry entry = 1;
+ repeated Field fields = 2;
+}
+
+// A list of entries to be updated
+message SetRequest {
+ repeated EntryUpdate updates = 1;
+}
+
+// Global errors are specified in `error`.
+// Errors for individual entries are specified in `errors`.
+message SetResponse {
+ Error error = 1;
+ repeated DataEntryError errors = 2;
+}
+
+// Define what to subscribe totime
+message SubscribeEntry {
+ string path = 1;
+ View view = 2;
+ repeated Field fields = 3;
+}
+
+// Subscribe to changes in datapoints.
+message SubscribeRequest {
+ repeated SubscribeEntry entries = 1;
+}
+
+// A subscription response
+message SubscribeResponse {
+ repeated EntryUpdate updates = 1;
+}
+
+message GetServerInfoRequest {
+ // Nothing yet
+}
+
+message GetServerInfoResponse {
+ string name = 1;
+ string version = 2;
+}