mirror of
				https://github.com/TeaOSLab/EdgeCommon.git
				synced 2025-11-04 05:00:24 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			47 lines
		
	
	
		
			871 B
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			871 B
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
syntax = "proto3";
 | 
						|
option go_package = "./pb";
 | 
						|
 | 
						|
package pb;
 | 
						|
 | 
						|
import "models/rpc_messages.proto";
 | 
						|
import "models/model_file.proto";
 | 
						|
 | 
						|
// 文件相关服务
 | 
						|
service FileService {
 | 
						|
	// 查找文件
 | 
						|
	rpc findEnabledFile (FindEnabledFileRequest) returns (FindEnabledFileResponse);
 | 
						|
 | 
						|
	// 创建文件
 | 
						|
	rpc createFile (CreateFileRequest) returns (CreateFileResponse);
 | 
						|
 | 
						|
	// 将文件置为已完成
 | 
						|
	rpc updateFileFinished (UpdateFileFinishedRequest) returns (RPCSuccess);
 | 
						|
}
 | 
						|
 | 
						|
// 查找文件
 | 
						|
message FindEnabledFileRequest {
 | 
						|
	int64 fileId = 1;
 | 
						|
}
 | 
						|
 | 
						|
message FindEnabledFileResponse {
 | 
						|
	File file = 1;
 | 
						|
}
 | 
						|
 | 
						|
// 创建文件
 | 
						|
message CreateFileRequest {
 | 
						|
	string filename = 1;
 | 
						|
	int64 size = 2;
 | 
						|
	bool isPublic = 3;
 | 
						|
	string mimeType = 4;
 | 
						|
	string type = 5;
 | 
						|
}
 | 
						|
 | 
						|
message CreateFileResponse {
 | 
						|
	int64 fileId = 1;
 | 
						|
}
 | 
						|
 | 
						|
// 将文件置为已完成
 | 
						|
message UpdateFileFinishedRequest {
 | 
						|
	int64 fileId = 1;
 | 
						|
}
 |