Storage: add basic storage service (#46604)

This commit is contained in:
Ryan McKinley
2022-03-17 10:19:23 -07:00
committed by GitHub
parent 4df7bf5ab2
commit 1cfb9a4a19
25 changed files with 705 additions and 166 deletions
+11
View File
@@ -211,6 +211,17 @@ func (hs *HTTPServer) registerRoutes() {
orgRoute.Get("/quotas", authorize(reqSignedIn, ac.EvalPermission(ActionOrgsQuotasRead)), routing.Wrap(hs.GetCurrentOrgQuotas))
})
if hs.Features.IsEnabled(featuremgmt.FlagStorage) {
apiRoute.Group("/storage", func(orgRoute routing.RouteRegister) {
orgRoute.Get("/list/", routing.Wrap(hs.StorageService.List))
orgRoute.Get("/list/*", routing.Wrap(hs.StorageService.List))
orgRoute.Get("/read/*", routing.Wrap(hs.StorageService.Read))
orgRoute.Delete("/delete/*", reqSignedIn, routing.Wrap(hs.StorageService.Delete))
orgRoute.Post("/upload", reqSignedIn, routing.Wrap(hs.StorageService.Upload))
})
}
// current org
apiRoute.Group("/org", func(orgRoute routing.RouteRegister) {
userIDScope := ac.Scope("users", "id", ac.Parameter(":userId"))