github.com/prysmaticlabs/prysm@v1.4.4/proto/testing/test.proto (about)

     1  syntax = "proto3";
     2  
     3  package testing;
     4  
     5  import "google/protobuf/descriptor.proto";
     6  import "google/protobuf/timestamp.proto";
     7  
     8  extend google.protobuf.FieldOptions {
     9    string ssz_size = 60001;
    10    string spec_name = 60003;
    11  }
    12  
    13  message TestMessage {
    14    string foo = 1;
    15    string bar = 2 [(ssz_size) = "32", (spec_name) = "foo"];
    16  }
    17  
    18  message TestNestedMessage {
    19    string fuzz = 1;
    20    TestMessage msg = 2;
    21  }
    22  
    23  // Used in shared/p2p/feed_example_test.go
    24  message Puzzle {
    25    string challenge = 1;
    26    string answer = 2;
    27  }
    28  
    29  // Person and address book example from
    30  // https://github.com/protocolbuffers/protobuf/blob/master/examples/addressbook.proto
    31  message Person {
    32    string name = 1;
    33    int32 id = 2;
    34    string email = 3;
    35    enum PhoneType {
    36      MOBILE = 0;
    37      HOME = 1;
    38      WORK = 2;
    39    }
    40    message PhoneNumber {
    41      string number = 1;
    42      PhoneType type = 2;
    43    }
    44    repeated PhoneNumber phones = 4;
    45    google.protobuf.Timestamp last_updated = 5;
    46  }
    47  
    48  // Our address book file is just one of these.
    49  message AddressBook {
    50    repeated Person people = 1;
    51  }
    52  
    53  message TestSimpleMessage {
    54    bytes foo = 1;
    55    uint64 bar = 2;
    56  }