refact: to use go-dbw CreateItems, DeleteItems (#4974)

* refact: to use go-dbw CreateItems, DeleteItems

Latest version of go-dbw updated the signature of
CreateItems(...) and DeleteItems(...) on a happy
note this latest version of go-dbw actually does
batch inserts and updates for this functions.

* all: regenerate protos with new protoc-gen-go version
This commit is contained in:
Jim authored and GitHub committed 2024-08-01 11:18:53 -04:00
1 parent b24f6dcee8
commit 28b465e4b8
167 files changed
+2254 -2248

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@ func (r *Repository) AddSessionCredentials(ctx context.Context, sessProjectId, s
return errors.Wrap(ctx, err, op, errors.WithMsg("unable to get database wrapper"))
}
addCreds := make([]any, 0, len(credData))
addCreds := make([]credential, 0, len(credData))
for _, cred := range credData {
if len(cred) == 0 {
return errors.New(ctx, errors.InvalidParameter, op, "missing credential")
+1 -1
View File
@@ -127,7 +127,7 @@ func (r *Repository) CreateSession(ctx context.Context, sessionWrapper wrapping.
cred.SessionId = newSession.PublicId
}
var staticCreds []any
var staticCreds []*StaticCredential
for _, cred := range newSession.StaticCredentials {
cred.SessionId = newSession.PublicId
staticCreds = append(staticCreds, cred)