You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/adrs/decisions/2023-01-18-quill-library-for-sql-statement-generation.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -175,5 +175,5 @@ val result: Future[Seq[Person]] = db.run(q.result)
175
175
-[Database access libraries in Scala](https://medium.com/@takezoe/database-access-libraries-in-scala-7aa7590aa3db)
176
176
-[Typechecking SQL queries with doobie](https://godatadriven.com/blog/typechecking-sql-queries-with-doobie/)
177
177
-[Typechecking SQL in Slick and doobie](https://underscore.io/blog/posts/2015/05/28/typechecking-sql.html)
178
-
-[Doobie example in the Pollux library](https://github.com/hyperledger/identus-cloud-agent/blob/pollux-v0.17.0/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcCredentialRepository.scala)
179
-
-[Quill example in the Pollux library](https://github.com/hyperledger/identus-cloud-agent/blob/pollux-v0.17.0/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/VerifiableCredentialSchema.scala)
178
+
-[Doobie example in the Pollux library](https://github.com/hyperledger-identus/cloud-agent/blob/pollux-v0.17.0/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/repository/JdbcCredentialRepository.scala)
179
+
-[Quill example in the Pollux library](https://github.com/hyperledger-identus/cloud-agent/blob/pollux-v0.17.0/pollux/lib/sql-doobie/src/main/scala/io/iohk/atala/pollux/sql/model/VerifiableCredentialSchema.scala)
Copy file name to clipboardExpand all lines: documentation/adrs/decisions/2024-01-16-use-zio-failures-and-defects-effectively.md
+16-16Lines changed: 16 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -240,7 +240,7 @@ way to recover
240
240
from an SQL execution error in a database-agnostic way.
241
241
242
242
A good approach is to use ZIO Defects to report repository errors, declaring all repository methods as `URIO`
243
-
or `UIO`([example](https://github.com/hyperledger/identus-cloud-agent/blob/main/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/repository/ConnectionRepository.scala)).
243
+
or `UIO`([example](https://github.com/hyperledger-identus/cloud-agent/blob/main/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/repository/ConnectionRepository.scala)).
244
244
Conversely, declaring them as `Task` assumes that the caller (i.e. service) can properly handle and
245
245
recover from the low-level and database-specific exceptions exposed in the error channel, which is a fallacy.
246
246
@@ -251,7 +251,7 @@ trait ConnectionRepository {
251
251
```
252
252
253
253
Converting a ZIO `Task` to ZIO `UIO` can easily be done
254
-
using `ZIO#orDie`([example](https://github.com/hyperledger/identus-cloud-agent/blob/eb898e068f768507d6979a5d9bab35ef7ad4a045/connect/lib/sql-doobie/src/main/scala/io/iohk/atala/connect/sql/repository/JdbcConnectionRepository.scala#L114)).
254
+
using `ZIO#orDie`([example](https://github.com/hyperledger-identus/cloud-agent/blob/eb898e068f768507d6979a5d9bab35ef7ad4a045/connect/lib/sql-doobie/src/main/scala/io/iohk/atala/connect/sql/repository/JdbcConnectionRepository.scala#L114)).
@@ -293,11 +293,11 @@ class JdbcConnectionRepository(xa: Transactor[ContextAwareTask], xb: Transactor[
293
293
Follow the `get` and `find` best practices in the repository interface for read operations:
294
294
295
295
-`getXxx()` returns the requested record or throws an unexpected exception/defect when not
296
-
found ([example](https://github.com/hyperledger/identus-cloud-agent/blob/eb898e068f768507d6979a5d9bab35ef7ad4a045/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/repository/ConnectionRepository.scala#L36)).
296
+
found ([example](https://github.com/hyperledger-identus/cloud-agent/blob/eb898e068f768507d6979a5d9bab35ef7ad4a045/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/repository/ConnectionRepository.scala#L36)).
297
297
-`findXxx()` returns an `Option` with or without the request record, which allows the caller service to handle
298
298
the `found`
299
299
and `not-found` cases and report appropriately to the end
300
-
user ([example](https://github.com/hyperledger/identus-cloud-agent/blob/eb898e068f768507d6979a5d9bab35ef7ad4a045/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/repository/ConnectionRepository.scala#L32)).
300
+
user ([example](https://github.com/hyperledger-identus/cloud-agent/blob/eb898e068f768507d6979a5d9bab35ef7ad4a045/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/repository/ConnectionRepository.scala#L32)).
301
301
302
302
```scala
303
303
traitConnectionRepository {
@@ -312,7 +312,7 @@ trait ConnectionRepository {
312
312
The `create`, `update` or `delete` repository methods should not return an `Int` indicating the number of rows affected
313
313
by the operation but either return `Unit` when successful or throw an exception/defect when the row count is not what is
314
314
expected, like i.e. an update operation resulting in a `0` affected row
@@ -358,7 +358,7 @@ caught at the upper level and returns a generic `500 Internal Server Error` to t
358
358
359
359
For those cases where a specific error like `404` should be returned, it is up to the service to first call `find()`
360
360
before `update()` and construct a `NotFound` failure, propagated through the error channel, if it gives
361
-
a `None` ([example](https://github.com/hyperledger/identus-cloud-agent/blob/eb898e068f768507d6979a5d9bab35ef7ad4a045/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/service/ConnectionServiceImpl.scala#L149)).
361
+
a `None` ([example](https://github.com/hyperledger-identus/cloud-agent/blob/eb898e068f768507d6979a5d9bab35ef7ad4a045/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/service/ConnectionServiceImpl.scala#L149)).
362
362
363
363
Relying on the service layer to implement it will guarantee consistent behavior regardless of the underlying database
364
364
type (could be different RDMS flavor, No-SQL, etc.).
@@ -382,22 +382,22 @@ class ConnectionServiceImpl() extends ConnectionService {
382
382
#### Do not type unexpected errors
383
383
384
384
Do not wrap defects from lower layers (typically repository) in a failure and error case class declarations
385
-
like [this](https://github.com/hyperledger/identus-cloud-agent/blob/b579fd86ab96db711425f511154e74be75583896/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/model/error/ConnectionServiceError.scala#L8)
385
+
like [this](https://github.com/hyperledger-identus/cloud-agent/blob/b579fd86ab96db711425f511154e74be75583896/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/model/error/ConnectionServiceError.scala#L8)
386
386
should be prohibited.
387
387
388
388
Considering that failures are viewed as **expected errors** from which users can potentially recover, error case classes
This allows handling "at the end of the world“ to be done in a consistent and in generic way.
397
397
398
398
Create an exhaustive and meaningful list of service errors and make sure the value of the `userFacingMessage` attribute
399
399
is chosen wisely! It will present "as is" to the user and should not contain any sensitive
400
-
data ([example](https://github.com/hyperledger/identus-cloud-agent/blob/eb898e068f768507d6979a5d9bab35ef7ad4a045/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/model/error/ConnectionServiceError.scala#L14)).
400
+
data ([example](https://github.com/hyperledger-identus/cloud-agent/blob/eb898e068f768507d6979a5d9bab35ef7ad4a045/connect/lib/core/src/main/scala/io/iohk/atala/connect/core/model/error/ConnectionServiceError.scala#L14)).
@@ -490,9 +490,9 @@ The upper layer will automatically do so appropriately and consistently using Ta
490
490
#### Reporting RFC-9457 Error Response
491
491
492
492
All declared Tapir endpoints must
493
-
use [`org.hyperledger.identus.api.http.ErrorResponse`](https://github.com/hyperledger/identus-cloud-agent/blob/main/cloud-agent/service/server/src/main/scala/io/iohk/atala/api/http/ErrorResponse.scala)
493
+
use [`org.hyperledger.identus.api.http.ErrorResponse`](https://github.com/hyperledger-identus/cloud-agent/blob/main/cloud-agent/service/server/src/main/scala/io/iohk/atala/api/http/ErrorResponse.scala)
494
494
as their output error
495
-
type ([example](https://github.com/hyperledger/identus-cloud-agent/blob/eb898e068f768507d6979a5d9bab35ef7ad4a045/cloud-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/ConnectionEndpoints.scala#L45))
495
+
type ([example](https://github.com/hyperledger-identus/cloud-agent/blob/eb898e068f768507d6979a5d9bab35ef7ad4a045/cloud-agent/service/server/src/main/scala/io/iohk/atala/connect/controller/ConnectionEndpoints.scala#L45))
496
496
This type ensures that the response returned to the user complies with
497
497
the [RFC-9457 Problem Details for HTTP APIs](https://www.rfc-editor.org/rfc/rfc9457.html).
via [Scala implicit conversion](https://github.com/hyperledger/identus-cloud-agent/blob/eb898e068f768507d6979a5d9bab35ef7ad4a045/cloud-agent/service/server/src/main/scala/io/iohk/atala/api/http/ErrorResponse.scala#L44).
520
+
via [Scala implicit conversion](https://github.com/hyperledger-identus/cloud-agent/blob/eb898e068f768507d6979a5d9bab35ef7ad4a045/cloud-agent/service/server/src/main/scala/io/iohk/atala/api/http/ErrorResponse.scala#L44).
Copy file name to clipboardExpand all lines: documentation/docs/identus/overview.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,4 +8,4 @@ Identus is a toolset designed for Decentralized Identity enablement. These tools
8
8
9
9
*[Mediator](mediator): The Mediator acts as a bridge between the [holder's](/docs/concepts/glossary#holder) device and other actors, such as [issuers](/docs/concepts/glossary#issuer) and [verifiers](/docs/concepts/glossary#verifier), ensuring secure and reliable communication without centralized management.
10
10
11
-
* Edge Agent SDKs: allow the development of edge agents - Decentralized Identity mobile apps and browser extensions. The SDKs are available in [Swift](https://hyperledger.github.io/identus-edge-agent-sdk-swift/documentation/edgeagentsdk/) (iOS and other Apple OS), [TS](https://hyperledger.github.io/identus-docs/identus-edge-agent-sdk-ts/sdk) (Browser and Node.js), and [Kotlin Multiplatform](https://hyperledger.github.io/identus-edge-agent-sdk-kmp/) (JVM and Android)
11
+
* Edge Agent SDKs: allow the development of edge agents - Decentralized Identity mobile apps and browser extensions. The SDKs are available in [Swift](https://hyperledger-identus.github.io/edge-agent-sdk-swift/documentation/edgeagentsdk/) (iOS and other Apple OS), [TS](https://hyperledger-identus.github.io/docs/edge-agent-sdk-ts/sdk) (Browser and Node.js), and [Kotlin Multiplatform](https://hyperledger-identus.github.io/edge-agent-sdk-kmp/) (JVM and Android)
0 commit comments