syntax = "proto3";

package pb;

option go_package = "../pb";

service Service {
  rpc Download (DownloadRequest) returns (stream Response);
  rpc Upload (stream UploadRequest) returns (Response);
  rpc GetBidDetail (DownloadRequest) returns (stream Response);
}

message DownloadRequest {
  string bucketID = 1;
  string objectName = 2;
}

message UploadRequest {
  bytes stream = 1; // 客户端将文件数据传递过来
  bool gzip = 2; //是否压缩
  string bucketID = 3; //桶id
  string objectName = 4; //对象名称
}

message Response {
  bytes data = 1;
  int64 errorCode = 2;
  string errorMsg = 3;
}