diff options
author | zelig <viktor.tron@gmail.com> | 2015-03-03 03:13:41 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2015-03-03 03:13:41 +0800 |
commit | af6971f823431e091142dc81f1b252f681d086cf (patch) | |
tree | 2b34e0f42adaeebcf28c955249934f7dc5270792 /ui/frontend.go | |
parent | a60a18b080197cad836f18f9d093bba3bcb6cef8 (diff) | |
parent | 65cad14f9b27db396d036f47814d4843d947ac43 (diff) | |
download | dexon-af6971f823431e091142dc81f1b252f681d086cf.tar dexon-af6971f823431e091142dc81f1b252f681d086cf.tar.gz dexon-af6971f823431e091142dc81f1b252f681d086cf.tar.bz2 dexon-af6971f823431e091142dc81f1b252f681d086cf.tar.lz dexon-af6971f823431e091142dc81f1b252f681d086cf.tar.xz dexon-af6971f823431e091142dc81f1b252f681d086cf.tar.zst dexon-af6971f823431e091142dc81f1b252f681d086cf.zip |
Merge remote-tracking branch 'upstream/develop' into blockpool2
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) +} |