forked from webrpc/webrpc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.ridl
53 lines (39 loc) · 1.07 KB
/
example.ridl
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
webrpc = v1 # version of webrpc schema format (ridl or json)
name = example # name if your backend app
version = v0.0.1 # version of your schema
enum Kind: uint32
- USER
- ADMIN
message Empty
message User
- id: uint64
+ json = id
+ go.field.name = ID
+ go.tag.db = id
- username: string
+ json = USERNAME
+ go.tag.db = username
- role: string
+ go.tag.db = -
message SearchFilter
- q: string
message Version
- webrpcVersion: string
- schemaVersion: string
- schemaHash: string
message ComplexType
- meta: map<string,any>
- metaNestedExample: map<string,map<string,uint32>>
- namesList: []string
- numsList: []int64
- doubleArray: [][]string
- listOfMaps: []map<string,uint32>
- listOfUsers: []User
- mapOfUsers: map<string,User>
- user: User
service ExampleService
- Ping()
- Status() => (status: bool)
- Version() => (version: Version)
- GetUser(header: map<string,string>, userID: uint64) => (code: uint32, user: User)
- FindUser(s: SearchFilter) => (name: string, user: User)