service

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2024 License: MIT Imports: 13 Imported by: 6

Documentation

Index

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) AllowWaitingForTrust added in v0.5.0

func (s *Service) AllowWaitingForTrust(ski string) bool

return if the user is still able to trust the connection

func (*Service) CancelPairingWithSKI added in v0.5.0

func (s *Service) CancelPairingWithSKI(ski string)

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

func (s *Service) DisconnectSKI(ski string, reason string)

Close a connection to a remote SKI

func (*Service) IsAutoAcceptEnabled added in v0.5.0

func (s *Service) IsAutoAcceptEnabled() bool

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

func (s *Service) RegisterRemoteSKI(ski string)

Sets the SKI as being paired and connect it if paired and not currently being connected

func (*Service) RemoteSKIConnected added in v0.5.0

func (s *Service) RemoteSKIConnected(ski string)

report a connection to a SKI

func (*Service) RemoteSKIDisconnected added in v0.5.0

func (s *Service) RemoteSKIDisconnected(ski string)

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

func (s *Service) ServiceShipIDUpdate(ski string, shipdID string)

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 (s *Service) SetAutoAccept(value bool)

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) Setup added in v0.5.0

func (s *Service) Setup() error

Starts the service by initializeing mDNS and the server.

func (*Service) SetupRemoteDevice added in v0.5.0

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) Start added in v0.5.0

func (s *Service) Start()

Starts the service

func (*Service) UnregisterRemoteSKI added in v0.5.0

func (s *Service) UnregisterRemoteSKI(ski string)

Sets the SKI as not being paired and disconnects it if connected

func (*Service) UserIsAbleToApproveOrCancelPairingRequests added in v0.5.0

func (s *Service) UserIsAbleToApproveOrCancelPairingRequests(allow bool)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL