Пример #1
0
func ResourceDescription(cx *goweb.Context) {
	LogRequest(cx.Request)
	r := resource{
		R: []string{"node", "user"},
		U: apiUrl(cx) + "/",
		D: siteUrl(cx) + "/",
		C: conf.ADMIN_EMAIL,
		I: "Shock",
		T: "Shock",
	}
	cx.WriteResponse(r, 200)
}
Пример #2
0
func ResourceDescription(cx *goweb.Context) {
	LogRequest(cx.Request)
	r := resource{
		R: []string{"job", "work", "client", "queue"},
		U: apiUrl(cx) + "/",
		D: siteUrl(cx) + "/",
		C: conf.ADMIN_EMAIL,
		I: "AWE",
		T: "AWE",
	}
	cx.WriteResponse(r, 200)
}
Пример #3
0
func ResourceDescription(cx *goweb.Context) {
	LogRequest(cx.Request)
	host := ""
	if strings.Contains(cx.Request.Host, ":") {
		split := strings.Split(cx.Request.Host, ":")
		host = split[0]
	} else {
		host = cx.Request.Host
	}
	r := resource{
		R: []string{"job", "work", "client"},
		U: "http://" + host + ":" + fmt.Sprint(conf.API_PORT) + "/",
		D: "http://" + host + ":" + fmt.Sprint(conf.SITE_PORT) + "/",
		C: conf.ADMIN_EMAIL,
		I: "AWE",
		T: "AWE",
	}
	cx.WriteResponse(r, 200)
}