|
|
@@ -4,7 +4,7 @@ import (
|
|
|
"fmt"
|
|
|
|
|
|
"github.com/go-chi/chi/v5"
|
|
|
- "github.com/porter-dev/porter/api/server/handlers/stacks"
|
|
|
+ "github.com/porter-dev/porter/api/server/handlers/porter_app"
|
|
|
"github.com/porter-dev/porter/api/server/shared"
|
|
|
"github.com/porter-dev/porter/api/server/shared/config"
|
|
|
"github.com/porter-dev/porter/api/server/shared/router"
|
|
|
@@ -55,7 +55,7 @@ func getStackRoutes(
|
|
|
|
|
|
var routes []*router.Route
|
|
|
|
|
|
- // GET /api/projects/{project_id}/clusters/{cluster_id}/stacks/{name} -> stacks.NewPorterAppGetHandler
|
|
|
+ // GET /api/projects/{project_id}/clusters/{cluster_id}/stacks/{name} -> porter_app.NewPorterAppGetHandler
|
|
|
getPorterAppEndpoint := factory.NewAPIEndpoint(
|
|
|
&types.APIRequestMetadata{
|
|
|
Verb: types.APIVerbGet,
|
|
|
@@ -72,7 +72,7 @@ func getStackRoutes(
|
|
|
},
|
|
|
)
|
|
|
|
|
|
- getPorterAppHandler := stacks.NewGetPorterAppHandler(
|
|
|
+ getPorterAppHandler := porter_app.NewGetPorterAppHandler(
|
|
|
config,
|
|
|
factory.GetResultWriter(),
|
|
|
)
|
|
|
@@ -83,7 +83,7 @@ func getStackRoutes(
|
|
|
Router: r,
|
|
|
})
|
|
|
|
|
|
- // GET /api/projects/{project_id}/clusters/{cluster_id}/stacks/{name} -> stacks.NewPorterAppListHandler
|
|
|
+ // GET /api/projects/{project_id}/clusters/{cluster_id}/stacks/{name} -> porter_app.NewPorterAppListHandler
|
|
|
listPorterAppEndpoint := factory.NewAPIEndpoint(
|
|
|
&types.APIRequestMetadata{
|
|
|
Verb: types.APIVerbList,
|
|
|
@@ -100,7 +100,7 @@ func getStackRoutes(
|
|
|
},
|
|
|
)
|
|
|
|
|
|
- listPorterAppHandler := stacks.NewPorterAppListHandler(
|
|
|
+ listPorterAppHandler := porter_app.NewPorterAppListHandler(
|
|
|
config,
|
|
|
factory.GetResultWriter(),
|
|
|
)
|
|
|
@@ -128,7 +128,7 @@ func getStackRoutes(
|
|
|
},
|
|
|
)
|
|
|
|
|
|
- deletePorterAppByNameHandler := stacks.NewDeletePorterAppByNameHandler(
|
|
|
+ deletePorterAppByNameHandler := porter_app.NewDeletePorterAppByNameHandler(
|
|
|
config,
|
|
|
factory.GetDecoderValidator(),
|
|
|
factory.GetResultWriter(),
|
|
|
@@ -140,7 +140,7 @@ func getStackRoutes(
|
|
|
Router: r,
|
|
|
})
|
|
|
|
|
|
- // POST /api/projects/{project_id}/clusters/{cluster_id}/stacks/{stack} -> stacks.NewCreatePorterAppHandler
|
|
|
+ // POST /api/projects/{project_id}/clusters/{cluster_id}/stacks/{stack} -> porter_app.NewCreatePorterAppHandler
|
|
|
createPorterAppEndpoint := factory.NewAPIEndpoint(
|
|
|
&types.APIRequestMetadata{
|
|
|
Verb: types.APIVerbCreate,
|
|
|
@@ -157,7 +157,7 @@ func getStackRoutes(
|
|
|
},
|
|
|
)
|
|
|
|
|
|
- createPorterAppHandler := stacks.NewCreatePorterAppHandler(
|
|
|
+ createPorterAppHandler := porter_app.NewCreatePorterAppHandler(
|
|
|
config,
|
|
|
factory.GetDecoderValidator(),
|
|
|
factory.GetResultWriter(),
|
|
|
@@ -169,7 +169,7 @@ func getStackRoutes(
|
|
|
Router: r,
|
|
|
})
|
|
|
|
|
|
- // POST /api/projects/{project_id}/clusters/{cluster_id}/stacks/{stack}/pr -> stacks.NewOpenStackPRHandler
|
|
|
+ // POST /api/projects/{project_id}/clusters/{cluster_id}/stacks/{stack}/pr -> porter_app.NewOpenStackPRHandler
|
|
|
createSecretAndOpenGitHubPullRequestEndpoint := factory.NewAPIEndpoint(
|
|
|
&types.APIRequestMetadata{
|
|
|
Verb: types.APIVerbCreate,
|
|
|
@@ -186,7 +186,7 @@ func getStackRoutes(
|
|
|
},
|
|
|
)
|
|
|
|
|
|
- createSecretAndOpenGitHubPullRequestHandler := stacks.NewOpenStackPRHandler(
|
|
|
+ createSecretAndOpenGitHubPullRequestHandler := porter_app.NewOpenStackPRHandler(
|
|
|
config,
|
|
|
factory.GetDecoderValidator(),
|
|
|
factory.GetResultWriter(),
|
|
|
@@ -198,7 +198,7 @@ func getStackRoutes(
|
|
|
Router: r,
|
|
|
})
|
|
|
|
|
|
- // GET /api/projects/{project_id}/clusters/{cluster_id}/stacks/{name}/events -> stacks.NewPorterAppEventListHandler
|
|
|
+ // GET /api/projects/{project_id}/clusters/{cluster_id}/stacks/{name}/events -> porter_app.NewPorterAppEventListHandler
|
|
|
listPorterAppEventsEndpoint := factory.NewAPIEndpoint(
|
|
|
&types.APIRequestMetadata{
|
|
|
Verb: types.APIVerbList,
|
|
|
@@ -215,7 +215,7 @@ func getStackRoutes(
|
|
|
},
|
|
|
)
|
|
|
|
|
|
- listPorterAppEventsHandler := stacks.NewPorterAppEventListHandler(
|
|
|
+ listPorterAppEventsHandler := porter_app.NewPorterAppEventListHandler(
|
|
|
config,
|
|
|
factory.GetResultWriter(),
|
|
|
)
|
|
|
@@ -226,7 +226,7 @@ func getStackRoutes(
|
|
|
Router: r,
|
|
|
})
|
|
|
|
|
|
- // POST /api/projects/{project_id}/clusters/{cluster_id}/stacks/{name}/events -> stacks.NewCreatePorterAppEventEndpoint
|
|
|
+ // POST /api/projects/{project_id}/clusters/{cluster_id}/stacks/{name}/events -> porter_app.NewCreatePorterAppEventEndpoint
|
|
|
createPorterAppEventEndpoint := factory.NewAPIEndpoint(
|
|
|
&types.APIRequestMetadata{
|
|
|
Verb: types.APIVerbCreate,
|
|
|
@@ -243,7 +243,7 @@ func getStackRoutes(
|
|
|
},
|
|
|
)
|
|
|
|
|
|
- createPorterAppEventHandler := stacks.NewCreateUpdatePorterAppEventHandler(
|
|
|
+ createPorterAppEventHandler := porter_app.NewCreateUpdatePorterAppEventHandler(
|
|
|
config,
|
|
|
factory.GetDecoderValidator(),
|
|
|
factory.GetResultWriter(),
|
|
|
@@ -255,7 +255,7 @@ func getStackRoutes(
|
|
|
Router: r,
|
|
|
})
|
|
|
|
|
|
- // POST /api/projects/{project_id}/clusters/{cluster_id}/stacks/analytics -> stacks.NewPorterAppAnalyticsHandler
|
|
|
+ // POST /api/projects/{project_id}/clusters/{cluster_id}/stacks/analytics -> porter_app.NewPorterAppAnalyticsHandler
|
|
|
porterAppAnalyticsEndpoint := factory.NewAPIEndpoint(
|
|
|
&types.APIRequestMetadata{
|
|
|
Verb: types.APIVerbUpdate,
|
|
|
@@ -272,7 +272,7 @@ func getStackRoutes(
|
|
|
},
|
|
|
)
|
|
|
|
|
|
- porterAppAnalyticsHandler := stacks.NewPorterAppAnalyticsHandler(
|
|
|
+ porterAppAnalyticsHandler := porter_app.NewPorterAppAnalyticsHandler(
|
|
|
config,
|
|
|
factory.GetDecoderValidator(),
|
|
|
factory.GetResultWriter(),
|