github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/tm2/pkg/amino/tests/proto3/proto/compat.proto (about)

     1  syntax = "proto3";
     2  
     3  package proto3tests;
     4  
     5  import "google/protobuf/timestamp.proto";
     6  
     7  message TestInt32Varint {
     8      sint32 Int32 = 1;
     9  }
    10  
    11  message TestInt32Fixed {
    12      fixed32 Fixed32 = 1;
    13  }
    14  
    15  message Test32 {
    16      fixed32 foo = 1;
    17      sint32 bar = 2;
    18  }
    19  
    20  message TestFixedInt64 {
    21      fixed64 Int64 = 1;
    22  }
    23  
    24  message TestSFixedSInt64 {
    25      sfixed64 SInt64 = 1;
    26  }
    27  
    28  message EmbeddedStruct {
    29      sfixed64 somethingFixedLen = 1;
    30  }
    31  
    32  message SomeStruct {
    33      // proto3 autom. turns this into a pointer ...
    34      EmbeddedStruct emb = 1;
    35  }
    36  
    37  message ProtoGotTime {
    38      google.protobuf.Timestamp T = 1;
    39  }
    40  
    41  message TestInt32 {
    42      int32 Int32 = 1;
    43  }
    44  
    45  
    46  message TestInts {
    47      int32 Int32 = 1;
    48      int64 Int64 = 2;
    49  }
    50  
    51  message IntDef {
    52      int64 val = 1;
    53  }
    54  
    55  message IntArr {
    56      repeated int64 val = 1;
    57  }
    58  
    59  message PrimitivesStruct {
    60      int32 Int32 = 3;
    61      int64 Int64 = 4;
    62      int64 Varint = 5;
    63      // int     int
    64      // Byte    byte = 4; // this just another varint
    65      // Uint8   uint8 // another varint
    66      // Uint16  uint16 // another one, also the following
    67      // Uint32  uint32
    68      // Uint64  uint64
    69      // Uvarint uint64 `binary:"varint"`
    70      // Uint    uint
    71      string String = 14;
    72      bytes Bytes = 15;
    73      google.protobuf.Timestamp Time = 16;
    74  }
    75  
    76  message PrimitivesStructSl {
    77      repeated PrimitivesStruct Structs = 1;
    78  }