 777a764ef1
			
		
	
	777a764ef1
	
	
	
		
			
			* move marehub to strong api usage * fix merge issues * latest api * further optimizations
		
			
				
	
	
		
			107 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
			
		
		
	
	
			107 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
| syntax = "proto3";
 | |
| 
 | |
| option csharp_namespace = "MareSynchronosShared.Protos";
 | |
| 
 | |
| package mareservices;
 | |
| 
 | |
| service AuthService {
 | |
|   rpc Authorize (AuthRequest) returns (AuthReply);
 | |
|   rpc RemoveAuth (RemoveAuthRequest) returns (Empty);
 | |
|   rpc ClearUnauthorized (Empty) returns (Empty);
 | |
| }
 | |
| 
 | |
| service FileService {
 | |
| 	rpc UploadFile (stream UploadFileRequest) returns (Empty);
 | |
| 	rpc GetFileSizes (FileSizeRequest) returns (FileSizeResponse);
 | |
| 	rpc DeleteFiles (DeleteFilesRequest) returns (Empty);
 | |
| }
 | |
| 
 | |
| service IdentificationService {
 | |
| 	rpc GetOnlineUserCount (ServerMessage) returns (OnlineUserCountResponse);
 | |
| 	rpc RemoveIdentForUid (RemoveIdentMessage) returns (Empty);
 | |
| 	rpc SetIdentForUid (SetIdentMessage) returns (Empty);
 | |
| 	rpc GetUidForCharacterIdent (CharacterIdentMessage) returns (UidMessage);
 | |
| 	rpc GetIdentForUid (UidMessage) returns (CharacterIdentMessage);
 | |
| 	rpc ClearIdentsForServer (ServerMessage) returns (Empty);
 | |
| 	rpc RecreateServerIdents (ServerIdentMessage) returns (Empty);
 | |
| 	rpc ValidateCachedIdents (MultiUidMessage) returns (UidWithIdentMessage);
 | |
| }
 | |
| 
 | |
| message Empty { }
 | |
| 
 | |
| message MultiUidMessage {
 | |
| 	repeated UidMessage uids = 1;
 | |
| }
 | |
| 
 | |
| message UidWithIdentMessage {
 | |
| 	repeated UidWithIdent uidWithIdent = 1;
 | |
| }
 | |
| 
 | |
| message UidWithIdent {
 | |
| 	UidMessage uid = 1;
 | |
| 	CharacterIdentMessage ident = 2;
 | |
| }
 | |
| 
 | |
| message ServerIdentMessage {
 | |
| 	repeated SetIdentMessage idents = 1;
 | |
| }
 | |
| 
 | |
| message UidMessage {
 | |
| 	string uid = 1;
 | |
| }
 | |
| 
 | |
| message ServerMessage {
 | |
| 	string server_id = 1;
 | |
| }
 | |
| 
 | |
| message OnlineUserCountResponse {
 | |
| 	int64 count = 1;
 | |
| }
 | |
| 
 | |
| message RemoveIdentMessage {
 | |
| 	string uid = 1;
 | |
| 	string server_id = 2;
 | |
| }
 | |
| 
 | |
| message SetIdentMessage {
 | |
| 	string uid = 1;
 | |
| 	string server_id = 2;
 | |
| 	string ident = 3;
 | |
| }
 | |
| 
 | |
| message CharacterIdentMessage {
 | |
| 	string server_id = 1;
 | |
| 	string ident = 2;
 | |
| }
 | |
| 
 | |
| message UploadFileRequest {
 | |
| 	string hash = 1;
 | |
| 	string uploader = 2;
 | |
| 	bytes fileData = 3;
 | |
| }
 | |
| 
 | |
| message DeleteFilesRequest {
 | |
| 	repeated string hash = 1;
 | |
| }
 | |
| 
 | |
| message FileSizeRequest {
 | |
| 	repeated string hash = 1;
 | |
| }
 | |
| 
 | |
| message FileSizeResponse {
 | |
| 	map<string, int64> hashToFileSize = 1;
 | |
| }
 | |
| 
 | |
| message RemoveAuthRequest {
 | |
| 	string uid = 1;
 | |
| }
 | |
| 
 | |
| message AuthRequest {
 | |
| 	string ip = 1;
 | |
| 	string secretKey = 2;
 | |
| }
 | |
| 
 | |
| message AuthReply {
 | |
|   bool success = 1;
 | |
|   string uid = 2;
 | |
| } |