diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-27 03:21:41 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-27 03:21:41 +0800 |
commit | 76f6d75ef867e754264834fc7171d1a12f24c5bb (patch) | |
tree | a9531d9e14c15abd72625a98a21a9b988dc32319 /ui/frontend.go | |
parent | b2a225a52e45315f3ec90e11707fefa6059d13f5 (diff) | |
parent | fa7deb10f636d89f668249b78792f8cc48146ee8 (diff) | |
download | dexon-76f6d75ef867e754264834fc7171d1a12f24c5bb.tar dexon-76f6d75ef867e754264834fc7171d1a12f24c5bb.tar.gz dexon-76f6d75ef867e754264834fc7171d1a12f24c5bb.tar.bz2 dexon-76f6d75ef867e754264834fc7171d1a12f24c5bb.tar.lz dexon-76f6d75ef867e754264834fc7171d1a12f24c5bb.tar.xz dexon-76f6d75ef867e754264834fc7171d1a12f24c5bb.tar.zst dexon-76f6d75ef867e754264834fc7171d1a12f24c5bb.zip |
Merge branch 'master' into hotfix/0.8.5-2
Diffstat (limited to 'ui/frontend.go')
-rw-r--r-- | ui/frontend.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ui/frontend.go b/ui/frontend.go new file mode 100644 index 000000000..22dc64fdf --- /dev/null +++ b/ui/frontend.go @@ -0,0 +1,18 @@ +package ui + +// ReturnInterface is returned by the Intercom interface when a method is called +type ReturnInterface interface { + Get(i int) (interface{}, error) + Size() int +} + +// Frontend is the basic interface for calling arbitrary methods on something that +// implements a front end (GUI, CLI, etc) +type Frontend interface { + // Checks whether a specific method is implemented + Supports(method string) bool + // Call calls the given method on interface it implements. This will return + // an error with errNotImplemented if the method hasn't been implemented + // and will return a ReturnInterface if it does. + Call(method string) (ReturnInterface, error) +} |