Skip to content

Commit 5e56656

Browse files
committed
feat: stub secrets API endpoints
WIP - next tasks: - figure out dummy data to return - review unit tests for proper testing Signed-off-by: Andy Stoneberg <astonebe@redhat.com>
1 parent 5775b5d commit 5e56656

File tree

12 files changed

+2501
-0
lines changed

12 files changed

+2501
-0
lines changed

workspaces/backend/api/app.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ const (
6060
// namespaces
6161
AllNamespacesPath = PathPrefix + "/namespaces"
6262

63+
// secrets
64+
AllSecretsPath = PathPrefix + "/secrets/:" + NamespacePathParam
65+
SecretsByNamePath = AllSecretsPath + "/:" + ResourceNamePathParam
66+
6367
// swagger
6468
SwaggerPath = PathPrefix + "/swagger/*any"
6569
SwaggerDocPath = PathPrefix + "/swagger/doc.json"
@@ -112,6 +116,13 @@ func (a *App) Routes() http.Handler {
112116
// namespaces
113117
router.GET(AllNamespacesPath, a.GetNamespacesHandler)
114118

119+
// secrets
120+
router.GET(AllSecretsPath, a.GetSecretsHandler)
121+
router.POST(AllSecretsPath, a.CreateSecretHandler)
122+
router.GET(SecretsByNamePath, a.GetSecretHandler)
123+
router.PUT(SecretsByNamePath, a.UpdateSecretHandler)
124+
router.DELETE(SecretsByNamePath, a.DeleteSecretHandler)
125+
115126
// workspaces
116127
router.GET(AllWorkspacesPath, a.GetAllWorkspacesHandler)
117128
router.GET(WorkspacesByNamespacePath, a.GetWorkspacesByNamespaceHandler)

0 commit comments

Comments
 (0)