77 lines
		
	
	
		
			No EOL
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
			
		
		
	
	
			77 lines
		
	
	
		
			No EOL
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
| syntax = "proto3";
 | |
| package caretta_sync.authorization_request;
 | |
| 
 | |
| import "caretta_sync.common.proto";
 | |
| import "caretta_sync.authorized_node.proto";
 | |
| import "caretta_sync.remote_node.proto";
 | |
| import "tripod_id.proto";
 | |
| import "google/protobuf/timestamp.proto";
 | |
| import "google/protobuf/duration.proto";
 | |
| 
 | |
| service AuthorizationRequest {
 | |
|     rpc Send(AuthorizationRequestSendRequest) returns (AuthorizationRequestSendResponse);
 | |
|     rpc Accept(AuthorizationRequestAcceptRequest) returns (AuthorizationRequestAcceptResponse);
 | |
|     rpc Reject(AuthorizationRequestRejectRequest) returns (AuthorizationRequestRejectResponse);
 | |
|     rpc Info(AuthorizationRequestInfoRequest) returns (AuthorizationRequestInfoResponse);
 | |
|     rpc InfoStream(stream AuthorizationRequestInfoStreamRequest) returns (stream AuthorizationRequestInfoStreamResponse);
 | |
| }
 | |
| 
 | |
| enum AuthorizationRequestKind {
 | |
|     SENT = 0;
 | |
|     RECEIVED = 1;
 | |
| }
 | |
| 
 | |
| message AuthorizationRequestSendRequest {
 | |
|     caretta_sync.remote_node.RemoteNodeIdentifier remote_node = 1;
 | |
| }
 | |
| 
 | |
| message AuthorizationRequestSendResponse {
 | |
|     caretta_sync.remote_node.RemoteNodeInfo remote_node_info = 1;
 | |
|     string passcode = 2;
 | |
| }
 | |
| 
 | |
| message AuthorizationRequestInfo {
 | |
|     tripod_id.Double id = 1;
 | |
|     caretta_sync.common.PublicKey public_key = 2;
 | |
|     google.protobuf.Timestamp created_at = 3;
 | |
|     AuthorizationRequestKind kind = 4;
 | |
|     string node_info = 5;
 | |
| }
 | |
| 
 | |
| 
 | |
| message AuthorizationRequestIdentifier {
 | |
|     oneof identifier {
 | |
|         caretta_sync.common.Uuid uuid = 1;
 | |
|         tripod_id.Double id = 2;
 | |
|     }
 | |
| }
 | |
| 
 | |
| message AuthorizationRequestAcceptRequest {
 | |
|     AuthorizationRequestIdentifier authorization_request = 1;
 | |
|     string passcode = 2;
 | |
| }
 | |
| 
 | |
| message AuthorizationRequestAcceptResponse {
 | |
|     caretta_sync.authorized_node.AuthorizedNodeInfo authorized_node_info = 1;
 | |
| }
 | |
| 
 | |
| message AuthorizationRequestRejectRequest {
 | |
|     AuthorizationRequestIdentifier authorization_request = 1;
 | |
| }
 | |
| 
 | |
| message AuthorizationRequestRejectResponse {
 | |
|     AuthorizationRequestInfo request_info = 1;
 | |
| }
 | |
| 
 | |
| message AuthorizationRequestInfoRequest {
 | |
|     AuthorizationRequestIdentifier request = 1;   
 | |
| }
 | |
| message AuthorizationRequestInfoResponse{
 | |
|     AuthorizationRequestInfo info = 1;
 | |
| }
 | |
| 
 | |
| message AuthorizationRequestInfoStreamRequest {}
 | |
| 
 | |
| message AuthorizationRequestInfoStreamResponse {
 | |
|     AuthorizationRequestInfo request_info = 1;
 | |
| } |