aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorMatthew Wampler-Doty <matthew.wampler.doty@gmail.com>2015-02-28 05:13:31 +0800
committerMatthew Wampler-Doty <matthew.wampler.doty@gmail.com>2015-02-28 05:13:31 +0800
commit3820a65299831331f215e158d287fe3df3b69ea6 (patch)
treecf7b435109c646aac576ed98eefefb57e1f27223 /ui
parent8653db6df0018d08212493e3a3df4677162bdd8f (diff)
parent0efd6a881afac0b3082f3b1e8780e3438eea5b02 (diff)
downloaddexon-3820a65299831331f215e158d287fe3df3b69ea6.tar
dexon-3820a65299831331f215e158d287fe3df3b69ea6.tar.gz
dexon-3820a65299831331f215e158d287fe3df3b69ea6.tar.bz2
dexon-3820a65299831331f215e158d287fe3df3b69ea6.tar.lz
dexon-3820a65299831331f215e158d287fe3df3b69ea6.tar.xz
dexon-3820a65299831331f215e158d287fe3df3b69ea6.tar.zst
dexon-3820a65299831331f215e158d287fe3df3b69ea6.zip
Merge branch 'publictests' of github.com:ebuchman/go-ethereum into ethash_pow
Diffstat (limited to 'ui')
-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)
+}