Ejemplo n.º 1
0
func (self *Service) QueryHandlers() services.QueryHandlers {
	return services.QueryHandlers{
		"status": services.TextHandler(self.queryStatus),
		"tag":    services.TextHandler(self.queryTag),
		"switch": services.TextHandler(self.querySwitch),
		"logs":   services.TextHandler(self.queryLogs),
		"script": services.TextHandler(self.queryScript),
		"help": services.StaticHandler("" +
			"status: get status\n" +
			"tag name: activate tag for name\n" +
			"switch device on|off: switch device\n" +
			"logs: get recent event logs\n" +
			"script: run a script\n"),
	}
}
Ejemplo n.º 2
0
func (self *Service) QueryHandlers() services.QueryHandlers {
	return services.QueryHandlers{
		"ps":      services.TextHandler(self.queryStatus),
		"status":  services.TextHandler(self.queryStatus),
		"start":   services.TextHandler(self.queryStartStopRestart),
		"stop":    services.TextHandler(self.queryStartStopRestart),
		"restart": services.TextHandler(self.queryStartStopRestart),
		"help": services.StaticHandler("" +
			"status: get status\n" +
			"ps: alias for 'status'\n" +
			"start process: start a process\n" +
			"stop process: stop a process\n" +
			"restart process: restart a process\n"),
	}
}
Ejemplo n.º 3
0
func (self *Service) QueryHandlers() services.QueryHandlers {
	return services.QueryHandlers{
		"status": self.queryStatus,
		"ch":     services.TextHandler(self.queryCh),
		"help": services.StaticHandler("" +
			"status: get status\n" +
			"ch temp [dur (1h)]: sets heating to temp for duration\n"),
	}
}
Ejemplo n.º 4
0
func (self *Service) QueryHandlers() services.QueryHandlers {
	return services.QueryHandlers{
		"status": services.TextHandler(self.queryStatus),
		"help":   services.StaticHandler("status: get status\n"),
	}
}