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.

18 lines
524 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. package models
  2. import (
  3. "context"
  4. "time"
  5. )
  6. type DriverProvider interface {
  7. Provide(kind DriverKind) (Driver, error)
  8. }
  9. type Driver interface {
  10. SearchBridge(ctx context.Context, address string, dryRun bool) ([]Bridge, error)
  11. SearchDevices(ctx context.Context, bridge Bridge, timeout time.Duration) ([]Device, error)
  12. ListDevices(ctx context.Context, bridge Bridge) ([]Device, error)
  13. Publish(ctx context.Context, bridge Bridge, devices []Device) error
  14. Run(ctx context.Context, bridge Bridge, ch chan<- Event) error
  15. }