api

package
v0.0.0-...-3651c1b Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

View Source
const (
	MAX_UDP_PACKET_SIZE = 512
)

Variables

This section is empty.

Functions

func AddEndpoints

func AddEndpoints(rtr *mux.Router, version_ string)

func DeleteAlarmHandler

func DeleteAlarmHandler(c http.ResponseWriter, r *http.Request)

func DeleteServiceHandler

func DeleteServiceHandler(c http.ResponseWriter, r *http.Request)

func Execute

func Execute(commands []LineCommand, iface service.Services)

func GetAlarmHandler

func GetAlarmHandler(c http.ResponseWriter, r *http.Request)

func GetAlarmsHandler

func GetAlarmsHandler(c http.ResponseWriter, r *http.Request)

func GetServiceHandler

func GetServiceHandler(c http.ResponseWriter, r *http.Request)

func GetServicesHandler

func GetServicesHandler(c http.ResponseWriter, r *http.Request)

func Init

func Init(client_ service.Services)

func MuteServiceHandler

func MuteServiceHandler(c http.ResponseWriter, r *http.Request)

func ServiceHandler

func ServiceHandler(c http.ResponseWriter, r *http.Request)

func StatusHandler

func StatusHandler(c http.ResponseWriter, req *http.Request)

func TcpListener

func TcpListener(cfg *config.ConfigBind)

func UdpListener

func UdpListener(cfg *config.ConfigBind)

func UnmuteServiceHandler

func UnmuteServiceHandler(c http.ResponseWriter, r *http.Request)

func VersionHandler

func VersionHandler(c http.ResponseWriter, req *http.Request)

Types

type HttpApiService

type HttpApiService struct {
	model.Service
	Analysis *algorithms.BeatAnalysis `json:"analysis,omitempty"`
}

func ToHttpService

func ToHttpService(s model.Service) HttpApiService

type JsonAlarmRef

type JsonAlarmRef struct {
	Name string `json:"name"`
}

type LineCommand

type LineCommand struct {
	Action string
	Name   string
	Value  int64
}

func Parse

func Parse(data []byte) []LineCommand

Jump to

Keyboard shortcuts

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