Esempio n. 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)
}
Esempio n. 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)
}
Esempio n. 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)
}
Esempio n. 4
0
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)
}
Esempio n. 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)
}
Esempio n. 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)
}
Esempio n. 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)
}
Esempio n. 8
0
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)
}
Esempio n. 9
0
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)
}
Esempio n. 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)
}