github.com/vcilabs/webrpc@v0.5.2-0.20201116131534-162e27b1b33b/_examples/hello-webrpc-ts/hello-api.ridl (about)

     1  webrpc = v1
     2  
     3  name = hello-webrpc
     4  version = v1.0.0
     5  
     6  enum Kind: uint32
     7    - USER = 1
     8    - ADMIN = 2
     9  
    10  message User
    11    - ID: uint64
    12      + json = id
    13      + go.tag.db = id
    14  
    15    - username: string
    16      + json = USERNAME
    17      + go.tag.db = username
    18  
    19    - role: Kind
    20  
    21    - meta: map<string,any>
    22  
    23    - internalID: uint64
    24      + json = -
    25  
    26    - createdAt?: timestamp
    27      + json = created_at,omitempty
    28      + go.tag.db = created_at
    29  
    30  message Page
    31    - num: uint32
    32  
    33  service ExampleService
    34    - Ping() => (status: bool)
    35    - GetUser(userID: uint64) => (user: User)
    36    - FindUsers(q: string) => (page: Page, users: []User)