0
0
Fork 0
mirror of https://github.com/crazy-max/diun.git synced 2025-01-27 17:19:05 +00:00
crazy-max_diun/pb/image.proto
CrazyMax 1115234010
Add CLI to interact with Diun through gRPC (#382)
Add simple CLI to interact with Diun through gRPC
Create image and notif proto services
Compile and validate protos through a dedicated Dockerfile and bake target
Implement proto definitions
Move server as `serve` command
New commands `image` and `notif`
Refactor command line usage doc
Better CLI error handling
Tools build constraint to manage tools deps through go modules
Add upgrade notes

Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-05-26 18:18:10 +02:00

53 lines
1 KiB
Protocol Buffer

syntax = "proto3";
option go_package = "github.com/crazy-max/diun/pb";
package pb;
import "google/protobuf/timestamp.proto";
message Manifest {
string tag = 1;
string mime_type = 2;
string digest = 3;
google.protobuf.Timestamp created = 4;
map<string, string> labels = 5;
string platform = 6;
int64 size = 7;
}
message ImageListRequest {}
message ImageListResponse {
message Image {
string name = 1;
int64 manifestsCount = 2;
Manifest latest = 3;
}
repeated Image images = 1;
}
message ImageInspectRequest {
string name = 1;
}
message ImageInspectResponse {
message Image {
string name = 1;
repeated Manifest manifests = 2;
}
Image image = 1;
}
message ImageRemoveRequest {
string name = 1;
}
message ImageRemoveResponse {
repeated Manifest manifests = 1;
}
service ImageService {
rpc ImageList(ImageListRequest) returns (ImageListResponse) {}
rpc ImageInspect(ImageInspectRequest) returns (ImageInspectResponse) {}
rpc ImageRemove(ImageRemoveRequest) returns (ImageRemoveResponse) {}
}