handler

package
v0.0.0-...-5837768 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package handler provides HTTP handlers to mediate between the model and the driver package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPError

func HTTPError(err error, ctx echo.Context)

HTTPError implements custom HTTP error handling for echo.

Types

type DDSDevices

type DDSDevices struct {
	Devices model.DDSDevices
	Mux     mux.Mux
	DDS     dds.DDS
	Debug   bool
}

DDSDevices has HTTP handlers to interact with a DDS array.

The Devices field contains the list of available devices which will be kept in memory to store the recent configuration. The Driver field contains the interface to the dds array.

func (*DDSDevices) Delete

func (h *DDSDevices) Delete(ctx echo.Context) error

Delete resets a DDS device.

func (*DDSDevices) List

func (h *DDSDevices) List(ctx echo.Context) error

List handles responds a list of available devices.

func (*DDSDevices) Update

func (h *DDSDevices) Update(ctx echo.Context) error

Update updates configuration of specified device.

Jump to

Keyboard shortcuts

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