• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hyperledger / identus-cloud-agent / 8998019047

08 May 2024 07:31AM UTC coverage: 47.171% (-0.7%) from 47.829%
8998019047

Pull #1021

patlo-iog
chore: pr cleanup
Pull Request #1021: feat: oidc4vc credential configuration and metadata endpoints [WIP]

2 of 253 new or added lines in 12 files covered. (0.79%)

186 existing lines in 51 files now uncovered.

7388 of 15662 relevant lines covered (47.17%)

0.47 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

23.53
/pollux/sql-doobie/src/main/scala/org/hyperledger/identus/pollux/sql/repository/Implicits.scala
1
package org.hyperledger.identus.pollux.sql.repository
2

3
import doobie.util.{Get, Put}
4
import org.hyperledger.identus.castor.core.model.did.{CanonicalPrismDID, PrismDID}
5
import org.hyperledger.identus.pollux.core.model.*
6
import org.hyperledger.identus.pollux.vc.jwt.StatusPurpose
7

8
import java.net.URI
9
import java.net.URL
10

11
given didCommIDGet: Get[DidCommID] = Get[String].map(DidCommID(_))
1✔
12
given didCommIDPut: Put[DidCommID] = Put[String].contramap(_.value)
1✔
13

14
given prismDIDGet: Get[CanonicalPrismDID] =
15
  Get[String].map(s => PrismDID.fromString(s).fold(e => throw RuntimeException(e), _.asCanonical))
1✔
16
given prismDIDPut: Put[CanonicalPrismDID] = Put[String].contramap(_.toString)
1✔
17

18
given statusPurposeGet: Get[StatusPurpose] = Get[String].map {
×
19
  case "Revocation" => StatusPurpose.Revocation
×
20
  case "Suspension" => StatusPurpose.Suspension
×
21
  case purpose      => throw RuntimeException(s"Invalid status purpose - $purpose")
×
22
}
23

24
given statusPurposePut: Put[StatusPurpose] = Put[String].contramap {
×
25
  case StatusPurpose.Revocation => StatusPurpose.Revocation.str
×
26
  case StatusPurpose.Suspension => StatusPurpose.Suspension.str
×
27
}
28

NEW
29
given urlGet: Get[URL] = Get[String].map(s => URI.create(s).toURL())
×
NEW
30
given urlPut: Put[URL] = Put[String].contramap(_.toString())
×
31

NEW
32
given uriGet: Get[URI] = Get[String].map(s => URI.create(s))
×
NEW
33
given uriPut: Put[URI] = Put[String].contramap(_.toString())
×
34

NEW
35
given credFormatGet: Get[CredentialFormat] = Get[String].map(CredentialFormat.valueOf)
×
NEW
36
given credFormatPut: Put[CredentialFormat] = Put[String].contramap(_.toString())
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc