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
@@ -68,7 +68,7 @@ func TestAuthMethod(
|
||||
require.NoError(err)
|
||||
|
||||
if len(opts.withAudClaims) > 0 {
|
||||
newAudClaims := make([]any, 0, len(opts.withAudClaims))
|
||||
newAudClaims := make([]*AudClaim, 0, len(opts.withAudClaims))
|
||||
for _, a := range opts.withAudClaims {
|
||||
aud, err := NewAudClaim(ctx, authMethod.PublicId, a)
|
||||
require.NoError(err)
|
||||
@@ -79,7 +79,7 @@ func TestAuthMethod(
|
||||
require.Equal(len(opts.withAudClaims), len(authMethod.AudClaims))
|
||||
}
|
||||
if len(opts.withCertificates) > 0 {
|
||||
newCerts := make([]any, 0, len(opts.withCertificates))
|
||||
newCerts := make([]*Certificate, 0, len(opts.withCertificates))
|
||||
for _, c := range opts.withCertificates {
|
||||
pem, err := EncodeCertificates(ctx, c)
|
||||
require.NoError(err)
|
||||
@@ -92,7 +92,7 @@ func TestAuthMethod(
|
||||
require.Equal(len(opts.withCertificates), len(authMethod.Certificates))
|
||||
}
|
||||
if len(opts.withSigningAlgs) > 0 {
|
||||
newAlgs := make([]any, 0, len(opts.withSigningAlgs))
|
||||
newAlgs := make([]*SigningAlg, 0, len(opts.withSigningAlgs))
|
||||
for _, a := range opts.withSigningAlgs {
|
||||
alg, err := NewSigningAlg(ctx, authMethod.PublicId, a)
|
||||
require.NoError(err)
|
||||
@@ -103,7 +103,7 @@ func TestAuthMethod(
|
||||
require.Equal(len(opts.withSigningAlgs), len(authMethod.SigningAlgs))
|
||||
}
|
||||
if len(opts.withClaimsScopes) > 0 {
|
||||
newClaimsScopes := make([]any, 0, len(opts.withClaimsScopes))
|
||||
newClaimsScopes := make([]*ClaimsScope, 0, len(opts.withClaimsScopes))
|
||||
for _, cs := range opts.withClaimsScopes {
|
||||
s, err := NewClaimsScope(ctx, authMethod.PublicId, cs)
|
||||
require.NoError(err)
|
||||
@@ -114,7 +114,7 @@ func TestAuthMethod(
|
||||
require.Equal(len(opts.withClaimsScopes), len(authMethod.ClaimsScopes))
|
||||
}
|
||||
if len(opts.withAccountClaimMap) > 0 {
|
||||
newAccountClaimMaps := make([]any, 0, len(opts.withAccountClaimMap))
|
||||
newAccountClaimMaps := make([]*AccountClaimMap, 0, len(opts.withAccountClaimMap))
|
||||
for k, v := range opts.withAccountClaimMap {
|
||||
acm, err := NewAccountClaimMap(ctx, authMethod.PublicId, k, v)
|
||||
require.NoError(err)
|
||||
@@ -124,7 +124,7 @@ func TestAuthMethod(
|
||||
require.Equal(len(opts.withAccountClaimMap), len(authMethod.AccountClaimMaps))
|
||||
}
|
||||
if len(opts.withPrompts) > 0 {
|
||||
newPrompts := make([]any, 0, len(opts.withPrompts))
|
||||
newPrompts := make([]*Prompt, 0, len(opts.withPrompts))
|
||||
for _, p := range opts.withPrompts {
|
||||
prompt, err := NewPrompt(ctx, authMethod.PublicId, p)
|
||||
require.NoError(err)
|
||||
|
||||
Reference in new issue
Block a user