webserver

package
v0.0.0-...-96f3fa0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package webserver is a restful JSON API for the ApplicationFrontend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Index

func Index(w http.ResponseWriter, r *http.Request)

func Logger

func Logger(inner http.Handler, name string) http.Handler

func MessageCreate

func MessageCreate(w http.ResponseWriter, r *http.Request)

Test with this curl command: curl -H "Content-Type: application/json" -d '{"deveui":"AFC147", "payload":"DESG6184FHAS"}' http://localhost:8080/messages

func MessageIndex

func MessageIndex(w http.ResponseWriter, r *http.Request)

func MessageShow

func MessageShow(w http.ResponseWriter, r *http.Request)

func NewRouter

func NewRouter() *mux.Router

func RepoDestroyMessage

func RepoDestroyMessage(id int64) error

func RepoFindMessage

func RepoFindMessage(id int64) components.MessageDownLink

Types

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

type Routes

type Routes []Route

Jump to

Keyboard shortcuts

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