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:
167 files changed
+2254
-2248
No files matched your search
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user