示例#1
0
文件: api.go 项目: masaki-saeki/gohan
func fillInContext(context middleware.Context, r *http.Request, w http.ResponseWriter, s *schema.Schema, sync sync.Sync, identityService middleware.IdentityService) {
	context["path"] = r.URL.Path
	context["http_request"] = r
	context["http_response"] = w
	context["schema"] = s
	context["sync"] = sync
	context["identity_service"] = identityService
	context["service_auth"], _ = identityService.GetServiceAuthorization()
}
示例#2
0
func fillInContext(context middleware.Context, db db.DB,
	r *http.Request, w http.ResponseWriter,
	s *schema.Schema, p martini.Params, sync sync.Sync,
	identityService middleware.IdentityService,
	queue *job.Queue) {
	context["path"] = r.URL.Path
	context["http_request"] = r
	context["http_response"] = w
	context["schema"] = s
	context["params"] = p
	context["sync"] = sync
	context["db"] = db
	context["queue"] = queue
	context["identity_service"] = identityService
	context["service_auth"], _ = identityService.GetServiceAuthorization()
	context["openstack_client"] = identityService.GetClient()
}