summaryrefslogtreecommitdiff
path: root/vendor/github.com/varlink/go/cmd/varlink-go-certification/orgvarlinkcertification
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-05-07 17:09:11 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-05-08 21:01:28 +0000
commit25263558f10b5e2e246b2349b49b1585852d57b6 (patch)
tree9cf12d770c3b3a376ffa85bdd327a3cb4e11ad99 /vendor/github.com/varlink/go/cmd/varlink-go-certification/orgvarlinkcertification
parent21ebdb558cb939176d862e12bec99f34a1e5d4ba (diff)
downloadpodman-25263558f10b5e2e246b2349b49b1585852d57b6.tar.gz
podman-25263558f10b5e2e246b2349b49b1585852d57b6.tar.bz2
podman-25263558f10b5e2e246b2349b49b1585852d57b6.zip
Generate varlink API documentation automatically
Using varlink's idl parser, we generate API documentation for the podman API relying on the .varlink file as the source. Signed-off-by: baude <bbaude@redhat.com> Closes: #734 Approved by: baude
Diffstat (limited to 'vendor/github.com/varlink/go/cmd/varlink-go-certification/orgvarlinkcertification')
-rw-r--r--vendor/github.com/varlink/go/cmd/varlink-go-certification/orgvarlinkcertification/generate.go3
-rw-r--r--vendor/github.com/varlink/go/cmd/varlink-go-certification/orgvarlinkcertification/org.varlink.certification.varlink89
2 files changed, 92 insertions, 0 deletions
diff --git a/vendor/github.com/varlink/go/cmd/varlink-go-certification/orgvarlinkcertification/generate.go b/vendor/github.com/varlink/go/cmd/varlink-go-certification/orgvarlinkcertification/generate.go
new file mode 100644
index 000000000..e1ac7f090
--- /dev/null
+++ b/vendor/github.com/varlink/go/cmd/varlink-go-certification/orgvarlinkcertification/generate.go
@@ -0,0 +1,3 @@
+package orgvarlinkcertification
+
+//go:generate go run ../../varlink-go-interface-generator/main.go org.varlink.certification.varlink
diff --git a/vendor/github.com/varlink/go/cmd/varlink-go-certification/orgvarlinkcertification/org.varlink.certification.varlink b/vendor/github.com/varlink/go/cmd/varlink-go-certification/orgvarlinkcertification/org.varlink.certification.varlink
new file mode 100644
index 000000000..41b9967b5
--- /dev/null
+++ b/vendor/github.com/varlink/go/cmd/varlink-go-certification/orgvarlinkcertification/org.varlink.certification.varlink
@@ -0,0 +1,89 @@
+# 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)
+
+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)