syntax = "proto3"; package protos; option go_package = "."; import "google/protobuf/empty.proto"; service ContainerService { rpc StartContainer (google.protobuf.Empty) returns (StartContainerResponse); rpc StopContainer (StopContainerRequest) returns (StopContainerResponse); rpc RunCommand (RunCommandRequest) returns (stream RunCommandResponse); rpc FileExists (FileExistsRequest) returns (FileExistsResponse); rpc GetFile (GetFileRequest) returns (stream ReusableChunk); rpc PutFile (stream ReusableChunk) returns (PutFileResponse); rpc DownloadOss (DownloadOssRequest) returns (DownloadOssResponse); rpc UploadOss (UploadOssRequest) returns (UploadOssResponse); } message StartContainerResponse { string container_id = 1; } message StopContainerRequest { string container_id = 1; } message StopContainerResponse { string container_id = 1; optional bool success = 2; } message RunCommandRequest { string container_id = 1; repeated string command = 2; } message RunCommandResponse { string container_id = 1; int32 exit_code = 2; optional string msg = 3; } message FileExistsRequest { string container_id = 1; string path = 2; } message FileExistsResponse { string container_id = 1; optional bool exists = 2; } message GetFileRequest{ string container_id = 1; string path = 2; } message PutFileResponse { string container_id = 1; optional bool success = 2; } message ReusableChunk { string container_id = 1; optional string path = 2; optional int64 offset = 3; optional bytes payload = 4; optional string sha256sum = 5; } message DownloadOssRequest { string container_id = 1; string bucket_name = 2; string object_key = 3; } message DownloadOssResponse { string container_id = 1; string save_path = 2; } message UploadOssRequest { string container_id = 1; string bucket_name = 2; string object_key = 3; string file_path = 4; string media_type = 5; } message UploadOssResponse { string container_id = 1; string object_key = 2; }