actions

package
v0.0.0-...-4ea9769 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2018 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ENV = envy.Get("GO_ENV", "development")

ENV is used to help switch settings based on where the application is being run. Default is "development".

Functions

func AboutHandler

func AboutHandler(c buffalo.Context) error

AboutHandler is a default handler to serve up memory of 18.20.

func App

func App() *buffalo.App

App is where all routes and middleware for buffalo should be defined. This is the nerve center of your application.

func Log

func Log(client paho.Client, message paho.Message)

Log provides data gathering endpoint for devices. we call these data that are came from devices log from kaa old days. log/{deveui}/send

func Notification

func Notification(client paho.Client, message paho.Message)

Notification provides data sending endpoint for devices. we call these data that are sent to devices notification from kaa old days. device/{deveui}/tx

Types

type DevicesResource

type DevicesResource struct {
	buffalo.Resource
}

DevicesResource manages system devices

func (DevicesResource) Create

func (v DevicesResource) Create(c buffalo.Context) error

Create adds a device to the DB. This function is mapped to the path POST /devices

func (DevicesResource) Destroy

func (v DevicesResource) Destroy(c buffalo.Context) error

Destroy deletes a device from the DB. This function is mapped to the path DELETE /devices/{device_id}

func (DevicesResource) Edit

Edit renders a edit formular for a device. This function is mapped to the path GET /deivces/{device_id}/edit

func (DevicesResource) List

List gets all devices. This function is mapped to the path GET /devices

func (DevicesResource) New

New renders the form for creating a new device. This function is mapped to the path GET /devices/new

func (DevicesResource) Refresh

func (v DevicesResource) Refresh(c buffalo.Context) error

Refresh creates new device token. This function is mapped to the path GET /devices/{device_id}/refresh

func (DevicesResource) Show

Show gets the data for one device. This function is mapped to the path GET /devices/{device_id}

func (DevicesResource) Update

func (v DevicesResource) Update(c buffalo.Context) error

Update changes a device in the DB. This function is mapped to the path PUT /devices/{device_id}

Jump to

Keyboard shortcuts

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