github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/protos/client_event.proto (about)

     1  // Copyright 2017 Intel Corporation
     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  
    16  syntax = "proto3";
    17  
    18  option java_multiple_files = true;
    19  option java_package = "sawtooth.sdk.protobuf";
    20  option go_package = "client_event_pb2";
    21  
    22  import "events.proto";
    23  
    24  
    25  message ClientEventsSubscribeRequest {
    26      repeated EventSubscription subscriptions = 1;
    27      // The block id (or ids, if trying to walk back a fork) the subscriber last
    28      // received events on. It can be set to empty if it has not yet received the
    29      // genesis block.
    30      repeated string last_known_block_ids = 2;
    31  }
    32  
    33  message ClientEventsSubscribeResponse {
    34      enum Status {
    35           STATUS_UNSET = 0;
    36           OK = 1;
    37           INVALID_FILTER = 2;
    38           UNKNOWN_BLOCK = 3;
    39      }
    40      Status status = 1;
    41      // Additional information about the response status
    42      string response_message = 2;
    43  }
    44  
    45  message ClientEventsUnsubscribeRequest {}
    46  
    47  message ClientEventsUnsubscribeResponse {
    48      enum Status {
    49           STATUS_UNSET = 0;
    50           OK = 1;
    51           INTERNAL_ERROR = 2;
    52      }
    53      Status status = 1;
    54  }
    55  
    56  message ClientEventsGetRequest {
    57      repeated EventSubscription subscriptions = 1;
    58      repeated string block_ids = 2;
    59  }
    60  
    61  message ClientEventsGetResponse {
    62      enum Status {
    63          STATUS_UNSET = 0;
    64          OK = 1;
    65          INTERNAL_ERROR = 2;
    66          INVALID_FILTER = 3;
    67          UNKNOWN_BLOCK = 4;
    68      }
    69      Status status = 1;
    70      repeated Event events = 2;
    71  
    72  }