Documentation ¶
Overview ¶
Package webserver is a restful JSON API for the ApplicationFrontend.
Index ¶
- func Index(w http.ResponseWriter, r *http.Request)
- func Logger(inner http.Handler, name string) http.Handler
- func MessageCreate(w http.ResponseWriter, r *http.Request)
- func MessageIndex(w http.ResponseWriter, r *http.Request)
- func MessageShow(w http.ResponseWriter, r *http.Request)
- func NewRouter() *mux.Router
- func RepoCreateMessage(t components.MessageDownLink) components.MessageDownLink
- func RepoDestroyMessage(id int64) error
- func RepoFindMessage(id int64) components.MessageDownLink
- type Route
- type Routes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 RepoCreateMessage ¶
func RepoCreateMessage(t components.MessageDownLink) components.MessageDownLink
func RepoDestroyMessage ¶
func RepoFindMessage ¶
func RepoFindMessage(id int64) components.MessageDownLink
Types ¶
Click to show internal directories.
Click to hide internal directories.