|
|
@ -40,14 +40,14 @@ func NewHandler(bouncer security.BouncerService, authorizationService *authoriza
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// endpoints
|
|
|
|
// endpoints
|
|
|
|
endpointRouter := h.PathPrefix("/{id}").Subrouter()
|
|
|
|
endpointRouter := h.PathPrefix("/docker/{id}").Subrouter()
|
|
|
|
endpointRouter.Use(middlewares.WithEndpoint(dataStore.Endpoint(), "id"))
|
|
|
|
endpointRouter.Use(middlewares.WithEndpoint(dataStore.Endpoint(), "id"))
|
|
|
|
endpointRouter.Use(dockerOnlyMiddleware)
|
|
|
|
endpointRouter.Use(dockerOnlyMiddleware)
|
|
|
|
|
|
|
|
|
|
|
|
containersHandler := containers.NewHandler("/{id}/containers", bouncer, dataStore, dockerClientFactory, containerService)
|
|
|
|
containersHandler := containers.NewHandler("/docker/{id}/containers", bouncer, dataStore, dockerClientFactory, containerService)
|
|
|
|
endpointRouter.PathPrefix("/containers").Handler(containersHandler)
|
|
|
|
endpointRouter.PathPrefix("/containers").Handler(containersHandler)
|
|
|
|
|
|
|
|
|
|
|
|
imagesHandler := images.NewHandler("/{id}/images", bouncer, dockerClientFactory)
|
|
|
|
imagesHandler := images.NewHandler("/docker/{id}/images", bouncer, dockerClientFactory)
|
|
|
|
endpointRouter.PathPrefix("/images").Handler(imagesHandler)
|
|
|
|
endpointRouter.PathPrefix("/images").Handler(imagesHandler)
|
|
|
|
return h
|
|
|
|
return h
|
|
|
|
}
|
|
|
|
}
|
|
|
|