Example #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)
}
Example #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)
}
Example #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)
}
Example #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)
}
Example #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)
}
Example #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)
}
Example #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)
}
Example #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)
}
Example #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)
}