api

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DependantDeviceDelete added in v0.1.1

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

func DependantDeviceRestart

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

func DependantDeviceUpdate

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

func GetStatus added in v0.1.3

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

func Logger

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

Logger logs API requests

func NewRouter

func NewRouter() *mux.Router

NewRouter creates a router to route API requests

func SetStatus added in v0.1.3

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

Types

type Route

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

Route contains all the variables needed to define a route

type Routes

type Routes []Route

Routes holds all the routes assigned to the API

Jump to

Keyboard shortcuts

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