-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathextended.thrift
More file actions
60 lines (42 loc) · 910 Bytes
/
extended.thrift
File metadata and controls
60 lines (42 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
struct User {
1: string name
}
exception Error {
1: i32 what,
2: string why
}
service Extended {
User getUser(1:i32 id) throws (1:Error error)
(doggy.window = "true", doggy.howmuch = 1000)
}
typedef i32 int;
typedef i64(foo.bar = "hello") shrubbery;
struct with_annotations {
1: optional int i1;
2: int (type.annotate = "foo") i2;
3: shubbery nice (knights.who.say = "ni");
} ( struct.anno = "y" )
enum Animals {
cat = 1,
mouse = 2,
dog
} ( enum.anno = "x" )
service with_throws {
int32 foo(1:i32 id) throws (
1:Error error
3:string cause
)
}
typedef list<shrubbery> border ( ni = "false" )
service TheShop {
Animals getPet(
1: required User owner
) throws (
1: Error napping
2: AnotherError pining
3: ThirdKindOfError resting
4: Error deaf
)
} (
service.annotation = "thing"
)