File: org.varlink.certification.varlink

package info (click to toggle)
python-varlink 31.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 372 kB
  • sloc: python: 2,462; sh: 177; makefile: 31
file content (86 lines) | stat: -rw-r--r-- 2,254 bytes parent folder | download | duplicates (3)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Interface to test varlink implementations against.
# First you write a varlink client calling:
# Start, Test01, Test02, …, Test09, End
# The return value of the previous call should be the argument of the next call.
# Then you test this client against well known servers like python or rust from
# https://github.com/varlink/
#
# Next you write a varlink server providing the same service as the well known ones.
# Now run your client against it and run well known clients like python or rust
# from https://github.com/varlink/ against your server. If all works out, then
# your new language bindings should be varlink certified.
interface org.varlink.certification

type Interface (
  foo: ?[]?[string](foo, bar, baz),
  anon: (foo: bool, bar: bool)
)

type MyType (
  object: object,
  enum: (one, two, three),
  struct: (first: int, second: string),
  array: []string,
  dictionary: [string]string,
  stringset: [string](),
  nullable: ?string,
  nullable_array_struct: ?[](first: int, second: string),
  interface: Interface
)

method Start() -> (client_id: string)

method Test01(client_id: string) -> (bool: bool)

method Test02(client_id: string, bool: bool) -> (int: int)

method Test03(client_id: string, int: int) -> (float: float)

method Test04(client_id: string, float: float) -> (string: string)

method Test05(client_id: string, string: string) -> (
  bool: bool,
  int: int,
  float: float,
  string: string
)

method Test06(
  client_id: string,
  bool: bool,
  int: int,
  float: float,
  string: string
) -> (
  struct: (
    bool: bool,
    int: int,
    float: float,
    string: string
  )
)

method Test07(
  client_id: string,
  struct: (
    bool: bool,
    int: int,
    float: float,
    string: string
  )
) -> (map: [string]string)

method Test08(client_id: string, map: [string]string) -> (set: [string]())

method Test09(client_id: string, set: [string]()) -> (mytype: MyType)

# returns more than one reply with "continues"
method Test10(client_id: string, mytype: MyType) -> (string: string)

# must be called as "oneway"
method Test11(client_id: string, last_more_replies: []string) -> ()

method End(client_id: string) -> (all_ok: bool)

error ClientIdError ()
error CertificationError (wants: object, got: object)