|
@@ -21,7 +21,7 @@ const (
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
)
|
|
|
|
|
|
-type Request struct {
|
|
|
|
|
|
+type DownloadRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
BucketID string `protobuf:"bytes,1,opt,name=bucketID,proto3" json:"bucketID,omitempty"`
|
|
BucketID string `protobuf:"bytes,1,opt,name=bucketID,proto3" json:"bucketID,omitempty"`
|
|
ObjectName string `protobuf:"bytes,2,opt,name=objectName,proto3" json:"objectName,omitempty"`
|
|
ObjectName string `protobuf:"bytes,2,opt,name=objectName,proto3" json:"objectName,omitempty"`
|
|
@@ -29,20 +29,20 @@ type Request struct {
|
|
sizeCache protoimpl.SizeCache
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
}
|
|
|
|
|
|
-func (x *Request) Reset() {
|
|
|
|
- *x = Request{}
|
|
|
|
|
|
+func (x *DownloadRequest) Reset() {
|
|
|
|
+ *x = DownloadRequest{}
|
|
mi := &file_service_proto_msgTypes[0]
|
|
mi := &file_service_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
|
|
-func (x *Request) String() string {
|
|
|
|
|
|
+func (x *DownloadRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
}
|
|
|
|
|
|
-func (*Request) ProtoMessage() {}
|
|
|
|
|
|
+func (*DownloadRequest) ProtoMessage() {}
|
|
|
|
|
|
-func (x *Request) ProtoReflect() protoreflect.Message {
|
|
|
|
|
|
+func (x *DownloadRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_service_proto_msgTypes[0]
|
|
mi := &file_service_proto_msgTypes[0]
|
|
if x != nil {
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
@@ -54,19 +54,87 @@ func (x *Request) ProtoReflect() protoreflect.Message {
|
|
return mi.MessageOf(x)
|
|
return mi.MessageOf(x)
|
|
}
|
|
}
|
|
|
|
|
|
-// Deprecated: Use Request.ProtoReflect.Descriptor instead.
|
|
|
|
-func (*Request) Descriptor() ([]byte, []int) {
|
|
|
|
|
|
+// Deprecated: Use DownloadRequest.ProtoReflect.Descriptor instead.
|
|
|
|
+func (*DownloadRequest) Descriptor() ([]byte, []int) {
|
|
return file_service_proto_rawDescGZIP(), []int{0}
|
|
return file_service_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
}
|
|
|
|
|
|
-func (x *Request) GetBucketID() string {
|
|
|
|
|
|
+func (x *DownloadRequest) GetBucketID() string {
|
|
if x != nil {
|
|
if x != nil {
|
|
return x.BucketID
|
|
return x.BucketID
|
|
}
|
|
}
|
|
return ""
|
|
return ""
|
|
}
|
|
}
|
|
|
|
|
|
-func (x *Request) GetObjectName() string {
|
|
|
|
|
|
+func (x *DownloadRequest) GetObjectName() string {
|
|
|
|
+ if x != nil {
|
|
|
|
+ return x.ObjectName
|
|
|
|
+ }
|
|
|
|
+ return ""
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type UploadRequest struct {
|
|
|
|
+ state protoimpl.MessageState `protogen:"open.v1"`
|
|
|
|
+ Stream []byte `protobuf:"bytes,1,opt,name=stream,proto3" json:"stream,omitempty"` // 客户端将文件数据传递过来
|
|
|
|
+ Gzip bool `protobuf:"varint,2,opt,name=gzip,proto3" json:"gzip,omitempty"` //是否压缩
|
|
|
|
+ BucketID string `protobuf:"bytes,3,opt,name=bucketID,proto3" json:"bucketID,omitempty"` //桶id
|
|
|
|
+ ObjectName string `protobuf:"bytes,4,opt,name=objectName,proto3" json:"objectName,omitempty"` //对象名称
|
|
|
|
+ unknownFields protoimpl.UnknownFields
|
|
|
|
+ sizeCache protoimpl.SizeCache
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *UploadRequest) Reset() {
|
|
|
|
+ *x = UploadRequest{}
|
|
|
|
+ mi := &file_service_proto_msgTypes[1]
|
|
|
|
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
+ ms.StoreMessageInfo(mi)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *UploadRequest) String() string {
|
|
|
|
+ return protoimpl.X.MessageStringOf(x)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (*UploadRequest) ProtoMessage() {}
|
|
|
|
+
|
|
|
|
+func (x *UploadRequest) ProtoReflect() protoreflect.Message {
|
|
|
|
+ mi := &file_service_proto_msgTypes[1]
|
|
|
|
+ if x != nil {
|
|
|
|
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
+ if ms.LoadMessageInfo() == nil {
|
|
|
|
+ ms.StoreMessageInfo(mi)
|
|
|
|
+ }
|
|
|
|
+ return ms
|
|
|
|
+ }
|
|
|
|
+ return mi.MessageOf(x)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// Deprecated: Use UploadRequest.ProtoReflect.Descriptor instead.
|
|
|
|
+func (*UploadRequest) Descriptor() ([]byte, []int) {
|
|
|
|
+ return file_service_proto_rawDescGZIP(), []int{1}
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *UploadRequest) GetStream() []byte {
|
|
|
|
+ if x != nil {
|
|
|
|
+ return x.Stream
|
|
|
|
+ }
|
|
|
|
+ return nil
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *UploadRequest) GetGzip() bool {
|
|
|
|
+ if x != nil {
|
|
|
|
+ return x.Gzip
|
|
|
|
+ }
|
|
|
|
+ return false
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *UploadRequest) GetBucketID() string {
|
|
|
|
+ if x != nil {
|
|
|
|
+ return x.BucketID
|
|
|
|
+ }
|
|
|
|
+ return ""
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (x *UploadRequest) GetObjectName() string {
|
|
if x != nil {
|
|
if x != nil {
|
|
return x.ObjectName
|
|
return x.ObjectName
|
|
}
|
|
}
|
|
@@ -84,7 +152,7 @@ type Response struct {
|
|
|
|
|
|
func (x *Response) Reset() {
|
|
func (x *Response) Reset() {
|
|
*x = Response{}
|
|
*x = Response{}
|
|
- mi := &file_service_proto_msgTypes[1]
|
|
|
|
|
|
+ mi := &file_service_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
@@ -96,7 +164,7 @@ func (x *Response) String() string {
|
|
func (*Response) ProtoMessage() {}
|
|
func (*Response) ProtoMessage() {}
|
|
|
|
|
|
func (x *Response) ProtoReflect() protoreflect.Message {
|
|
func (x *Response) ProtoReflect() protoreflect.Message {
|
|
- mi := &file_service_proto_msgTypes[1]
|
|
|
|
|
|
+ mi := &file_service_proto_msgTypes[2]
|
|
if x != nil {
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
if ms.LoadMessageInfo() == nil {
|
|
@@ -109,7 +177,7 @@ func (x *Response) ProtoReflect() protoreflect.Message {
|
|
|
|
|
|
// Deprecated: Use Response.ProtoReflect.Descriptor instead.
|
|
// Deprecated: Use Response.ProtoReflect.Descriptor instead.
|
|
func (*Response) Descriptor() ([]byte, []int) {
|
|
func (*Response) Descriptor() ([]byte, []int) {
|
|
- return file_service_proto_rawDescGZIP(), []int{1}
|
|
|
|
|
|
+ return file_service_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
}
|
|
|
|
|
|
func (x *Response) GetData() []byte {
|
|
func (x *Response) GetData() []byte {
|
|
@@ -137,18 +205,27 @@ var File_service_proto protoreflect.FileDescriptor
|
|
|
|
|
|
const file_service_proto_rawDesc = "" +
|
|
const file_service_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\n" +
|
|
- "\rservice.proto\x12\x02pb\"E\n" +
|
|
|
|
- "\aRequest\x12\x1a\n" +
|
|
|
|
|
|
+ "\rservice.proto\x12\x02pb\"M\n" +
|
|
|
|
+ "\x0fDownloadRequest\x12\x1a\n" +
|
|
"\bbucketID\x18\x01 \x01(\tR\bbucketID\x12\x1e\n" +
|
|
"\bbucketID\x18\x01 \x01(\tR\bbucketID\x12\x1e\n" +
|
|
"\n" +
|
|
"\n" +
|
|
"objectName\x18\x02 \x01(\tR\n" +
|
|
"objectName\x18\x02 \x01(\tR\n" +
|
|
|
|
+ "objectName\"w\n" +
|
|
|
|
+ "\rUploadRequest\x12\x16\n" +
|
|
|
|
+ "\x06stream\x18\x01 \x01(\fR\x06stream\x12\x12\n" +
|
|
|
|
+ "\x04gzip\x18\x02 \x01(\bR\x04gzip\x12\x1a\n" +
|
|
|
|
+ "\bbucketID\x18\x03 \x01(\tR\bbucketID\x12\x1e\n" +
|
|
|
|
+ "\n" +
|
|
|
|
+ "objectName\x18\x04 \x01(\tR\n" +
|
|
"objectName\"X\n" +
|
|
"objectName\"X\n" +
|
|
"\bResponse\x12\x12\n" +
|
|
"\bResponse\x12\x12\n" +
|
|
"\x04data\x18\x01 \x01(\fR\x04data\x12\x1c\n" +
|
|
"\x04data\x18\x01 \x01(\fR\x04data\x12\x1c\n" +
|
|
"\terrorCode\x18\x02 \x01(\x03R\terrorCode\x12\x1a\n" +
|
|
"\terrorCode\x18\x02 \x01(\x03R\terrorCode\x12\x1a\n" +
|
|
- "\berrorMsg\x18\x03 \x01(\tR\berrorMsg22\n" +
|
|
|
|
- "\aService\x12'\n" +
|
|
|
|
- "\bDownload\x12\v.pb.Request\x1a\f.pb.Response0\x01B\aZ\x05../pbb\x06proto3"
|
|
|
|
|
|
+ "\berrorMsg\x18\x03 \x01(\tR\berrorMsg2\x9c\x01\n" +
|
|
|
|
+ "\aService\x12/\n" +
|
|
|
|
+ "\bDownload\x12\x13.pb.DownloadRequest\x1a\f.pb.Response0\x01\x12+\n" +
|
|
|
|
+ "\x06Upload\x12\x11.pb.UploadRequest\x1a\f.pb.Response(\x01\x123\n" +
|
|
|
|
+ "\fGetBidDetail\x12\x13.pb.DownloadRequest\x1a\f.pb.Response0\x01B\aZ\x05../pbb\x06proto3"
|
|
|
|
|
|
var (
|
|
var (
|
|
file_service_proto_rawDescOnce sync.Once
|
|
file_service_proto_rawDescOnce sync.Once
|
|
@@ -162,16 +239,21 @@ func file_service_proto_rawDescGZIP() []byte {
|
|
return file_service_proto_rawDescData
|
|
return file_service_proto_rawDescData
|
|
}
|
|
}
|
|
|
|
|
|
-var file_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
|
|
|
|
|
+var file_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
|
var file_service_proto_goTypes = []any{
|
|
var file_service_proto_goTypes = []any{
|
|
- (*Request)(nil), // 0: pb.Request
|
|
|
|
- (*Response)(nil), // 1: pb.Response
|
|
|
|
|
|
+ (*DownloadRequest)(nil), // 0: pb.DownloadRequest
|
|
|
|
+ (*UploadRequest)(nil), // 1: pb.UploadRequest
|
|
|
|
+ (*Response)(nil), // 2: pb.Response
|
|
}
|
|
}
|
|
var file_service_proto_depIdxs = []int32{
|
|
var file_service_proto_depIdxs = []int32{
|
|
- 0, // 0: pb.Service.Download:input_type -> pb.Request
|
|
|
|
- 1, // 1: pb.Service.Download:output_type -> pb.Response
|
|
|
|
- 1, // [1:2] is the sub-list for method output_type
|
|
|
|
- 0, // [0:1] is the sub-list for method input_type
|
|
|
|
|
|
+ 0, // 0: pb.Service.Download:input_type -> pb.DownloadRequest
|
|
|
|
+ 1, // 1: pb.Service.Upload:input_type -> pb.UploadRequest
|
|
|
|
+ 0, // 2: pb.Service.GetBidDetail:input_type -> pb.DownloadRequest
|
|
|
|
+ 2, // 3: pb.Service.Download:output_type -> pb.Response
|
|
|
|
+ 2, // 4: pb.Service.Upload:output_type -> pb.Response
|
|
|
|
+ 2, // 5: pb.Service.GetBidDetail:output_type -> pb.Response
|
|
|
|
+ 3, // [3:6] is the sub-list for method output_type
|
|
|
|
+ 0, // [0:3] is the sub-list for method input_type
|
|
0, // [0:0] is the sub-list for extension type_name
|
|
0, // [0:0] is the sub-list for extension type_name
|
|
0, // [0:0] is the sub-list for extension extendee
|
|
0, // [0:0] is the sub-list for extension extendee
|
|
0, // [0:0] is the sub-list for field type_name
|
|
0, // [0:0] is the sub-list for field type_name
|
|
@@ -188,7 +270,7 @@ func file_service_proto_init() {
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_service_proto_rawDesc), len(file_service_proto_rawDesc)),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_service_proto_rawDesc), len(file_service_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumEnums: 0,
|
|
- NumMessages: 2,
|
|
|
|
|
|
+ NumMessages: 3,
|
|
NumExtensions: 0,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
NumServices: 1,
|
|
},
|
|
},
|