Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ test/bdd/vdr/orb/fixtures/orb/export
*.log

.build
**/vendor
25 changes: 20 additions & 5 deletions component/storage/mysql/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,37 @@ module github.com/hyperledger/aries-framework-go-ext/component/storage/mysql
go 1.17

require (
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 // indirect
github.com/cenkalti/backoff/v4 v4.1.0
github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe // indirect
github.com/go-sql-driver/mysql v1.5.0
github.com/google/go-cmp v0.5.4 // indirect
github.com/google/uuid v1.2.0
github.com/hyperledger/aries-framework-go/spi v0.0.0-20220330140627-07042d78580c
github.com/hyperledger/aries-framework-go/test/component v0.0.0-20220330140627-07042d78580c
github.com/ory/dockertest/v3 v3.6.3
github.com/stretchr/testify v1.7.0
)

require (
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/cenkalti/backoff/v3 v3.0.0 // indirect
github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/google/go-cmp v0.5.4 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.9.0 // indirect
github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/ory/dockertest/v3 v3.6.3
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/opencontainers/runc v1.0.0-rc9 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sirupsen/logrus v1.7.0 // indirect
github.com/stretchr/testify v1.7.0
golang.org/x/net v0.0.0-20210421230115-4e50805a0758 // indirect
golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
29 changes: 29 additions & 0 deletions component/storage/sqlite/errors.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/

package sqlite

import (
"errors"
)

const (
// Error messages we return.
failureWhileOpeningSQLiteConnectionErrMsg = "failure while opening SQLite connection using path %s: %w"
failureWhileClosingSQLiteConnection = "failure while closing SQLite DB connection: %w"
failureWhilePingingSQLiteErrMsg = "failure while pinging SQLite at path %s : %w"
failureWhileCreatingTableErrMsg = "failure while creating table %s: %w"
failureWhileExecutingInsertStatementErrMsg = "failure while executing insert statement on table %s: %w"
failureWhileQueryingRowErrMsg = "failure while querying row: %w"
failureWhileExecutingBatchStatementErrMsg = "failure while executing batch upsert on table %s: %w"
// Error messages returned from MySQL that we directly check for.
valueNotFoundErrMsgFromSQlite = "no rows"
)

var (
errBlankDBPath = errors.New("DB Path for new SQLite DB provider can't be blank")
errBlankStoreName = errors.New("store name is required")
)
24 changes: 24 additions & 0 deletions component/storage/sqlite/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright SecureKey Technologies Inc. All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
module github.com/hyperledger/aries-framework-go-ext/component/storage/sqlite

go 1.17

require (
github.com/google/uuid v1.3.0
github.com/hyperledger/aries-framework-go/cmd/aries-agent-mobile v0.0.0-20220811152045-03f747c09617
github.com/hyperledger/aries-framework-go/spi v0.0.0-20220606124520-53422361c38c
github.com/hyperledger/aries-framework-go/test/component v0.0.0-20220428211718-66cc046674a1
github.com/mattn/go-sqlite3 v1.14.14
github.com/stretchr/testify v1.7.2
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
32 changes: 32 additions & 0 deletions component/storage/sqlite/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hyperledger/aries-framework-go v0.1.8-0.20220322085443-50e8f9bd208b h1:q+Plvnq7/n3IwTO6IOhBXn//txifpeo/OErvM1ivh8s=
github.com/hyperledger/aries-framework-go/cmd/aries-agent-mobile v0.0.0-20220811152045-03f747c09617 h1:3QNyjpHGcKgdWF7WX6AFqfPeUSr14leIbqzq6qI9wWA=
github.com/hyperledger/aries-framework-go/cmd/aries-agent-mobile v0.0.0-20220811152045-03f747c09617/go.mod h1:NE+udomUMekXew+ytQa3G163zLaRJKWjXloSpG+/lV0=
github.com/hyperledger/aries-framework-go/component/storageutil v0.0.0-20220322085443-50e8f9bd208b h1:IoD7+sHQRLMouwHjhrOj5vhg+rPt/aKl4P+WiBZVHVk=
github.com/hyperledger/aries-framework-go/spi v0.0.0-20220606124520-53422361c38c h1:4JSde5+80U+W8IxwNt/Dd/3PPEIGYTI3RbjFXOi4o1g=
github.com/hyperledger/aries-framework-go/spi v0.0.0-20220606124520-53422361c38c/go.mod h1:4bD5c5fj5K7rkQurVa/8I8+TfNcI4bxIBzaUNcxTOTg=
github.com/hyperledger/aries-framework-go/test/component v0.0.0-20220428211718-66cc046674a1 h1:vxZ0DlFNLjgxMdBESLZu895AsI1JWL2SJerphwIn8Po=
github.com/hyperledger/aries-framework-go/test/component v0.0.0-20220428211718-66cc046674a1/go.mod h1:lykx3N+GX+sAWSxO2Ycc4Dz+ynV9b0Fv4NdP+ms4Alc=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mattn/go-sqlite3 v1.14.14 h1:qZgc/Rwetq+MtyE18WhzjokPD93dNqLGNT3QJuLvBGw=
github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s=
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Loading