2014-05-03 06:22:05 +08:00
|
|
|
package pebble
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/hybridgroup/gobot"
|
|
|
|
)
|
|
|
|
|
2014-11-29 10:10:05 +08:00
|
|
|
var _ gobot.Adaptor = (*PebbleAdaptor)(nil)
|
2014-11-17 04:25:48 +08:00
|
|
|
|
2014-05-03 06:22:05 +08:00
|
|
|
type PebbleAdaptor struct {
|
2014-11-29 10:10:05 +08:00
|
|
|
name string
|
2014-05-03 06:22:05 +08:00
|
|
|
}
|
|
|
|
|
2014-10-17 05:26:35 +08:00
|
|
|
// NewPebbleAdaptor creates a new pebble adaptor with specified name
|
2014-05-24 06:09:18 +08:00
|
|
|
func NewPebbleAdaptor(name string) *PebbleAdaptor {
|
|
|
|
return &PebbleAdaptor{
|
2014-11-29 10:10:05 +08:00
|
|
|
name: name,
|
2014-05-24 06:09:18 +08:00
|
|
|
}
|
2014-05-03 06:22:05 +08:00
|
|
|
}
|
|
|
|
|
2014-11-29 10:10:05 +08:00
|
|
|
func (a *PebbleAdaptor) Name() string { return a.name }
|
|
|
|
|
2014-10-17 05:26:35 +08:00
|
|
|
// Connect returns true if connection to pebble is established succesfully
|
2014-11-20 15:21:19 +08:00
|
|
|
func (a *PebbleAdaptor) Connect() (errs []error) {
|
|
|
|
return
|
2014-05-03 06:22:05 +08:00
|
|
|
}
|
|
|
|
|
2014-10-17 05:26:35 +08:00
|
|
|
// Finalize returns true if connection to pebble is finalized succesfully
|
2014-11-20 15:21:19 +08:00
|
|
|
func (a *PebbleAdaptor) Finalize() (errs []error) {
|
|
|
|
return
|
2014-05-03 06:22:05 +08:00
|
|
|
}
|