github.com/cloudwego/dynamicgo@v0.2.6-0.20240519101509-707f41b6b834/testdata/idl/baseline.thrift (about)

     1  namespace go baseline
     2  
     3  struct Simple {
     4      1: byte ByteField 
     5      2: i64 I64Field (api.js_conv = "")
     6      3: double DoubleField
     7      4: i32 I32Field 
     8      5: string StringField,
     9      6: binary BinaryField
    10  }
    11  
    12  struct PartialSimple {
    13       1: byte ByteField 
    14       3: double DoubleField
    15       6: binary BinaryField
    16  }
    17  
    18  struct Nesting {
    19      1: string String (api.header = "String")
    20      2: list<Simple> ListSimple
    21      3: double Double (api.path = "double")
    22      4: i32 I32 (api.http_code = "", api.body = "I32")
    23      5: list<i32> ListI32 (api.query = "ListI32")
    24      6: i64 I64
    25      7: map<string, string> MapStringString
    26      8: Simple SimpleStruct
    27      9: map<i32, i64> MapI32I64
    28      10: list<string> ListString
    29      11: binary Binary
    30      12: map<i64, string> MapI64String
    31      13: list<i64> ListI64 (api.cookie = "list_i64"),
    32      14: byte Byte
    33      15: map<string, Simple> MapStringSimple
    34  }
    35  
    36  struct PartialNesting {
    37      2: list<PartialSimple> ListSimple
    38      8: PartialSimple SimpleStruct
    39      15: map<string, PartialSimple> MapStringSimple
    40  }
    41  
    42  struct Nesting2 {
    43      1: map<Simple, Nesting> MapSimpleNesting
    44      2: Simple SimpleStruct
    45      3: byte Byte
    46      4: double Double
    47      5: list<Nesting> ListNesting
    48      6: i64 I64
    49      7: Nesting NestingStruct
    50      8: binary Binary
    51      9: string String
    52      10: set<Nesting> SetNesting
    53      11: i32 I32
    54  }
    55  
    56  service BaselineService {
    57      Simple SimpleMethod(1: Simple req) (api.post = "/simple")
    58      PartialSimple PartialSimpleMethod(1: PartialSimple req)
    59      Nesting NestingMethod(1: Nesting req) (api.post = "/nesting")
    60      PartialNesting PartialNestingMethod(1: PartialNesting req)
    61      Nesting2 Nesting2Method(1: Nesting2 req) (api.post = "/nesting2")
    62  }