summaryrefslogtreecommitdiff
path: root/proto/ormos.proto
blob: 700bd70bcdf470986a53336373a22f90dcc68b8e (plain)
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
syntax = "proto3";

package unit.containers.v0;

service Ormos {
  rpc ListUsbDevices (ListUsbDevicesRequest) returns (ListUsbDevicesResponse) {}
  rpc MountUsbDevice (MountUsbDeviceRequest) returns (MountUsbDeviceResponse) {}
  rpc UnmountUsbDevice (UnmountUsbDeviceRequest) returns (UnmountUsbDeviceResponse) {}

  rpc ListImageArchives (ListImageArchivesRequest) returns (ListImageArchivesResponse) {}
  rpc LoadImageArchive (LoadImageArchiveRequest) returns (LoadImageArchiveResponse) {}
  rpc InspectImageArchive (InspectImageArchiveRequest) returns (InspectImageArchiveResponse) {}
}

message MountUsbDeviceRequest {
  string device_path = 1;
  string mount_point = 2;
}

message MountUsbDeviceResponse {
  bool is_success = 1;
  string error_message = 2;
}

message ListUsbDevicesRequest {}

message ListUsbDevicesResponse {
  repeated UsbDevice devices = 1;
}

message UnmountUsbDeviceRequest {
  string mount_point = 1;
}

message UnmountUsbDeviceResponse {
  bool is_success = 1;
  string error_message = 2;
}

message UsbDevice {
  string device_path = 1;
  bool is_mounted = 2;
  string mount_point = 3;
}

message ListImageArchivesRequest {
  string path = 1;
}

message ListImageArchivesResponse {
    repeated ImageArchive image_archives = 1;
}

message ImageArchive {
  string file_path = 1;
  int64 file_size_bytes = 2;
  string sha256_checksum = 3;
}

message LoadImageArchiveRequest {
  string file_path = 1;
  string image_name = 2;
  string image_tag = 3;
}

message LoadImageArchiveResponse {
  bool is_success = 1;
  string error_message = 2;
}

message InspectImageArchiveRequest {
  string file_path = 1;
}

message InspectImageArchiveResponse {
  bool is_success = 1;
  string stdout = 2;
  string stderr = 3;
}