 9eb5967935
			
		
	
	9eb5967935
	
	
	
		
			
			* rework server responsibilities add remote configuration * start metrics only when compiled as not debug * add some more logging to discord bot * fixes of some casts * make metrics port configurable, minor fixes * add docker bullshit * md formatting * adjustments to docker stuff * fix docker json files, fix some stuff in discord bot, add /useradd for Discord bot * adjust docker configs and fix sharded.bat * fixes for logs, cache file provider repeat trying to open filestream Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
		
			
				
	
	
		
			119 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
			
		
		
	
	
			119 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
| syntax = "proto3";
 | |
| 
 | |
| option csharp_namespace = "MareSynchronosShared.Protos";
 | |
| 
 | |
| package mareservices;
 | |
| 
 | |
| 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 GetIdentForUid (UidMessage) returns (CharacterIdentMessage);
 | |
| 	rpc ClearIdentsForServer (ServerMessage) returns (Empty);
 | |
| 	rpc RecreateServerIdents (ServerIdentMessage) returns (Empty);
 | |
| 	rpc GetAllIdents (ServerMessage) returns (UidWithIdentMessage);
 | |
| 	rpc SendStreamIdentStatusChange (stream IdentChangeMessage) returns (Empty);
 | |
| 	rpc ReceiveStreamIdentStatusChange (ServerMessage) returns (stream IdentChange);
 | |
| }
 | |
| 
 | |
| service ConfigurationService {
 | |
| 	rpc GetConfigurationEntry (KeyMessage) returns (ValueMessage);
 | |
| }
 | |
| 
 | |
| message KeyMessage {
 | |
| 	string key = 1;
 | |
| 	string default = 2;
 | |
| }
 | |
| 
 | |
| message ValueMessage {
 | |
| 	string value = 1;
 | |
| }
 | |
| 
 | |
| message Empty { }
 | |
| 
 | |
| message MultiUidMessage {
 | |
| 	repeated UidMessage uids = 1;
 | |
| }
 | |
| 
 | |
| message ServerIdentMessage {
 | |
| 	repeated SetIdentMessage idents = 1;
 | |
| }
 | |
| 
 | |
| message IdentChangeMessage {
 | |
| 	oneof payload {
 | |
| 		ServerMessage server = 1;
 | |
| 		IdentChange identChange = 2;
 | |
| 	}
 | |
| }
 | |
| 
 | |
| message IdentChange {
 | |
| 	UidWithIdent uidWithIdent = 1;
 | |
| 	bool isOnline = 2;
 | |
| }
 | |
| 
 | |
| message UidWithIdentMessage {
 | |
| 	repeated UidWithIdent uidWithIdent = 1;
 | |
| }
 | |
| 
 | |
| message UidWithIdent {
 | |
| 	UidMessage uid = 1;
 | |
| 	CharacterIdentMessage ident = 2;
 | |
| }
 | |
| 
 | |
| 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 {
 | |
| 	UidWithIdent uidWithIdent = 1;
 | |
| }
 | |
| 
 | |
| 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 AuthRequest {
 | |
| 	string ip = 1;
 | |
| 	string secretKey = 2;
 | |
| }
 | |
| 
 | |
| message AuthReply {
 | |
|   bool success = 1;
 | |
|   UidMessage uid = 2;
 | |
| } |