Versions in this module Expand all Collapse all v0 v0.11.0 Feb 17, 2016 Changes in this version + var ErrUnknownEvent = errors.New("Event does not exist") + func After(t time.Duration, f func()) + func Assert(t *testing.T, a interface{}, b interface{}) + func Every(t time.Duration, f func()) + func FromScale(input, min, max float64) float64 + func On(e *Event, f func(s interface{})) (err error) + func Once(e *Event, f func(s interface{})) (err error) + func Publish(e *Event, val interface{}) (err error) + func Rand(max int) int + func Refute(t *testing.T, a interface{}, b interface{}) + func ToScale(input, min, max float64) float64 + func Version() string + type Adaptor interface + Connect func() []error + Finalize func() []error + Name func() string + type Commander interface + AddCommand func(name string, command func(map[string]interface{}) interface{}) + Command func(string) (command func(map[string]interface{}) interface{}) + Commands func() (commands map[string]func(map[string]interface{}) interface{}) + func NewCommander() Commander + type Connection Adaptor + type Connections []Connection + func (c *Connections) Each(f func(Connection)) + func (c *Connections) Finalize() (errs []error) + func (c *Connections) Len() int + func (c *Connections) Start() (errs []error) + type Device Driver + type Devices []Device + func (d *Devices) Each(f func(Device)) + func (d *Devices) Halt() (errs []error) + func (d *Devices) Len() int + func (d *Devices) Start() (errs []error) + type Driver interface + Connection func() Connection + Halt func() []error + Name func() string + Start func() []error + type Event struct + Callbacks []callback + func NewEvent() *Event + func (e *Event) Write(data interface{}) + type Eventer interface + AddEvent func(name string) + Event func(name string) (event *Event) + Events func() (events map[string]*Event) + func NewEventer() Eventer + type Gobot struct + AutoStop bool + func NewGobot() *Gobot + func (g *Gobot) AddRobot(r *Robot) *Robot + func (g *Gobot) Robot(name string) *Robot + func (g *Gobot) Robots() *Robots + func (g *Gobot) Start() (errs []error) + func (g *Gobot) Stop() (errs []error) + type JSONConnection struct + Adaptor string + Name string + func NewJSONConnection(connection Connection) *JSONConnection + type JSONDevice struct + Commands []string + Connection string + Driver string + Name string + func NewJSONDevice(device Device) *JSONDevice + type JSONGobot struct + Commands []string + Robots []*JSONRobot + func NewJSONGobot(gobot *Gobot) *JSONGobot + type JSONRobot struct + Commands []string + Connections []*JSONConnection + Devices []*JSONDevice + Name string + func NewJSONRobot(robot *Robot) *JSONRobot + type Pinner interface + Pin func() string + type Porter interface + Port func() string + type Robot struct + Name string + Work func() + func NewRobot(name string, v ...interface{}) *Robot + func (r *Robot) AddConnection(c Connection) Connection + func (r *Robot) AddDevice(d Device) Device + func (r *Robot) Connection(name string) Connection + func (r *Robot) Connections() *Connections + func (r *Robot) Device(name string) Device + func (r *Robot) Devices() *Devices + func (r *Robot) Start() (errs []error) + func (r *Robot) Stop() (errs []error) + type Robots []*Robot + func (r *Robots) Each(f func(*Robot)) + func (r *Robots) Len() int + func (r *Robots) Start() (errs []error) + func (r *Robots) Stop() (errs []error)