Documentation
¶
Index ¶
- Constants
- func App(debug bool, st store.Device) *echo.Echo
- func HealthzHandler(c echo.Context) error
- type DevicesHandler
- func (v DevicesHandler) Create(c echo.Context) error
- func (v DevicesHandler) Destroy(c echo.Context) error
- func (v DevicesHandler) List(c echo.Context) error
- func (v DevicesHandler) Refresh(c echo.Context) error
- func (v DevicesHandler) Show(c echo.Context) error
- func (v DevicesHandler) Update(c echo.Context) error
Constants ¶
View Source
const (
// TokenLength is device's token length
TokenLength = 32
)
Variables ¶
This section is empty.
Functions ¶
func HealthzHandler ¶
func HealthzHandler(c echo.Context) error
HealthzHandler shows server is up and running
Types ¶
type DevicesHandler ¶
DevicesHandler handles registered devices
func (DevicesHandler) Create ¶
func (v DevicesHandler) Create(c echo.Context) error
Create adds a device to the DB. This function is mapped to the path POST /devices
func (DevicesHandler) Destroy ¶
func (v DevicesHandler) Destroy(c echo.Context) error
Destroy deletes a device from the DB. This function is mapped to the path DELETE /devices/{device_id}
func (DevicesHandler) List ¶
func (v DevicesHandler) List(c echo.Context) error
List gets all devices. This function is mapped to the path GET /devices
func (DevicesHandler) Refresh ¶
func (v DevicesHandler) Refresh(c echo.Context) error
Refresh creates new device token. This function is mapped to the path GET /devices/{device_id}/refresh
func (DevicesHandler) Show ¶
func (v DevicesHandler) Show(c echo.Context) error
Show gets the data for one device. This function is mapped to the path GET /devices/{device_id}
func (DevicesHandler) Update ¶
func (v DevicesHandler) Update(c echo.Context) error
Update changes a device in the DB. This function is mapped to the path PUT /devices/{device_id}
Click to show internal directories.
Click to hide internal directories.