internal

package
v0.0.0-...-541196a Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Updater   Updater
	LogOutput io.Writer
}

func (*API) GetMux

func (a *API) GetMux() http.Handler

type DeviceService

type DeviceService interface {
	GetDevice(mac string) (*Device, error)
	UpdateDevice(mac, firmwareType, firmwareVersion string) error
}

type FirmwareService

type FirmwareService interface {
	GetFirmware(firmwareType, firmwareVersion string) (*Firmware, error)
	GetFirmwareByType(firmwareType string) (FirmwareList, error)
	GetFirmwareData(firmwareType, firmwareVersion string) ([]byte, error)
}

type Updater

type Updater interface {
	Update(mac, currentType, currentVersion string) ([]byte, error)
}

type UpdaterImpl

type UpdaterImpl struct {
	DeviceService   DeviceService
	FirmwareService FirmwareService
}

func (*UpdaterImpl) Update

func (u *UpdaterImpl) Update(mac, currentType, currentVersion string) ([]byte, error)

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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