示例#1
0
func HandleGETMetric(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext) {
	var metric Metric

	handler := ctp.NewGETHandler(ctp.UserRoleTag)

	handler.Handle(w, r, context, &metric)
}
示例#2
0
func HandleGETTrigger(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext) {
	var trigger Trigger

	handler := ctp.NewGETHandler(ctp.UserRoleTag)

	handler.Handle(w, r, context, &trigger)
}
示例#3
0
func HandleGETAttribute(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext) {
	var attribute Attribute

	handler := ctp.NewGETHandler(ctp.UserRoleTag)

	handler.Handle(w, r, context, &attribute)
}
示例#4
0
文件: assets.go 项目: ehengzh/ctpd
func HandleGETAsset(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext) {
	var asset Asset

	handler := ctp.NewGETHandler(ctp.UserAccess)

	handler.Handle(w, r, context, &asset)
}
示例#5
0
func HandleGETServiceView(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext) {
	var serviceview ServiceView

	handler := ctp.NewGETHandler(ctp.UserAccess)

	handler.Handle(w, r, context, &serviceview)
}
示例#6
0
func HandleGETLogEntry(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext) {
	var log LogEntry

	handler := ctp.NewGETHandler(ctp.UserRoleTag)

	handler.Handle(w, r, context, &log)
}
示例#7
0
func HandleGETAccount(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext) {
	var account Account

	handler := ctp.NewGETHandler(ctp.AdminRoleTag)

	handler.Handle(w, r, context, &account)
}
func HandleGETMeasurement(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext) {
	var measurement Measurement

	handler := ctp.NewGETHandler(ctp.UserRoleTag)

	handler.Handle(w, r, context, &measurement)
}
示例#9
0
文件: access.go 项目: ehengzh/ctpd
func HandleGETAccess(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext) {
	var access Access

	handler := ctp.NewGETHandler(ctp.AdminAccess)

	handler.Handle(w, r, context, &access)
}
示例#10
0
func HandleGETTags(w http.ResponseWriter, r *http.Request, context *ctp.ApiContext) {
	var res TaggedResource

	handler := ctp.NewGETHandler(ctp.AdminRoleTag)

	handler.ShowTags = true

	handler.Handle(w, r, context, &res)
}