(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, requestData map[string]interface{})
| 184 | } |
| 185 | |
| 186 | func fillInContext(context middleware.Context, db db.DB, |
| 187 | r *http.Request, w http.ResponseWriter, |
| 188 | s *schema.Schema, p martini.Params, sync sync.Sync, |
| 189 | identityService middleware.IdentityService, |
| 190 | queue *job.Queue, requestData map[string]interface{}) { |
| 191 | context["path"] = r.URL.Path |
| 192 | context["http_request"] = r |
| 193 | context["http_response"] = w |
| 194 | context["request_data"] = deepcopy.Copy(requestData).(map[string]interface{}) |
| 195 | context["schema"] = s |
| 196 | context["schema_id"] = s.ID |
| 197 | params := map[string]interface{}{} |
| 198 | for key, value := range p { |
| 199 | params[key] = value |
| 200 | } |
| 201 | context["params"] = params |
| 202 | context["sync"] = sync |
| 203 | context["db"] = db |
| 204 | context["queue"] = queue |
| 205 | context["identity_service"] = identityService |
| 206 | context["service_auth"], _ = identityService.GetServiceAuthorization() |
| 207 | context["openstack_client"] = identityService.GetClient() |
| 208 | } |
| 209 | |
| 210 | //MapRouteBySchema setup api route by schema |
| 211 | func MapRouteBySchema(server *Server, dataStore db.DB, s *schema.Schema) { |
no test coverage detected