aboutsummaryrefslogtreecommitdiffstats
path: root/ui/frontend.go
diff options
context:
space:
mode:
authorPaweł Bylica <pawel.bylica@imapp.pl>2015-03-03 01:46:55 +0800
committerPaweł Bylica <pawel.bylica@imapp.pl>2015-03-03 01:46:55 +0800
commit24003c76d12b83602ca93be375a3bc19f4fb3f1b (patch)
tree90e77c349df52806d78693f93704b92786fcb693 /ui/frontend.go
parent9c6d9dfc5c9fdd9aeb8f4d9926ed98008b849f2e (diff)
parent65cad14f9b27db396d036f47814d4843d947ac43 (diff)
downloadgo-tangerine-24003c76d12b83602ca93be375a3bc19f4fb3f1b.tar
go-tangerine-24003c76d12b83602ca93be375a3bc19f4fb3f1b.tar.gz
go-tangerine-24003c76d12b83602ca93be375a3bc19f4fb3f1b.tar.bz2
go-tangerine-24003c76d12b83602ca93be375a3bc19f4fb3f1b.tar.lz
go-tangerine-24003c76d12b83602ca93be375a3bc19f4fb3f1b.tar.xz
go-tangerine-24003c76d12b83602ca93be375a3bc19f4fb3f1b.tar.zst
go-tangerine-24003c76d12b83602ca93be375a3bc19f4fb3f1b.zip
Merge remote-tracking branch 'upstream/develop' into evmjit
Diffstat (limited to 'ui/frontend.go')
-rw-r--r--ui/frontend.go18
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)
+}