-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'refs/remotes/origin/main' into beta
# Conflicts: # .github/workflows/release.yml # version.sbt
- Loading branch information
Showing
30 changed files
with
275 additions
and
243 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
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
44 changes: 14 additions & 30 deletions
44
...src/main/scala/org/hyperledger/identus/agent/walletapi/sql/JdbcGenericSecretStorage.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
30 changes: 30 additions & 0 deletions
30
...-api/src/main/scala/org/hyperledger/identus/agent/walletapi/sql/model/GenericSecret.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,30 @@ | ||
package org.hyperledger.identus.agent.walletapi.sql.model | ||
|
||
import io.getquill.{SnakeCase, *} | ||
import io.getquill.context.json.PostgresJsonExtensions | ||
import io.getquill.doobie.DoobieContext | ||
import org.hyperledger.identus.shared.models.WalletId | ||
import zio.json.ast.Json | ||
|
||
import java.time.Instant | ||
|
||
final case class GenericSecret( | ||
key: String, | ||
payload: JsonValue[Json], | ||
createdAt: Instant, | ||
walletId: WalletId | ||
) | ||
|
||
object GenericSecretSql extends DoobieContext.Postgres(SnakeCase), PostgresJsonExtensions { | ||
def insert(secret: GenericSecret) = run { | ||
quote( | ||
query[GenericSecret].insertValue(lift(secret)) | ||
) | ||
} | ||
|
||
def findByKey(key: String) = run { | ||
quote( | ||
query[GenericSecret].filter(_.key == lift(key)).take(1) | ||
) | ||
} | ||
} |
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
Oops, something went wrong.