Пример #1
0
func GetUnDeployFiles(rend render.Render, params martini.Params) {

	id := helper.Int64(params["id"])
	host, errResponse := getClientWithNoBusyOrJSONError(id)
	if host == nil {
		rend.JSON(200, errResponse)
		return
	}
	result, err := host.GetUnDeployFiles()
	if err != nil || result == nil || helper.Cap(result) == 0 {
		rend.JSON(200, helper.Error(err))
		return
	}

	rend.JSON(200, helper.Success(result))
}
Пример #2
0
func Count() int {
	return helper.Cap(hostMap)
}