You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
443 B

4 years ago
  1. package models
  2. import "context"
  3. type DriverResolver interface {
  4. ResolveFor(bridge Bridge) (Driver, error)
  5. }
  6. type Driver interface {
  7. SearchBridge(ctx context.Context, address string) (Bridge, error)
  8. SearchDevices(ctx context.Context, bridge Bridge) ([]Device, error)
  9. Consume(ctx context.Context, bridge Bridge, devices []Device, ch chan Event) (chan <-struct{}, error)
  10. Publish(ctx context.Context, bridge Bridge, device Device) error
  11. }