15 lines
443 B
Go
15 lines
443 B
Go
package models
|
|
|
|
import "context"
|
|
|
|
type DriverResolver interface {
|
|
ResolveFor(bridge Bridge) (Driver, error)
|
|
}
|
|
|
|
type Driver interface {
|
|
SearchBridge(ctx context.Context, address string) (Bridge, error)
|
|
SearchDevices(ctx context.Context, bridge Bridge) ([]Device, error)
|
|
Consume(ctx context.Context, bridge Bridge, devices []Device, ch chan Event) (chan <-struct{}, error)
|
|
Publish(ctx context.Context, bridge Bridge, device Device) error
|
|
}
|