Documentation ¶
Index ¶
- type Service
- func (s *Service) AddUseCase(useCase api.UseCaseInterface)
- func (s *Service) AllowWaitingForTrust(ski string) bool
- func (s *Service) CancelPairingWithSKI(ski string)
- func (s *Service) Configuration() *api.Configuration
- func (s *Service) DisconnectSKI(ski string, reason string)
- func (s *Service) IsAutoAcceptEnabled() bool
- func (s *Service) LocalDevice() spineapi.DeviceLocalInterface
- func (s *Service) LocalService() *shipapi.ServiceDetails
- func (s *Service) PairingDetailForSki(ski string) *shipapi.ConnectionStateDetail
- func (s *Service) RegisterRemoteSKI(ski string)
- func (s *Service) RemoteSKIConnected(ski string)
- func (s *Service) RemoteSKIDisconnected(ski string)
- func (s *Service) RemoteServiceForSKI(ski string) *shipapi.ServiceDetails
- func (s *Service) ServicePairingDetailUpdate(ski string, detail *shipapi.ConnectionStateDetail)
- func (s *Service) ServiceShipIDUpdate(ski string, shipdID string)
- func (s *Service) SetAutoAccept(value bool)
- func (s *Service) SetLogging(logger logging.LoggingInterface)
- func (s *Service) Setup() error
- func (s *Service) SetupRemoteDevice(ski string, writeI shipapi.ShipConnectionDataWriterInterface) shipapi.ShipConnectionDataReaderInterface
- func (s *Service) Shutdown()
- func (s *Service) Start()
- func (s *Service) UnregisterRemoteSKI(ski string)
- func (s *Service) UserIsAbleToApproveOrCancelPairingRequests(allow bool)
- func (s *Service) VisibleRemoteServicesUpdated(entries []shipapi.RemoteService)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶ added in v0.5.0
type Service struct {
// contains filtered or unexported fields
}
A service is the central element of an EEBUS service including its websocket server and a zeroconf service.
func NewService ¶ added in v0.5.0
func NewService(configuration *api.Configuration, serviceHandler api.ServiceReaderInterface) *Service
creates a new EEBUS service
func (*Service) AddUseCase ¶ added in v0.6.0
func (s *Service) AddUseCase(useCase api.UseCaseInterface)
add a use case to the service
func (*Service) AllowWaitingForTrust ¶ added in v0.5.0
return if the user is still able to trust the connection
func (*Service) CancelPairingWithSKI ¶ added in v0.5.0
Cancels the pairing process for a SKI
func (*Service) Configuration ¶ added in v0.5.0
func (s *Service) Configuration() *api.Configuration
func (*Service) DisconnectSKI ¶ added in v0.5.0
Close a connection to a remote SKI
func (*Service) IsAutoAcceptEnabled ¶ added in v0.5.0
func (*Service) LocalDevice ¶ added in v0.5.0
func (s *Service) LocalDevice() spineapi.DeviceLocalInterface
func (*Service) LocalService ¶ added in v0.5.0
func (s *Service) LocalService() *shipapi.ServiceDetails
func (*Service) PairingDetailForSki ¶ added in v0.5.0
func (s *Service) PairingDetailForSki(ski string) *shipapi.ConnectionStateDetail
Get the current pairing details for a given SKI
func (*Service) RegisterRemoteSKI ¶ added in v0.5.0
Sets the SKI as being paired and connect it if paired and not currently being connected
func (*Service) RemoteSKIConnected ¶ added in v0.5.0
report a connection to a SKI
func (*Service) RemoteSKIDisconnected ¶ added in v0.5.0
report a disconnection to a SKI
func (*Service) RemoteServiceForSKI ¶ added in v0.5.0
func (s *Service) RemoteServiceForSKI(ski string) *shipapi.ServiceDetails
Returns the Service detail of a given remote SKI
func (*Service) ServicePairingDetailUpdate ¶ added in v0.5.0
func (s *Service) ServicePairingDetailUpdate(ski string, detail *shipapi.ConnectionStateDetail)
Provides the current pairing state for the remote service This is called whenever the state changes and can be used to provide user information for the pairing/connection process
func (*Service) ServiceShipIDUpdate ¶ added in v0.5.0
Provides the SHIP ID the remote service reported during the handshake process This needs to be persisted and passed on for future remote service connections when using `PairRemoteService`
func (*Service) SetAutoAccept ¶ added in v0.5.0
func (*Service) SetLogging ¶ added in v0.5.0
func (s *Service) SetLogging(logger logging.LoggingInterface)
Sets a custom logging implementation By default NoLogging is used, so no logs are printed
func (*Service) SetupRemoteDevice ¶ added in v0.5.0
func (s *Service) SetupRemoteDevice(ski string, writeI shipapi.ShipConnectionDataWriterInterface) shipapi.ShipConnectionDataReaderInterface
report an approved handshake by a remote device
func (*Service) Shutdown ¶ added in v0.5.0
func (s *Service) Shutdown()
Shutdown all services and stop the server.
func (*Service) UnregisterRemoteSKI ¶ added in v0.5.0
Sets the SKI as not being paired and disconnects it if connected
func (*Service) UserIsAbleToApproveOrCancelPairingRequests ¶ added in v0.5.0
Define wether the user is able to react to an incoming pairing request
Call this with `true` e.g. if the user is currently using a web interface where an incoming request can be accepted or denied
Default is set to false, meaning every incoming pairing request will be automatically denied
func (*Service) VisibleRemoteServicesUpdated ¶ added in v0.5.0
func (s *Service) VisibleRemoteServicesUpdated(entries []shipapi.RemoteService)
report all currently visible EEBUS services