Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceAdder ¶
type DeviceAdder interface {
AddDevice(d contract.Device, commands []contract.Command) (string, error)
DeviceProfileLoader
DeviceServiceLoader
}
type DeviceAllExecutor ¶
func NewDeviceLoadAll ¶
func NewDeviceLoadAll(cfg bootstrapConfig.ServiceInfo, db DeviceLoader, log logger.LoggingClient) DeviceAllExecutor
type DeviceCreator ¶
func NewAddDevice ¶
func NewAddDevice(ch chan DeviceEvent, db DeviceAdder, new contract.Device) DeviceCreator
type DeviceEvent ¶
type DeviceLoader ¶
type DeviceProfileLoader ¶
type DeviceProfileLoader interface {
GetDeviceProfileById(id string) (contract.DeviceProfile, error)
GetDeviceProfileByName(n string) (contract.DeviceProfile, error)
}
type DeviceServiceLoader ¶
type DeviceServiceLoader interface {
GetDeviceServiceById(id string) (contract.DeviceService, error)
GetDeviceServiceByName(n string) (contract.DeviceService, error)
}
type DeviceUpdateExecutor ¶
type DeviceUpdateExecutor interface {
Execute() (err error)
}
func NewUpdateDevice ¶
func NewUpdateDevice(ch chan DeviceEvent, db DeviceUpdater, d contract.Device, lc logger.LoggingClient) DeviceUpdateExecutor
type DeviceUpdater ¶
type Notifier ¶
type Notifier interface {
// Execute performs the main logic of the Notifier implementation.
// This function is meant to be called from a goroutine, thus log eny errors and do not return them.
Execute()
}
func NewNotifier ¶
func NewNotifier(evt chan DeviceEvent, nc notifications.NotificationsClient, cfg metaConfig.NotificationInfo, db DeviceServiceLoader, requester Requester, logger logger.LoggingClient, ctx context.Context) Notifier
type ProfileIdExecutor ¶
ProfileIdExecutor provides functionality for loading devices by way of the operator pattern.
func NewProfileIdExecutor ¶
func NewProfileIdExecutor(cfg bootstrapConfig.ServiceInfo, db DeviceLoader, log logger.LoggingClient, profile string) ProfileIdExecutor
NewProfileIdExecutor creates a new ProfileIdExecutor
type Requester ¶
type Requester interface {
// Execute will invoke the supplied request. I'm not thrilled about providing the extra parameter here, but it
// follows from the net/http/Client.Do(req *Request) from the Go std lib. That is, I don't know the actual request
// to be performed until runtime and if I am to mock this properly, I don't know the request at the time of
// injection.
Execute(req *http.Request)
}
func NewRequester ¶
func NewRequester(key RequestType, logger logger.LoggingClient, ctx context.Context) (r Requester, err error)
Click to show internal directories.
Click to hide internal directories.