github.com/looshlee/cilium@v1.6.12/examples/kubernetes-grpc/cloudcity.proto (about)

     1  // Copyright 2015 gRPC authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  syntax = "proto3";
    16  
    17  option java_multiple_files = true;
    18  option java_package = "io.cilium.examples.cloudcity";
    19  option java_outer_classname = "CloudCityProto";
    20  option objc_class_prefix = "HLW";
    21  
    22  package cloudcity;
    23  
    24  // The door manager service definition.
    25  service DoorManager {
    26  
    27    // Get human readable name of door. 
    28    rpc GetName(DoorRequest) returns (DoorNameReply) {} 
    29  
    30    // Find the location of this door. 
    31    rpc GetLocation (DoorRequest) returns (DoorLocationReply) {}
    32  
    33    // Find out if door is open our closed
    34    rpc GetStatus(DoorRequest) returns (DoorStatusReply) {} 
    35  
    36    // Request maintenance on the door
    37    rpc RequestMaintenance(DoorMaintRequest) returns (DoorActionReply) {} 
    38  
    39    // Set Access Code to Open / Lock the door
    40    rpc SetAccessCode(DoorAccessCodeRequest) returns (DoorActionReply) {} 
    41  
    42  }
    43  
    44  // The request message containing the user's name.
    45  message DoorRequest {
    46    uint32 door_id = 1;
    47  }
    48  
    49  message DoorNameReply { 
    50    string name = 1; 
    51  } 
    52  
    53  enum DoorStatus { 
    54     OPEN = 0; 
    55     CLOSED = 1; 
    56  } 
    57  
    58  message DoorStatusReply { 
    59    DoorStatus state = 1; 
    60  } 
    61  
    62  message DoorAccessCodeRequest { 
    63    uint32 door_id = 1; 
    64    uint32 access_code = 2; 
    65  } 
    66  
    67  message DoorLocationReply {
    68    float lat = 1;
    69    float long = 2;
    70  }
    71  
    72  message DoorMaintRequest { 
    73      uint32 door_id = 1; 
    74      string maint_description = 2; 
    75  } 
    76  
    77  message DoorActionReply { 
    78      bool success = 1; 
    79  } 
    80