19 lines
524 B
Go
19 lines
524 B
Go
package models
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
)
|
|
|
|
type DriverProvider interface {
|
|
Provide(kind DriverKind) (Driver, error)
|
|
}
|
|
|
|
type Driver interface {
|
|
SearchBridge(ctx context.Context, address string, dryRun bool) ([]Bridge, error)
|
|
SearchDevices(ctx context.Context, bridge Bridge, timeout time.Duration) ([]Device, error)
|
|
ListDevices(ctx context.Context, bridge Bridge) ([]Device, error)
|
|
Publish(ctx context.Context, bridge Bridge, devices []Device) error
|
|
Run(ctx context.Context, bridge Bridge, ch chan<- Event) error
|
|
}
|