17 lines
380 B
Go
17 lines
380 B
Go
package gobot
|
|
|
|
import "time"
|
|
|
|
type Driver struct {
|
|
Interval time.Duration `json:"interval"`
|
|
Pin string `json:"pin"`
|
|
Name string `json:"name"`
|
|
Commands []string `json:"commands"`
|
|
Events map[string]chan interface{} `json:"-"`
|
|
}
|
|
|
|
type DriverInterface interface {
|
|
Start() bool
|
|
Halt() bool
|
|
}
|