-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Introduce model for SliceModules (#3288)
Co-authored-by: Balduin Landolt <[email protected]>
- Loading branch information
1 parent
1ed1506
commit 2687412
Showing
6 changed files
with
163 additions
and
141 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
webapi/src/main/scala/org/knora/webapi/slice/SliceModule.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,19 @@ | ||
/* | ||
* Copyright © 2021 - 2024 Swiss National Data and Service Center for the Humanities and/or DaSCH Service Platform contributors. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.knora.webapi.slice | ||
import zio.ZLayer | ||
|
||
trait SliceModule[RIn, E, ROut] { | ||
type Dependencies = RIn | ||
type Provided = ROut | ||
inline def layer: ZLayer[RIn, E, ROut] | ||
} | ||
|
||
type RModule[RIn, ROut] = SliceModule[RIn, Throwable, ROut] | ||
type URModule[RIn, ROut] = SliceModule[RIn, Nothing, ROut] | ||
type Module[E, ROut] = SliceModule[Any, E, ROut] | ||
type UModule[ROut] = SliceModule[Any, Nothing, ROut] | ||
type TaskModule[ROut] = SliceModule[Any, Throwable, ROut] |
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