github.com/cloudwego/kitex@v0.9.0/pkg/generic/map_test/idl/example.thrift (about) 1 include "base.thrift" 2 include "self_ref.thrift" 3 namespace go kitex.test.server 4 5 enum FOO { 6 A = 1; 7 } 8 9 struct InnerBase { 10 255: base.Base Base, 11 } 12 13 struct MockElem { 14 1: string Bar 15 } 16 17 struct ExampleReq { 18 1: required string Msg = "Hello", 19 2: FOO Foo, 20 3: list<MockElem> TestList, 21 4: optional map<string, MockElem> TestMap, 22 5: list<string> StrList, 23 6: list<i64> I64List = [1, 2, 3], 24 7: bool B, 25 8: optional binary BinaryMsg, 26 255: base.Base Base, 27 } 28 struct ExampleResp { 29 1: required string Msg, 30 2: string required_field 31 255: base.BaseResp BaseResp, 32 } 33 exception Exception { 34 1: i32 code 35 2: string msg 36 } 37 38 struct A { 39 1: A self 40 2: self_ref.A a 41 } 42 43 service ExampleService { 44 ExampleReq ExampleMethod(1: ExampleReq req)throws(1: Exception err), 45 A Foo(1: A req) 46 string Ping(1: string msg) 47 oneway void Oneway(1: string msg) 48 void Void(1: string msg) 49 }