-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/211-release-notes-entry-enforcement
- Loading branch information
Showing
43 changed files
with
914 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
server/src/main/scala/za/co/absa/atum/server/api/controller/FlowController.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright 2021 ABSA Group Limited | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package za.co.absa.atum.server.api.controller | ||
|
||
import za.co.absa.atum.model.dto.{CheckpointDTO, CheckpointQueryDTO} | ||
import za.co.absa.atum.server.model.ErrorResponse.ErrorResponse | ||
import za.co.absa.atum.server.model.SuccessResponse.MultiSuccessResponse | ||
import zio.IO | ||
import zio.macros.accessible | ||
|
||
@accessible | ||
trait FlowController { | ||
def getFlowCheckpointsV2(checkpointQueryDTO: CheckpointQueryDTO): IO[ErrorResponse, MultiSuccessResponse[CheckpointDTO]] | ||
} |
46 changes: 46 additions & 0 deletions
46
server/src/main/scala/za/co/absa/atum/server/api/controller/FlowControllerImpl.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright 2021 ABSA Group Limited | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package za.co.absa.atum.server.api.controller | ||
|
||
import za.co.absa.atum.model.dto.{CheckpointDTO, CheckpointQueryDTO} | ||
import za.co.absa.atum.server.api.service.FlowService | ||
import za.co.absa.atum.server.model.ErrorResponse.ErrorResponse | ||
import za.co.absa.atum.server.model.SuccessResponse.MultiSuccessResponse | ||
import zio._ | ||
|
||
class FlowControllerImpl(flowService: FlowService) extends FlowController with BaseController { | ||
|
||
override def getFlowCheckpointsV2( | ||
checkpointQueryDTO: CheckpointQueryDTO | ||
): IO[ErrorResponse, MultiSuccessResponse[CheckpointDTO]] = { | ||
mapToMultiSuccessResponse( | ||
serviceCall[Seq[CheckpointDTO], Seq[CheckpointDTO]]( | ||
flowService.getFlowCheckpoints(checkpointQueryDTO), | ||
identity | ||
) | ||
) | ||
} | ||
|
||
} | ||
|
||
object FlowControllerImpl { | ||
val layer: URLayer[FlowService, FlowController] = ZLayer { | ||
for { | ||
flowService <- ZIO.service[FlowService] | ||
} yield new FlowControllerImpl(flowService) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
server/src/main/scala/za/co/absa/atum/server/api/database/flows/Flows.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright 2021 ABSA Group Limited | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package za.co.absa.atum.server.api.database.flows | ||
|
||
import za.co.absa.fadb.DBSchema | ||
import za.co.absa.fadb.naming.implementations.SnakeCaseNaming.Implicits._ | ||
|
||
object Flows extends DBSchema |
Oops, something went wrong.