Documentation ¶
Index ¶
- func AboutHandler(c echo.Context) error
- type ThingsHandler
- func (v ThingsHandler) Activation(c echo.Context) error
- func (v ThingsHandler) Create(c echo.Context) error
- func (v ThingsHandler) Destroy(c echo.Context) error
- func (v ThingsHandler) List(c echo.Context) error
- func (v ThingsHandler) Register(g *echo.Group)
- func (v ThingsHandler) Show(c echo.Context) error
- func (v ThingsHandler) Update(c echo.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AboutHandler ¶
func AboutHandler(c echo.Context) error
AboutHandler is a default handler to serve up memory of 18.20.
Types ¶
type ThingsHandler ¶
ThingsHandler handles existing things
func (ThingsHandler) Activation ¶
func (v ThingsHandler) Activation(c echo.Context) error
Activation activates/deactivates thing. This function is mapped to the path GET /things/{thing_id}/{t:(?:activate|deactivate)}
func (ThingsHandler) Create ¶
func (v ThingsHandler) Create(c echo.Context) error
Create adds a thing to the DB and its project. This function is mapped to the path POST /projects/{project_id}/things
func (ThingsHandler) Destroy ¶
func (v ThingsHandler) Destroy(c echo.Context) error
Destroy deletes a thing from the DB and its project. This function is mapped to the path DELETE /things/{thing_id}
func (ThingsHandler) List ¶
func (v ThingsHandler) List(c echo.Context) error
List gets all things. This function is mapped to the path GET /projects/{project_id}/things
func (ThingsHandler) Register ¶
func (v ThingsHandler) Register(g *echo.Group)
Register registers the routes of things handler on given echo group
func (ThingsHandler) Show ¶
func (v ThingsHandler) Show(c echo.Context) error
Show gets the data for one thing. This function is mapped to the path GET /things/{thing_id}
func (ThingsHandler) Update ¶
func (v ThingsHandler) Update(c echo.Context) error
Update updates a thing information includes name, model and location. Please note that you must provide them all in update request even if you do not want to change it. This function is mapped to the path PUT /things/{thing_id}