コード例 #1
0
ファイル: metrics.go プロジェクト: cloudsecurityalliance/ctpd
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
ファイル: serviceviews.go プロジェクト: ehengzh/ctpd
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
ファイル: logs.go プロジェクト: cloudsecurityalliance/ctpd
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)
}
コード例 #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)
}
コード例 #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
ファイル: tags.go プロジェクト: cloudsecurityalliance/ctpd
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)
}