feat(portal): add logical group catalog api
This commit is contained in:
@@ -31,6 +31,9 @@ type ActionSet struct {
|
||||
GetBatchImportRun func(context.Context, string) (batch.RunSummaryProjection, error)
|
||||
ListBatchImportRunItems func(context.Context, ListBatchImportRunItemsRequest) (ListBatchImportRunItemsResponse, error)
|
||||
GetBatchImportRunItem func(context.Context, GetBatchImportRunItemRequest) (batch.ItemDetailProjection, error)
|
||||
ListPortalLogicalGroups func(context.Context) ([]PortalLogicalGroupInfo, error)
|
||||
GetPortalLogicalGroup func(context.Context, string) (PortalLogicalGroupInfo, error)
|
||||
ListPortalLogicalGroupModels func(context.Context, string) ([]PortalLogicalGroupModel, error)
|
||||
CreateLogicalGroup func(context.Context, CreateLogicalGroupRequest) (LogicalGroupInfo, error)
|
||||
ListLogicalGroups func(context.Context) ([]LogicalGroupInfo, error)
|
||||
GetLogicalGroup func(context.Context, string) (LogicalGroupInfo, error)
|
||||
@@ -333,6 +336,15 @@ func NewAPIHandlerWithAuth(adminAuth AdminAuthConfig, actions ActionSet) http.Ha
|
||||
mux.HandleFunc("POST /api/admin/session/logout", func(w http.ResponseWriter, r *http.Request) {
|
||||
handleAdminSessionLogout(w, r)
|
||||
})
|
||||
mux.HandleFunc("GET /api/portal/logical-groups", func(w http.ResponseWriter, r *http.Request) {
|
||||
handleListPortalLogicalGroups(w, r, actions.ListPortalLogicalGroups)
|
||||
})
|
||||
mux.HandleFunc("GET /api/portal/logical-groups/{groupID}", func(w http.ResponseWriter, r *http.Request) {
|
||||
handleGetPortalLogicalGroup(w, r, actions.GetPortalLogicalGroup)
|
||||
})
|
||||
mux.HandleFunc("GET /api/portal/logical-groups/{groupID}/models", func(w http.ResponseWriter, r *http.Request) {
|
||||
handleListPortalLogicalGroupModels(w, r, actions.ListPortalLogicalGroupModels)
|
||||
})
|
||||
mux.Handle("POST /api/batch-import/runs", requireAdminAccess(adminAuth, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
handleCreateBatchImportRun(w, r, actions.CreateBatchImportRun)
|
||||
})))
|
||||
@@ -1274,6 +1286,9 @@ func NewActionSetWithStickyRuntime(sqliteDSN string, stickyRuntime stickyStoreRu
|
||||
GetBatchImportRun: buildGetBatchImportRunAction(sqliteDSN),
|
||||
ListBatchImportRunItems: buildListBatchImportRunItemsAction(sqliteDSN),
|
||||
GetBatchImportRunItem: buildGetBatchImportRunItemAction(sqliteDSN),
|
||||
ListPortalLogicalGroups: buildListPortalLogicalGroupsAction(sqliteDSN),
|
||||
GetPortalLogicalGroup: buildGetPortalLogicalGroupAction(sqliteDSN),
|
||||
ListPortalLogicalGroupModels: buildListPortalLogicalGroupModelsAction(sqliteDSN),
|
||||
CreateLogicalGroup: buildCreateLogicalGroupAction(sqliteDSN),
|
||||
ListLogicalGroups: buildListLogicalGroupsAction(sqliteDSN),
|
||||
GetLogicalGroup: buildGetLogicalGroupAction(sqliteDSN),
|
||||
|
||||
Reference in New Issue
Block a user