From fe0bf11495381f634e389ffa772de4953574c114 Mon Sep 17 00:00:00 2001 From: Rein Krul Date: Tue, 26 Sep 2023 11:03:38 +0200 Subject: [PATCH] fix --- api/ssi_types_test.go | 6 +- auth/api/iam/api.go | 6 +- auth/api/iam/api_test.go | 6 +- auth/contract/signer_mock.go | 14 +- auth/mock.go | 6 +- auth/services/mock.go | 20 +- auth/services/oauth/mock.go | 16 +- auth/services/selfsigned/types/mock.go | 16 +- core/echo_mock.go | 70 +++--- core/engine_mock.go | 14 +- crypto/mock.go | 62 +++-- crypto/storage/spi/mock.go | 14 +- didman/didman.go | 6 +- didman/mock.go | 32 ++- events/events_mock.go | 8 +- events/mock.go | 216 +++++++++--------- golden_hammer/module_test.go | 14 +- http/echo_mock.go | 74 +++--- network/dag/keys.go | 18 +- network/dag/mock.go | 40 ++-- network/dag/notifier_mock.go | 12 +- network/mock.go | 26 +-- network/transport/connection_manager_mock.go | 10 +- network/transport/grpc/authenticator_mock.go | 8 +- .../transport/grpc/connection_list_mock.go | 14 +- network/transport/grpc/connection_mock.go | 16 +- network/transport/grpc/interface_mock.go | 54 ++--- network/transport/protocol_mock.go | 8 +- network/transport/v2/gossip/mock.go | 20 +- network/transport/v2/protocol.go | 6 +- network/transport/v2/senders_mock.go | 20 +- pki/mock.go | 28 +-- storage/mock.go | 14 +- vcr/holder/mock.go | 16 +- vcr/holder/openid_mock.go | 8 +- vcr/issuer/issuer.go | 18 +- vcr/issuer/issuer_test.go | 6 +- vcr/issuer/mock.go | 30 ++- vcr/issuer/openid_mock.go | 12 +- vcr/mock.go | 36 ++- vcr/openid4vci/identifiers_mock.go | 8 +- vcr/openid4vci/identifiers_test.go | 26 +-- vcr/openid4vci/issuer_client_mock.go | 12 +- vcr/openid4vci/wallet_client_mock.go | 8 +- vcr/signature/mock.go | 14 +- vcr/types/mock.go | 8 +- vcr/vcr.go | 6 +- vcr/verifier/mock.go | 22 +- vdr/api/v1/api_test.go | 6 +- vdr/didnuts/ambassador_mock.go | 6 +- vdr/didnuts/didstore/metadata.go | 6 +- vdr/didnuts/didstore/mock.go | 18 +- vdr/management/management.go | 8 - vdr/management/management_mock.go | 38 --- 54 files changed, 502 insertions(+), 704 deletions(-) diff --git a/api/ssi_types_test.go b/api/ssi_types_test.go index 34135b13e8..35f8fc22ce 100644 --- a/api/ssi_types_test.go +++ b/api/ssi_types_test.go @@ -20,7 +20,6 @@ package ssiTypes import ( "encoding/json" - vdrTypes "github.com/nuts-foundation/nuts-node/vdr/resolver" "github.com/stretchr/testify/require" "testing" "time" @@ -32,6 +31,7 @@ import ( "github.com/nuts-foundation/go-did/vc" "github.com/nuts-foundation/nuts-node/crypto/hash" vcr "github.com/nuts-foundation/nuts-node/vcr/api/vcr/v2" + "github.com/nuts-foundation/nuts-node/vdr/resolver" ) const ( @@ -183,8 +183,8 @@ func createDidDocument() did.Document { } } -func createDidDocumentMetadata() vdrTypes.DocumentMetadata { - return vdrTypes.DocumentMetadata{ +func createDidDocumentMetadata() resolver.DocumentMetadata { + return resolver.DocumentMetadata{ Created: time.Now(), Hash: hash.RandomHash(), Deactivated: true, diff --git a/auth/api/iam/api.go b/auth/api/iam/api.go index 438605db1b..109a21089c 100644 --- a/auth/api/iam/api.go +++ b/auth/api/iam/api.go @@ -30,7 +30,7 @@ import ( "github.com/nuts-foundation/nuts-node/core" "github.com/nuts-foundation/nuts-node/vcr" "github.com/nuts-foundation/nuts-node/vcr/openid4vci" - vdr2 "github.com/nuts-foundation/nuts-node/vdr" + "github.com/nuts-foundation/nuts-node/vdr" "github.com/nuts-foundation/nuts-node/vdr/resolver" "html/template" "net/http" @@ -49,13 +49,13 @@ var assets embed.FS // Wrapper handles OAuth2 flows. type Wrapper struct { vcr vcr.VCR - vdr vdr2.VDR + vdr vdr.VDR auth auth.AuthenticationServices sessions *SessionManager templates *template.Template } -func New(authInstance auth.AuthenticationServices, vcrInstance vcr.VCR, vdrInstance vdr2.VDR) *Wrapper { +func New(authInstance auth.AuthenticationServices, vcrInstance vcr.VCR, vdrInstance vdr.VDR) *Wrapper { templates := template.New("oauth2 templates") _, err := templates.ParseFS(assets, "assets/*.html") if err != nil { diff --git a/auth/api/iam/api_test.go b/auth/api/iam/api_test.go index 93fb4e895c..3b2d25b524 100644 --- a/auth/api/iam/api_test.go +++ b/auth/api/iam/api_test.go @@ -25,7 +25,7 @@ import ( "github.com/nuts-foundation/nuts-node/audit" "github.com/nuts-foundation/nuts-node/auth" "github.com/nuts-foundation/nuts-node/core" - vdr2 "github.com/nuts-foundation/nuts-node/vdr" + "github.com/nuts-foundation/nuts-node/vdr" "github.com/nuts-foundation/nuts-node/vdr/resolver" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -168,7 +168,7 @@ func statusCodeFrom(err error) int { type testCtx struct { client *Wrapper authnServices *auth.MockAuthenticationServices - vdr *vdr2.MockVDR + vdr *vdr.MockVDR resolver *resolver.MockDIDResolver } @@ -179,7 +179,7 @@ func newTestClient(t testing.TB) *testCtx { authnServices := auth.NewMockAuthenticationServices(ctrl) authnServices.EXPECT().PublicURL().Return(publicURL).AnyTimes() resolver := resolver.NewMockDIDResolver(ctrl) - vdr := vdr2.NewMockVDR(ctrl) + vdr := vdr.NewMockVDR(ctrl) vdr.EXPECT().Resolver().Return(resolver).AnyTimes() return &testCtx{ authnServices: authnServices, diff --git a/auth/contract/signer_mock.go b/auth/contract/signer_mock.go index 90c19b6ec1..2a25b7987e 100644 --- a/auth/contract/signer_mock.go +++ b/auth/contract/signer_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: auth/contract/signer.go -// -// Generated by this command: -// -// mockgen -destination=auth/contract/signer_mock.go -package=contract -source=auth/contract/signer.go -// + // Package contract is a generated GoMock package. package contract @@ -49,7 +45,7 @@ func (m *MockSigner) SigningSessionStatus(ctx context.Context, sessionID string) } // SigningSessionStatus indicates an expected call of SigningSessionStatus. -func (mr *MockSignerMockRecorder) SigningSessionStatus(ctx, sessionID any) *gomock.Call { +func (mr *MockSignerMockRecorder) SigningSessionStatus(ctx, sessionID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SigningSessionStatus", reflect.TypeOf((*MockSigner)(nil).SigningSessionStatus), ctx, sessionID) } @@ -61,13 +57,13 @@ func (m *MockSigner) Start(ctx context.Context) { } // Start indicates an expected call of Start. -func (mr *MockSignerMockRecorder) Start(ctx any) *gomock.Call { +func (mr *MockSignerMockRecorder) Start(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockSigner)(nil).Start), ctx) } // StartSigningSession mocks base method. -func (m *MockSigner) StartSigningSession(contract Contract, params map[string]any) (SessionPointer, error) { +func (m *MockSigner) StartSigningSession(contract Contract, params map[string]interface{}) (SessionPointer, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StartSigningSession", contract, params) ret0, _ := ret[0].(SessionPointer) @@ -76,7 +72,7 @@ func (m *MockSigner) StartSigningSession(contract Contract, params map[string]an } // StartSigningSession indicates an expected call of StartSigningSession. -func (mr *MockSignerMockRecorder) StartSigningSession(contract, params any) *gomock.Call { +func (mr *MockSignerMockRecorder) StartSigningSession(contract, params interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartSigningSession", reflect.TypeOf((*MockSigner)(nil).StartSigningSession), contract, params) } diff --git a/auth/mock.go b/auth/mock.go index 36835e7e1d..a9092dc6cf 100644 --- a/auth/mock.go +++ b/auth/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: auth/interface.go -// -// Generated by this command: -// -// mockgen -destination=auth/mock.go -package=auth -source=auth/interface.go -// + // Package auth is a generated GoMock package. package auth diff --git a/auth/services/mock.go b/auth/services/mock.go index 7ac3cd3ae8..768eba9d08 100644 --- a/auth/services/mock.go +++ b/auth/services/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: auth/services/services.go -// -// Generated by this command: -// -// mockgen -destination=auth/services/mock.go -package=services -source=auth/services/services.go -// + // Package services is a generated GoMock package. package services @@ -105,7 +101,7 @@ func (m *MockVPProofValueParser) Parse(rawAuthToken string) (SignedToken, error) } // Parse indicates an expected call of Parse. -func (mr *MockVPProofValueParserMockRecorder) Parse(rawAuthToken any) *gomock.Call { +func (mr *MockVPProofValueParserMockRecorder) Parse(rawAuthToken interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Parse", reflect.TypeOf((*MockVPProofValueParser)(nil).Parse), rawAuthToken) } @@ -119,7 +115,7 @@ func (m *MockVPProofValueParser) Verify(token SignedToken) error { } // Verify indicates an expected call of Verify. -func (mr *MockVPProofValueParserMockRecorder) Verify(token any) *gomock.Call { +func (mr *MockVPProofValueParserMockRecorder) Verify(token interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockVPProofValueParser)(nil).Verify), token) } @@ -171,7 +167,7 @@ func (m *MockContractNotary) CreateSigningSession(sessionRequest CreateSessionRe } // CreateSigningSession indicates an expected call of CreateSigningSession. -func (mr *MockContractNotaryMockRecorder) CreateSigningSession(sessionRequest any) *gomock.Call { +func (mr *MockContractNotaryMockRecorder) CreateSigningSession(sessionRequest interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSigningSession", reflect.TypeOf((*MockContractNotary)(nil).CreateSigningSession), sessionRequest) } @@ -186,7 +182,7 @@ func (m *MockContractNotary) DrawUpContract(ctx context.Context, template contra } // DrawUpContract indicates an expected call of DrawUpContract. -func (mr *MockContractNotaryMockRecorder) DrawUpContract(ctx, template, orgID, validFrom, validDuration, organizationCredential any) *gomock.Call { +func (mr *MockContractNotaryMockRecorder) DrawUpContract(ctx, template, orgID, validFrom, validDuration, organizationCredential interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DrawUpContract", reflect.TypeOf((*MockContractNotary)(nil).DrawUpContract), ctx, template, orgID, validFrom, validDuration, organizationCredential) } @@ -198,7 +194,7 @@ func (m *MockContractNotary) Routes(router core.EchoRouter) { } // Routes indicates an expected call of Routes. -func (mr *MockContractNotaryMockRecorder) Routes(router any) *gomock.Call { +func (mr *MockContractNotaryMockRecorder) Routes(router interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Routes", reflect.TypeOf((*MockContractNotary)(nil).Routes), router) } @@ -213,7 +209,7 @@ func (m *MockContractNotary) SigningSessionStatus(ctx context.Context, sessionID } // SigningSessionStatus indicates an expected call of SigningSessionStatus. -func (mr *MockContractNotaryMockRecorder) SigningSessionStatus(ctx, sessionID any) *gomock.Call { +func (mr *MockContractNotaryMockRecorder) SigningSessionStatus(ctx, sessionID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SigningSessionStatus", reflect.TypeOf((*MockContractNotary)(nil).SigningSessionStatus), ctx, sessionID) } @@ -228,7 +224,7 @@ func (m *MockContractNotary) VerifyVP(vp vc.VerifiablePresentation, checkTime *t } // VerifyVP indicates an expected call of VerifyVP. -func (mr *MockContractNotaryMockRecorder) VerifyVP(vp, checkTime any) *gomock.Call { +func (mr *MockContractNotaryMockRecorder) VerifyVP(vp, checkTime interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyVP", reflect.TypeOf((*MockContractNotary)(nil).VerifyVP), vp, checkTime) } diff --git a/auth/services/oauth/mock.go b/auth/services/oauth/mock.go index f65f49dc9c..f09ac067f6 100644 --- a/auth/services/oauth/mock.go +++ b/auth/services/oauth/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: auth/services/oauth/interface.go -// -// Generated by this command: -// -// mockgen -destination=auth/services/oauth/mock.go -package=oauth -source=auth/services/oauth/interface.go -// + // Package oauth is a generated GoMock package. package oauth @@ -50,7 +46,7 @@ func (m *MockRelyingParty) CreateJwtGrant(ctx context.Context, request services. } // CreateJwtGrant indicates an expected call of CreateJwtGrant. -func (mr *MockRelyingPartyMockRecorder) CreateJwtGrant(ctx, request any) *gomock.Call { +func (mr *MockRelyingPartyMockRecorder) CreateJwtGrant(ctx, request interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateJwtGrant", reflect.TypeOf((*MockRelyingParty)(nil).CreateJwtGrant), ctx, request) } @@ -65,7 +61,7 @@ func (m *MockRelyingParty) RequestAccessToken(ctx context.Context, jwtGrantToken } // RequestAccessToken indicates an expected call of RequestAccessToken. -func (mr *MockRelyingPartyMockRecorder) RequestAccessToken(ctx, jwtGrantToken, authServerEndpoint any) *gomock.Call { +func (mr *MockRelyingPartyMockRecorder) RequestAccessToken(ctx, jwtGrantToken, authServerEndpoint interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestAccessToken", reflect.TypeOf((*MockRelyingParty)(nil).RequestAccessToken), ctx, jwtGrantToken, authServerEndpoint) } @@ -102,7 +98,7 @@ func (m *MockAuthorizationServer) Configure(clockSkewInMilliseconds int, secureM } // Configure indicates an expected call of Configure. -func (mr *MockAuthorizationServerMockRecorder) Configure(clockSkewInMilliseconds, secureMode any) *gomock.Call { +func (mr *MockAuthorizationServerMockRecorder) Configure(clockSkewInMilliseconds, secureMode interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Configure", reflect.TypeOf((*MockAuthorizationServer)(nil).Configure), clockSkewInMilliseconds, secureMode) } @@ -117,7 +113,7 @@ func (m *MockAuthorizationServer) CreateAccessToken(ctx context.Context, request } // CreateAccessToken indicates an expected call of CreateAccessToken. -func (mr *MockAuthorizationServerMockRecorder) CreateAccessToken(ctx, request any) *gomock.Call { +func (mr *MockAuthorizationServerMockRecorder) CreateAccessToken(ctx, request interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateAccessToken", reflect.TypeOf((*MockAuthorizationServer)(nil).CreateAccessToken), ctx, request) } @@ -132,7 +128,7 @@ func (m *MockAuthorizationServer) IntrospectAccessToken(ctx context.Context, tok } // IntrospectAccessToken indicates an expected call of IntrospectAccessToken. -func (mr *MockAuthorizationServerMockRecorder) IntrospectAccessToken(ctx, token any) *gomock.Call { +func (mr *MockAuthorizationServerMockRecorder) IntrospectAccessToken(ctx, token interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IntrospectAccessToken", reflect.TypeOf((*MockAuthorizationServer)(nil).IntrospectAccessToken), ctx, token) } diff --git a/auth/services/selfsigned/types/mock.go b/auth/services/selfsigned/types/mock.go index 9495b65078..67eb86824a 100644 --- a/auth/services/selfsigned/types/mock.go +++ b/auth/services/selfsigned/types/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: auth/services/selfsigned/types/types.go -// -// Generated by this command: -// -// mockgen -destination=auth/services/selfsigned/types/mock.go -package=types -source=auth/services/selfsigned/types/types.go -// + // Package types is a generated GoMock package. package types @@ -47,7 +43,7 @@ func (m *MockSessionStore) CheckAndSetStatus(sessionID, expectedStatus, status s } // CheckAndSetStatus indicates an expected call of CheckAndSetStatus. -func (mr *MockSessionStoreMockRecorder) CheckAndSetStatus(sessionID, expectedStatus, status any) *gomock.Call { +func (mr *MockSessionStoreMockRecorder) CheckAndSetStatus(sessionID, expectedStatus, status interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckAndSetStatus", reflect.TypeOf((*MockSessionStore)(nil).CheckAndSetStatus), sessionID, expectedStatus, status) } @@ -59,7 +55,7 @@ func (m *MockSessionStore) Delete(sessionID string) { } // Delete indicates an expected call of Delete. -func (mr *MockSessionStoreMockRecorder) Delete(sessionID any) *gomock.Call { +func (mr *MockSessionStoreMockRecorder) Delete(sessionID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockSessionStore)(nil).Delete), sessionID) } @@ -74,7 +70,7 @@ func (m *MockSessionStore) Load(sessionID string) (Session, bool) { } // Load indicates an expected call of Load. -func (mr *MockSessionStoreMockRecorder) Load(sessionID any) *gomock.Call { +func (mr *MockSessionStoreMockRecorder) Load(sessionID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Load", reflect.TypeOf((*MockSessionStore)(nil).Load), sessionID) } @@ -86,7 +82,7 @@ func (m *MockSessionStore) Start(ctx context.Context) { } // Start indicates an expected call of Start. -func (mr *MockSessionStoreMockRecorder) Start(ctx any) *gomock.Call { +func (mr *MockSessionStoreMockRecorder) Start(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockSessionStore)(nil).Start), ctx) } @@ -98,7 +94,7 @@ func (m *MockSessionStore) Store(sessionID string, session Session) { } // Store indicates an expected call of Store. -func (mr *MockSessionStoreMockRecorder) Store(sessionID, session any) *gomock.Call { +func (mr *MockSessionStoreMockRecorder) Store(sessionID, session interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Store", reflect.TypeOf((*MockSessionStore)(nil).Store), sessionID, session) } diff --git a/core/echo_mock.go b/core/echo_mock.go index 54f8a6e1ae..8c620d1be7 100644 --- a/core/echo_mock.go +++ b/core/echo_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: core/echo.go -// -// Generated by this command: -// -// mockgen -destination=core/echo_mock.go -package=core -source=core/echo.go -imports echo=github.com/labstack/echo/v4 -// + // Package core is a generated GoMock package. package core @@ -41,7 +37,7 @@ func (m *MockEchoRouter) EXPECT() *MockEchoRouterMockRecorder { // Add mocks base method. func (m *MockEchoRouter) Add(method, path string, handler echo.HandlerFunc, middleware ...echo.MiddlewareFunc) *echo.Route { m.ctrl.T.Helper() - varargs := []any{method, path, handler} + varargs := []interface{}{method, path, handler} for _, a := range middleware { varargs = append(varargs, a) } @@ -51,16 +47,16 @@ func (m *MockEchoRouter) Add(method, path string, handler echo.HandlerFunc, midd } // Add indicates an expected call of Add. -func (mr *MockEchoRouterMockRecorder) Add(method, path, handler any, middleware ...any) *gomock.Call { +func (mr *MockEchoRouterMockRecorder) Add(method, path, handler interface{}, middleware ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{method, path, handler}, middleware...) + varargs := append([]interface{}{method, path, handler}, middleware...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockEchoRouter)(nil).Add), varargs...) } // CONNECT mocks base method. func (m_2 *MockEchoRouter) CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -70,16 +66,16 @@ func (m_2 *MockEchoRouter) CONNECT(path string, h echo.HandlerFunc, m ...echo.Mi } // CONNECT indicates an expected call of CONNECT. -func (mr *MockEchoRouterMockRecorder) CONNECT(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoRouterMockRecorder) CONNECT(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CONNECT", reflect.TypeOf((*MockEchoRouter)(nil).CONNECT), varargs...) } // DELETE mocks base method. func (m_2 *MockEchoRouter) DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -89,16 +85,16 @@ func (m_2 *MockEchoRouter) DELETE(path string, h echo.HandlerFunc, m ...echo.Mid } // DELETE indicates an expected call of DELETE. -func (mr *MockEchoRouterMockRecorder) DELETE(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoRouterMockRecorder) DELETE(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DELETE", reflect.TypeOf((*MockEchoRouter)(nil).DELETE), varargs...) } // GET mocks base method. func (m_2 *MockEchoRouter) GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -108,16 +104,16 @@ func (m_2 *MockEchoRouter) GET(path string, h echo.HandlerFunc, m ...echo.Middle } // GET indicates an expected call of GET. -func (mr *MockEchoRouterMockRecorder) GET(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoRouterMockRecorder) GET(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GET", reflect.TypeOf((*MockEchoRouter)(nil).GET), varargs...) } // HEAD mocks base method. func (m_2 *MockEchoRouter) HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -127,16 +123,16 @@ func (m_2 *MockEchoRouter) HEAD(path string, h echo.HandlerFunc, m ...echo.Middl } // HEAD indicates an expected call of HEAD. -func (mr *MockEchoRouterMockRecorder) HEAD(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoRouterMockRecorder) HEAD(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HEAD", reflect.TypeOf((*MockEchoRouter)(nil).HEAD), varargs...) } // OPTIONS mocks base method. func (m_2 *MockEchoRouter) OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -146,16 +142,16 @@ func (m_2 *MockEchoRouter) OPTIONS(path string, h echo.HandlerFunc, m ...echo.Mi } // OPTIONS indicates an expected call of OPTIONS. -func (mr *MockEchoRouterMockRecorder) OPTIONS(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoRouterMockRecorder) OPTIONS(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OPTIONS", reflect.TypeOf((*MockEchoRouter)(nil).OPTIONS), varargs...) } // PATCH mocks base method. func (m_2 *MockEchoRouter) PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -165,16 +161,16 @@ func (m_2 *MockEchoRouter) PATCH(path string, h echo.HandlerFunc, m ...echo.Midd } // PATCH indicates an expected call of PATCH. -func (mr *MockEchoRouterMockRecorder) PATCH(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoRouterMockRecorder) PATCH(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PATCH", reflect.TypeOf((*MockEchoRouter)(nil).PATCH), varargs...) } // POST mocks base method. func (m_2 *MockEchoRouter) POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -184,16 +180,16 @@ func (m_2 *MockEchoRouter) POST(path string, h echo.HandlerFunc, m ...echo.Middl } // POST indicates an expected call of POST. -func (mr *MockEchoRouterMockRecorder) POST(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoRouterMockRecorder) POST(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "POST", reflect.TypeOf((*MockEchoRouter)(nil).POST), varargs...) } // PUT mocks base method. func (m_2 *MockEchoRouter) PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -203,16 +199,16 @@ func (m_2 *MockEchoRouter) PUT(path string, h echo.HandlerFunc, m ...echo.Middle } // PUT indicates an expected call of PUT. -func (mr *MockEchoRouterMockRecorder) PUT(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoRouterMockRecorder) PUT(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PUT", reflect.TypeOf((*MockEchoRouter)(nil).PUT), varargs...) } // TRACE mocks base method. func (m_2 *MockEchoRouter) TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -222,16 +218,16 @@ func (m_2 *MockEchoRouter) TRACE(path string, h echo.HandlerFunc, m ...echo.Midd } // TRACE indicates an expected call of TRACE. -func (mr *MockEchoRouterMockRecorder) TRACE(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoRouterMockRecorder) TRACE(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TRACE", reflect.TypeOf((*MockEchoRouter)(nil).TRACE), varargs...) } // Use mocks base method. func (m *MockEchoRouter) Use(middleware ...echo.MiddlewareFunc) { m.ctrl.T.Helper() - varargs := []any{} + varargs := []interface{}{} for _, a := range middleware { varargs = append(varargs, a) } @@ -239,7 +235,7 @@ func (m *MockEchoRouter) Use(middleware ...echo.MiddlewareFunc) { } // Use indicates an expected call of Use. -func (mr *MockEchoRouterMockRecorder) Use(middleware ...any) *gomock.Call { +func (mr *MockEchoRouterMockRecorder) Use(middleware ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Use", reflect.TypeOf((*MockEchoRouter)(nil).Use), middleware...) } diff --git a/core/engine_mock.go b/core/engine_mock.go index 4415ba0172..2cb0884c94 100644 --- a/core/engine_mock.go +++ b/core/engine_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: core/engine.go -// -// Generated by this command: -// -// mockgen -destination=core/engine_mock.go -package=core -source=core/engine.go -// + // Package core is a generated GoMock package. package core @@ -44,7 +40,7 @@ func (m *MockRoutable) Routes(router EchoRouter) { } // Routes indicates an expected call of Routes. -func (mr *MockRoutableMockRecorder) Routes(router any) *gomock.Call { +func (mr *MockRoutableMockRecorder) Routes(router interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Routes", reflect.TypeOf((*MockRoutable)(nil).Routes), router) } @@ -169,7 +165,7 @@ func (m *MockConfigurable) Configure(config ServerConfig) error { } // Configure indicates an expected call of Configure. -func (mr *MockConfigurableMockRecorder) Configure(config any) *gomock.Call { +func (mr *MockConfigurableMockRecorder) Configure(config interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Configure", reflect.TypeOf((*MockConfigurable)(nil).Configure), config) } @@ -346,10 +342,10 @@ func (m *MockInjectable) EXPECT() *MockInjectableMockRecorder { } // Config mocks base method. -func (m *MockInjectable) Config() any { +func (m *MockInjectable) Config() interface{} { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Config") - ret0, _ := ret[0].(any) + ret0, _ := ret[0].(interface{}) return ret0 } diff --git a/crypto/mock.go b/crypto/mock.go index a1bd24b75f..623701a94c 100644 --- a/crypto/mock.go +++ b/crypto/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: crypto/interface.go -// -// Generated by this command: -// -// mockgen -destination=crypto/mock.go -package=crypto -source=crypto/interface.go -// + // Package crypto is a generated GoMock package. package crypto @@ -49,7 +45,7 @@ func (m *MockKeyCreator) New(ctx context.Context, namingFunc KIDNamingFunc) (Key } // New indicates an expected call of New. -func (mr *MockKeyCreatorMockRecorder) New(ctx, namingFunc any) *gomock.Call { +func (mr *MockKeyCreatorMockRecorder) New(ctx, namingFunc interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "New", reflect.TypeOf((*MockKeyCreator)(nil).New), ctx, namingFunc) } @@ -86,7 +82,7 @@ func (m *MockKeyResolver) Exists(ctx context.Context, kid string) bool { } // Exists indicates an expected call of Exists. -func (mr *MockKeyResolverMockRecorder) Exists(ctx, kid any) *gomock.Call { +func (mr *MockKeyResolverMockRecorder) Exists(ctx, kid interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockKeyResolver)(nil).Exists), ctx, kid) } @@ -100,7 +96,7 @@ func (m *MockKeyResolver) List(ctx context.Context) []string { } // List indicates an expected call of List. -func (mr *MockKeyResolverMockRecorder) List(ctx any) *gomock.Call { +func (mr *MockKeyResolverMockRecorder) List(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockKeyResolver)(nil).List), ctx) } @@ -115,7 +111,7 @@ func (m *MockKeyResolver) Resolve(ctx context.Context, kid string) (Key, error) } // Resolve indicates an expected call of Resolve. -func (mr *MockKeyResolverMockRecorder) Resolve(ctx, kid any) *gomock.Call { +func (mr *MockKeyResolverMockRecorder) Resolve(ctx, kid interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resolve", reflect.TypeOf((*MockKeyResolver)(nil).Resolve), ctx, kid) } @@ -153,29 +149,29 @@ func (m *MockKeyStore) Decrypt(ctx context.Context, kid string, ciphertext []byt } // Decrypt indicates an expected call of Decrypt. -func (mr *MockKeyStoreMockRecorder) Decrypt(ctx, kid, ciphertext any) *gomock.Call { +func (mr *MockKeyStoreMockRecorder) Decrypt(ctx, kid, ciphertext interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Decrypt", reflect.TypeOf((*MockKeyStore)(nil).Decrypt), ctx, kid, ciphertext) } // DecryptJWE mocks base method. -func (m *MockKeyStore) DecryptJWE(ctx context.Context, message string) ([]byte, map[string]any, error) { +func (m *MockKeyStore) DecryptJWE(ctx context.Context, message string) ([]byte, map[string]interface{}, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DecryptJWE", ctx, message) ret0, _ := ret[0].([]byte) - ret1, _ := ret[1].(map[string]any) + ret1, _ := ret[1].(map[string]interface{}) ret2, _ := ret[2].(error) return ret0, ret1, ret2 } // DecryptJWE indicates an expected call of DecryptJWE. -func (mr *MockKeyStoreMockRecorder) DecryptJWE(ctx, message any) *gomock.Call { +func (mr *MockKeyStoreMockRecorder) DecryptJWE(ctx, message interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DecryptJWE", reflect.TypeOf((*MockKeyStore)(nil).DecryptJWE), ctx, message) } // EncryptJWE mocks base method. -func (m *MockKeyStore) EncryptJWE(ctx context.Context, payload []byte, headers map[string]any, publicKey any) (string, error) { +func (m *MockKeyStore) EncryptJWE(ctx context.Context, payload []byte, headers map[string]interface{}, publicKey interface{}) (string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "EncryptJWE", ctx, payload, headers, publicKey) ret0, _ := ret[0].(string) @@ -184,7 +180,7 @@ func (m *MockKeyStore) EncryptJWE(ctx context.Context, payload []byte, headers m } // EncryptJWE indicates an expected call of EncryptJWE. -func (mr *MockKeyStoreMockRecorder) EncryptJWE(ctx, payload, headers, publicKey any) *gomock.Call { +func (mr *MockKeyStoreMockRecorder) EncryptJWE(ctx, payload, headers, publicKey interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EncryptJWE", reflect.TypeOf((*MockKeyStore)(nil).EncryptJWE), ctx, payload, headers, publicKey) } @@ -198,7 +194,7 @@ func (m *MockKeyStore) Exists(ctx context.Context, kid string) bool { } // Exists indicates an expected call of Exists. -func (mr *MockKeyStoreMockRecorder) Exists(ctx, kid any) *gomock.Call { +func (mr *MockKeyStoreMockRecorder) Exists(ctx, kid interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockKeyStore)(nil).Exists), ctx, kid) } @@ -212,7 +208,7 @@ func (m *MockKeyStore) List(ctx context.Context) []string { } // List indicates an expected call of List. -func (mr *MockKeyStoreMockRecorder) List(ctx any) *gomock.Call { +func (mr *MockKeyStoreMockRecorder) List(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockKeyStore)(nil).List), ctx) } @@ -227,7 +223,7 @@ func (m *MockKeyStore) New(ctx context.Context, namingFunc KIDNamingFunc) (Key, } // New indicates an expected call of New. -func (mr *MockKeyStoreMockRecorder) New(ctx, namingFunc any) *gomock.Call { +func (mr *MockKeyStoreMockRecorder) New(ctx, namingFunc interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "New", reflect.TypeOf((*MockKeyStore)(nil).New), ctx, namingFunc) } @@ -242,13 +238,13 @@ func (m *MockKeyStore) Resolve(ctx context.Context, kid string) (Key, error) { } // Resolve indicates an expected call of Resolve. -func (mr *MockKeyStoreMockRecorder) Resolve(ctx, kid any) *gomock.Call { +func (mr *MockKeyStoreMockRecorder) Resolve(ctx, kid interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resolve", reflect.TypeOf((*MockKeyStore)(nil).Resolve), ctx, kid) } // SignJWS mocks base method. -func (m *MockKeyStore) SignJWS(ctx context.Context, payload []byte, headers map[string]any, key any, detached bool) (string, error) { +func (m *MockKeyStore) SignJWS(ctx context.Context, payload []byte, headers map[string]interface{}, key interface{}, detached bool) (string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SignJWS", ctx, payload, headers, key, detached) ret0, _ := ret[0].(string) @@ -257,13 +253,13 @@ func (m *MockKeyStore) SignJWS(ctx context.Context, payload []byte, headers map[ } // SignJWS indicates an expected call of SignJWS. -func (mr *MockKeyStoreMockRecorder) SignJWS(ctx, payload, headers, key, detached any) *gomock.Call { +func (mr *MockKeyStoreMockRecorder) SignJWS(ctx, payload, headers, key, detached interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SignJWS", reflect.TypeOf((*MockKeyStore)(nil).SignJWS), ctx, payload, headers, key, detached) } // SignJWT mocks base method. -func (m *MockKeyStore) SignJWT(ctx context.Context, claims, headers map[string]any, key any) (string, error) { +func (m *MockKeyStore) SignJWT(ctx context.Context, claims, headers map[string]interface{}, key interface{}) (string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SignJWT", ctx, claims, headers, key) ret0, _ := ret[0].(string) @@ -272,7 +268,7 @@ func (m *MockKeyStore) SignJWT(ctx context.Context, claims, headers map[string]a } // SignJWT indicates an expected call of SignJWT. -func (mr *MockKeyStoreMockRecorder) SignJWT(ctx, claims, headers, key any) *gomock.Call { +func (mr *MockKeyStoreMockRecorder) SignJWT(ctx, claims, headers, key interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SignJWT", reflect.TypeOf((*MockKeyStore)(nil).SignJWT), ctx, claims, headers, key) } @@ -310,7 +306,7 @@ func (m *MockDecrypter) Decrypt(ctx context.Context, kid string, ciphertext []by } // Decrypt indicates an expected call of Decrypt. -func (mr *MockDecrypterMockRecorder) Decrypt(ctx, kid, ciphertext any) *gomock.Call { +func (mr *MockDecrypterMockRecorder) Decrypt(ctx, kid, ciphertext interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Decrypt", reflect.TypeOf((*MockDecrypter)(nil).Decrypt), ctx, kid, ciphertext) } @@ -339,23 +335,23 @@ func (m *MockJWTSigner) EXPECT() *MockJWTSignerMockRecorder { } // DecryptJWE mocks base method. -func (m *MockJWTSigner) DecryptJWE(ctx context.Context, message string) ([]byte, map[string]any, error) { +func (m *MockJWTSigner) DecryptJWE(ctx context.Context, message string) ([]byte, map[string]interface{}, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DecryptJWE", ctx, message) ret0, _ := ret[0].([]byte) - ret1, _ := ret[1].(map[string]any) + ret1, _ := ret[1].(map[string]interface{}) ret2, _ := ret[2].(error) return ret0, ret1, ret2 } // DecryptJWE indicates an expected call of DecryptJWE. -func (mr *MockJWTSignerMockRecorder) DecryptJWE(ctx, message any) *gomock.Call { +func (mr *MockJWTSignerMockRecorder) DecryptJWE(ctx, message interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DecryptJWE", reflect.TypeOf((*MockJWTSigner)(nil).DecryptJWE), ctx, message) } // EncryptJWE mocks base method. -func (m *MockJWTSigner) EncryptJWE(ctx context.Context, payload []byte, headers map[string]any, publicKey any) (string, error) { +func (m *MockJWTSigner) EncryptJWE(ctx context.Context, payload []byte, headers map[string]interface{}, publicKey interface{}) (string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "EncryptJWE", ctx, payload, headers, publicKey) ret0, _ := ret[0].(string) @@ -364,13 +360,13 @@ func (m *MockJWTSigner) EncryptJWE(ctx context.Context, payload []byte, headers } // EncryptJWE indicates an expected call of EncryptJWE. -func (mr *MockJWTSignerMockRecorder) EncryptJWE(ctx, payload, headers, publicKey any) *gomock.Call { +func (mr *MockJWTSignerMockRecorder) EncryptJWE(ctx, payload, headers, publicKey interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EncryptJWE", reflect.TypeOf((*MockJWTSigner)(nil).EncryptJWE), ctx, payload, headers, publicKey) } // SignJWS mocks base method. -func (m *MockJWTSigner) SignJWS(ctx context.Context, payload []byte, headers map[string]any, key any, detached bool) (string, error) { +func (m *MockJWTSigner) SignJWS(ctx context.Context, payload []byte, headers map[string]interface{}, key interface{}, detached bool) (string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SignJWS", ctx, payload, headers, key, detached) ret0, _ := ret[0].(string) @@ -379,13 +375,13 @@ func (m *MockJWTSigner) SignJWS(ctx context.Context, payload []byte, headers map } // SignJWS indicates an expected call of SignJWS. -func (mr *MockJWTSignerMockRecorder) SignJWS(ctx, payload, headers, key, detached any) *gomock.Call { +func (mr *MockJWTSignerMockRecorder) SignJWS(ctx, payload, headers, key, detached interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SignJWS", reflect.TypeOf((*MockJWTSigner)(nil).SignJWS), ctx, payload, headers, key, detached) } // SignJWT mocks base method. -func (m *MockJWTSigner) SignJWT(ctx context.Context, claims, headers map[string]any, key any) (string, error) { +func (m *MockJWTSigner) SignJWT(ctx context.Context, claims, headers map[string]interface{}, key interface{}) (string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SignJWT", ctx, claims, headers, key) ret0, _ := ret[0].(string) @@ -394,7 +390,7 @@ func (m *MockJWTSigner) SignJWT(ctx context.Context, claims, headers map[string] } // SignJWT indicates an expected call of SignJWT. -func (mr *MockJWTSignerMockRecorder) SignJWT(ctx, claims, headers, key any) *gomock.Call { +func (mr *MockJWTSignerMockRecorder) SignJWT(ctx, claims, headers, key interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SignJWT", reflect.TypeOf((*MockJWTSigner)(nil).SignJWT), ctx, claims, headers, key) } diff --git a/crypto/storage/spi/mock.go b/crypto/storage/spi/mock.go index b9eec2e176..12f583abc5 100644 --- a/crypto/storage/spi/mock.go +++ b/crypto/storage/spi/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: crypto/storage/spi/interface.go -// -// Generated by this command: -// -// mockgen -destination=crypto/storage/spi/mock.go -package spi -source=crypto/storage/spi/interface.go -// + // Package spi is a generated GoMock package. package spi @@ -64,7 +60,7 @@ func (m *MockStorage) GetPrivateKey(ctx context.Context, kid string) (crypto.Sig } // GetPrivateKey indicates an expected call of GetPrivateKey. -func (mr *MockStorageMockRecorder) GetPrivateKey(ctx, kid any) *gomock.Call { +func (mr *MockStorageMockRecorder) GetPrivateKey(ctx, kid interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrivateKey", reflect.TypeOf((*MockStorage)(nil).GetPrivateKey), ctx, kid) } @@ -78,7 +74,7 @@ func (m *MockStorage) ListPrivateKeys(ctx context.Context) []string { } // ListPrivateKeys indicates an expected call of ListPrivateKeys. -func (mr *MockStorageMockRecorder) ListPrivateKeys(ctx any) *gomock.Call { +func (mr *MockStorageMockRecorder) ListPrivateKeys(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPrivateKeys", reflect.TypeOf((*MockStorage)(nil).ListPrivateKeys), ctx) } @@ -106,7 +102,7 @@ func (m *MockStorage) PrivateKeyExists(ctx context.Context, kid string) bool { } // PrivateKeyExists indicates an expected call of PrivateKeyExists. -func (mr *MockStorageMockRecorder) PrivateKeyExists(ctx, kid any) *gomock.Call { +func (mr *MockStorageMockRecorder) PrivateKeyExists(ctx, kid interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrivateKeyExists", reflect.TypeOf((*MockStorage)(nil).PrivateKeyExists), ctx, kid) } @@ -120,7 +116,7 @@ func (m *MockStorage) SavePrivateKey(ctx context.Context, kid string, key crypto } // SavePrivateKey indicates an expected call of SavePrivateKey. -func (mr *MockStorageMockRecorder) SavePrivateKey(ctx, kid, key any) *gomock.Call { +func (mr *MockStorageMockRecorder) SavePrivateKey(ctx, kid, key interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SavePrivateKey", reflect.TypeOf((*MockStorage)(nil).SavePrivateKey), ctx, kid, key) } diff --git a/didman/didman.go b/didman/didman.go index 0e31c8743a..11822bd95b 100644 --- a/didman/didman.go +++ b/didman/didman.go @@ -25,7 +25,7 @@ import ( "encoding/json" "errors" "fmt" - vdr2 "github.com/nuts-foundation/nuts-node/vdr" + "github.com/nuts-foundation/nuts-node/vdr" "github.com/nuts-foundation/nuts-node/vdr/resolver" "net/url" "sync" @@ -87,14 +87,14 @@ func (e ErrReferencedServiceNotAnEndpoint) Is(other error) bool { type didman struct { jsonldManager jsonld.JSONLD - vdr vdr2.VDR + vdr vdr.VDR vcr vcr.Finder // callSerializer can be used to (un)lock a resource such as a DID to prevent parallel updates callSerializer keyedMutex } // NewDidmanInstance creates a new didman instance with services set -func NewDidmanInstance(vdr vdr2.VDR, vcr vcr.Finder, jsonldManager jsonld.JSONLD) Didman { +func NewDidmanInstance(vdr vdr.VDR, vcr vcr.Finder, jsonldManager jsonld.JSONLD) Didman { return &didman{ vdr: vdr, vcr: vcr, diff --git a/didman/mock.go b/didman/mock.go index bf9740a7e4..b7b954d336 100644 --- a/didman/mock.go +++ b/didman/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: didman/types.go -// -// Generated by this command: -// -// mockgen -destination=didman/mock.go -package=didman -source=didman/types.go -// + // Package didman is a generated GoMock package. package didman @@ -51,7 +47,7 @@ func (m *MockDidman) AddCompoundService(ctx context.Context, id did.DID, service } // AddCompoundService indicates an expected call of AddCompoundService. -func (mr *MockDidmanMockRecorder) AddCompoundService(ctx, id, serviceType, endpoints any) *gomock.Call { +func (mr *MockDidmanMockRecorder) AddCompoundService(ctx, id, serviceType, endpoints interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddCompoundService", reflect.TypeOf((*MockDidman)(nil).AddCompoundService), ctx, id, serviceType, endpoints) } @@ -66,7 +62,7 @@ func (m *MockDidman) AddEndpoint(ctx context.Context, id did.DID, serviceType st } // AddEndpoint indicates an expected call of AddEndpoint. -func (mr *MockDidmanMockRecorder) AddEndpoint(ctx, id, serviceType, endpoint any) *gomock.Call { +func (mr *MockDidmanMockRecorder) AddEndpoint(ctx, id, serviceType, endpoint interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddEndpoint", reflect.TypeOf((*MockDidman)(nil).AddEndpoint), ctx, id, serviceType, endpoint) } @@ -80,7 +76,7 @@ func (m *MockDidman) DeleteEndpointsByType(ctx context.Context, id did.DID, serv } // DeleteEndpointsByType indicates an expected call of DeleteEndpointsByType. -func (mr *MockDidmanMockRecorder) DeleteEndpointsByType(ctx, id, serviceType any) *gomock.Call { +func (mr *MockDidmanMockRecorder) DeleteEndpointsByType(ctx, id, serviceType interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteEndpointsByType", reflect.TypeOf((*MockDidman)(nil).DeleteEndpointsByType), ctx, id, serviceType) } @@ -94,7 +90,7 @@ func (m *MockDidman) DeleteService(ctx context.Context, id ssi.URI) error { } // DeleteService indicates an expected call of DeleteService. -func (mr *MockDidmanMockRecorder) DeleteService(ctx, id any) *gomock.Call { +func (mr *MockDidmanMockRecorder) DeleteService(ctx, id interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteService", reflect.TypeOf((*MockDidman)(nil).DeleteService), ctx, id) } @@ -109,7 +105,7 @@ func (m *MockDidman) GetCompoundServiceEndpoint(id did.DID, compoundServiceType, } // GetCompoundServiceEndpoint indicates an expected call of GetCompoundServiceEndpoint. -func (mr *MockDidmanMockRecorder) GetCompoundServiceEndpoint(id, compoundServiceType, endpointType, resolveReferences any) *gomock.Call { +func (mr *MockDidmanMockRecorder) GetCompoundServiceEndpoint(id, compoundServiceType, endpointType, resolveReferences interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCompoundServiceEndpoint", reflect.TypeOf((*MockDidman)(nil).GetCompoundServiceEndpoint), id, compoundServiceType, endpointType, resolveReferences) } @@ -124,7 +120,7 @@ func (m *MockDidman) GetCompoundServices(id did.DID) ([]did.Service, error) { } // GetCompoundServices indicates an expected call of GetCompoundServices. -func (mr *MockDidmanMockRecorder) GetCompoundServices(id any) *gomock.Call { +func (mr *MockDidmanMockRecorder) GetCompoundServices(id interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCompoundServices", reflect.TypeOf((*MockDidman)(nil).GetCompoundServices), id) } @@ -139,7 +135,7 @@ func (m *MockDidman) GetContactInformation(id did.DID) (*ContactInformation, err } // GetContactInformation indicates an expected call of GetContactInformation. -func (mr *MockDidmanMockRecorder) GetContactInformation(id any) *gomock.Call { +func (mr *MockDidmanMockRecorder) GetContactInformation(id interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContactInformation", reflect.TypeOf((*MockDidman)(nil).GetContactInformation), id) } @@ -154,7 +150,7 @@ func (m *MockDidman) SearchOrganizations(ctx context.Context, query string, didS } // SearchOrganizations indicates an expected call of SearchOrganizations. -func (mr *MockDidmanMockRecorder) SearchOrganizations(ctx, query, didServiceType any) *gomock.Call { +func (mr *MockDidmanMockRecorder) SearchOrganizations(ctx, query, didServiceType interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SearchOrganizations", reflect.TypeOf((*MockDidman)(nil).SearchOrganizations), ctx, query, didServiceType) } @@ -169,7 +165,7 @@ func (m *MockDidman) UpdateCompoundService(ctx context.Context, id did.DID, serv } // UpdateCompoundService indicates an expected call of UpdateCompoundService. -func (mr *MockDidmanMockRecorder) UpdateCompoundService(ctx, id, serviceType, endpoints any) *gomock.Call { +func (mr *MockDidmanMockRecorder) UpdateCompoundService(ctx, id, serviceType, endpoints interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCompoundService", reflect.TypeOf((*MockDidman)(nil).UpdateCompoundService), ctx, id, serviceType, endpoints) } @@ -184,7 +180,7 @@ func (m *MockDidman) UpdateContactInformation(ctx context.Context, id did.DID, i } // UpdateContactInformation indicates an expected call of UpdateContactInformation. -func (mr *MockDidmanMockRecorder) UpdateContactInformation(ctx, id, information any) *gomock.Call { +func (mr *MockDidmanMockRecorder) UpdateContactInformation(ctx, id, information interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateContactInformation", reflect.TypeOf((*MockDidman)(nil).UpdateContactInformation), ctx, id, information) } @@ -199,7 +195,7 @@ func (m *MockDidman) UpdateEndpoint(ctx context.Context, id did.DID, serviceType } // UpdateEndpoint indicates an expected call of UpdateEndpoint. -func (mr *MockDidmanMockRecorder) UpdateEndpoint(ctx, id, serviceType, endpoint any) *gomock.Call { +func (mr *MockDidmanMockRecorder) UpdateEndpoint(ctx, id, serviceType, endpoint interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateEndpoint", reflect.TypeOf((*MockDidman)(nil).UpdateEndpoint), ctx, id, serviceType, endpoint) } @@ -237,7 +233,7 @@ func (m *MockCompoundServiceResolver) GetCompoundServiceEndpoint(id did.DID, com } // GetCompoundServiceEndpoint indicates an expected call of GetCompoundServiceEndpoint. -func (mr *MockCompoundServiceResolverMockRecorder) GetCompoundServiceEndpoint(id, compoundServiceType, endpointType, resolveReferences any) *gomock.Call { +func (mr *MockCompoundServiceResolverMockRecorder) GetCompoundServiceEndpoint(id, compoundServiceType, endpointType, resolveReferences interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCompoundServiceEndpoint", reflect.TypeOf((*MockCompoundServiceResolver)(nil).GetCompoundServiceEndpoint), id, compoundServiceType, endpointType, resolveReferences) } @@ -252,7 +248,7 @@ func (m *MockCompoundServiceResolver) GetCompoundServices(id did.DID) ([]did.Ser } // GetCompoundServices indicates an expected call of GetCompoundServices. -func (mr *MockCompoundServiceResolverMockRecorder) GetCompoundServices(id any) *gomock.Call { +func (mr *MockCompoundServiceResolverMockRecorder) GetCompoundServices(id interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCompoundServices", reflect.TypeOf((*MockCompoundServiceResolver)(nil).GetCompoundServices), id) } diff --git a/events/events_mock.go b/events/events_mock.go index 9c1fed6a9a..82b397a938 100644 --- a/events/events_mock.go +++ b/events/events_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: events/interface.go -// -// Generated by this command: -// -// mockgen -destination=events/events_mock.go -package=events -source=events/interface.go Event -// + // Package events is a generated GoMock package. package events @@ -46,7 +42,7 @@ func (m *MockEvent) GetStream(streamName string) Stream { } // GetStream indicates an expected call of GetStream. -func (mr *MockEventMockRecorder) GetStream(streamName any) *gomock.Call { +func (mr *MockEventMockRecorder) GetStream(streamName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStream", reflect.TypeOf((*MockEvent)(nil).GetStream), streamName) } diff --git a/events/mock.go b/events/mock.go index 954b9353e0..b00affa7ca 100644 --- a/events/mock.go +++ b/events/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: events/conn.go -// -// Generated by this command: -// -// mockgen -destination=events/mock.go -package=events -source=events/conn.go Conn ConnectionPool -// + // Package events is a generated GoMock package. package events @@ -54,7 +50,7 @@ func (mr *MockConnMockRecorder) Close() *gomock.Call { // JetStream mocks base method. func (m *MockConn) JetStream(opts ...nats.JSOpt) (nats.JetStreamContext, error) { m.ctrl.T.Helper() - varargs := []any{} + varargs := []interface{}{} for _, a := range opts { varargs = append(varargs, a) } @@ -65,7 +61,7 @@ func (m *MockConn) JetStream(opts ...nats.JSOpt) (nats.JetStreamContext, error) } // JetStream indicates an expected call of JetStream. -func (mr *MockConnMockRecorder) JetStream(opts ...any) *gomock.Call { +func (mr *MockConnMockRecorder) JetStream(opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "JetStream", reflect.TypeOf((*MockConn)(nil).JetStream), opts...) } @@ -96,7 +92,7 @@ func (m *MockJetStreamContext) EXPECT() *MockJetStreamContextMockRecorder { // AccountInfo mocks base method. func (m *MockJetStreamContext) AccountInfo(opts ...nats.JSOpt) (*nats.AccountInfo, error) { m.ctrl.T.Helper() - varargs := []any{} + varargs := []interface{}{} for _, a := range opts { varargs = append(varargs, a) } @@ -107,7 +103,7 @@ func (m *MockJetStreamContext) AccountInfo(opts ...nats.JSOpt) (*nats.AccountInf } // AccountInfo indicates an expected call of AccountInfo. -func (mr *MockJetStreamContextMockRecorder) AccountInfo(opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) AccountInfo(opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccountInfo", reflect.TypeOf((*MockJetStreamContext)(nil).AccountInfo), opts...) } @@ -115,7 +111,7 @@ func (mr *MockJetStreamContextMockRecorder) AccountInfo(opts ...any) *gomock.Cal // AddConsumer mocks base method. func (m *MockJetStreamContext) AddConsumer(stream string, cfg *nats.ConsumerConfig, opts ...nats.JSOpt) (*nats.ConsumerInfo, error) { m.ctrl.T.Helper() - varargs := []any{stream, cfg} + varargs := []interface{}{stream, cfg} for _, a := range opts { varargs = append(varargs, a) } @@ -126,16 +122,16 @@ func (m *MockJetStreamContext) AddConsumer(stream string, cfg *nats.ConsumerConf } // AddConsumer indicates an expected call of AddConsumer. -func (mr *MockJetStreamContextMockRecorder) AddConsumer(stream, cfg any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) AddConsumer(stream, cfg interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{stream, cfg}, opts...) + varargs := append([]interface{}{stream, cfg}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddConsumer", reflect.TypeOf((*MockJetStreamContext)(nil).AddConsumer), varargs...) } // AddStream mocks base method. func (m *MockJetStreamContext) AddStream(cfg *nats.StreamConfig, opts ...nats.JSOpt) (*nats.StreamInfo, error) { m.ctrl.T.Helper() - varargs := []any{cfg} + varargs := []interface{}{cfg} for _, a := range opts { varargs = append(varargs, a) } @@ -146,16 +142,16 @@ func (m *MockJetStreamContext) AddStream(cfg *nats.StreamConfig, opts ...nats.JS } // AddStream indicates an expected call of AddStream. -func (mr *MockJetStreamContextMockRecorder) AddStream(cfg any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) AddStream(cfg interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{cfg}, opts...) + varargs := append([]interface{}{cfg}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddStream", reflect.TypeOf((*MockJetStreamContext)(nil).AddStream), varargs...) } // ChanQueueSubscribe mocks base method. func (m *MockJetStreamContext) ChanQueueSubscribe(subj, queue string, ch chan *nats.Msg, opts ...nats.SubOpt) (*nats.Subscription, error) { m.ctrl.T.Helper() - varargs := []any{subj, queue, ch} + varargs := []interface{}{subj, queue, ch} for _, a := range opts { varargs = append(varargs, a) } @@ -166,16 +162,16 @@ func (m *MockJetStreamContext) ChanQueueSubscribe(subj, queue string, ch chan *n } // ChanQueueSubscribe indicates an expected call of ChanQueueSubscribe. -func (mr *MockJetStreamContextMockRecorder) ChanQueueSubscribe(subj, queue, ch any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) ChanQueueSubscribe(subj, queue, ch interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{subj, queue, ch}, opts...) + varargs := append([]interface{}{subj, queue, ch}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChanQueueSubscribe", reflect.TypeOf((*MockJetStreamContext)(nil).ChanQueueSubscribe), varargs...) } // ChanSubscribe mocks base method. func (m *MockJetStreamContext) ChanSubscribe(subj string, ch chan *nats.Msg, opts ...nats.SubOpt) (*nats.Subscription, error) { m.ctrl.T.Helper() - varargs := []any{subj, ch} + varargs := []interface{}{subj, ch} for _, a := range opts { varargs = append(varargs, a) } @@ -186,16 +182,16 @@ func (m *MockJetStreamContext) ChanSubscribe(subj string, ch chan *nats.Msg, opt } // ChanSubscribe indicates an expected call of ChanSubscribe. -func (mr *MockJetStreamContextMockRecorder) ChanSubscribe(subj, ch any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) ChanSubscribe(subj, ch interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{subj, ch}, opts...) + varargs := append([]interface{}{subj, ch}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChanSubscribe", reflect.TypeOf((*MockJetStreamContext)(nil).ChanSubscribe), varargs...) } // ConsumerInfo mocks base method. func (m *MockJetStreamContext) ConsumerInfo(stream, name string, opts ...nats.JSOpt) (*nats.ConsumerInfo, error) { m.ctrl.T.Helper() - varargs := []any{stream, name} + varargs := []interface{}{stream, name} for _, a := range opts { varargs = append(varargs, a) } @@ -206,16 +202,16 @@ func (m *MockJetStreamContext) ConsumerInfo(stream, name string, opts ...nats.JS } // ConsumerInfo indicates an expected call of ConsumerInfo. -func (mr *MockJetStreamContextMockRecorder) ConsumerInfo(stream, name any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) ConsumerInfo(stream, name interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{stream, name}, opts...) + varargs := append([]interface{}{stream, name}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsumerInfo", reflect.TypeOf((*MockJetStreamContext)(nil).ConsumerInfo), varargs...) } // ConsumerNames mocks base method. func (m *MockJetStreamContext) ConsumerNames(stream string, opts ...nats.JSOpt) <-chan string { m.ctrl.T.Helper() - varargs := []any{stream} + varargs := []interface{}{stream} for _, a := range opts { varargs = append(varargs, a) } @@ -225,16 +221,16 @@ func (m *MockJetStreamContext) ConsumerNames(stream string, opts ...nats.JSOpt) } // ConsumerNames indicates an expected call of ConsumerNames. -func (mr *MockJetStreamContextMockRecorder) ConsumerNames(stream any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) ConsumerNames(stream interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{stream}, opts...) + varargs := append([]interface{}{stream}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsumerNames", reflect.TypeOf((*MockJetStreamContext)(nil).ConsumerNames), varargs...) } // Consumers mocks base method. func (m *MockJetStreamContext) Consumers(stream string, opts ...nats.JSOpt) <-chan *nats.ConsumerInfo { m.ctrl.T.Helper() - varargs := []any{stream} + varargs := []interface{}{stream} for _, a := range opts { varargs = append(varargs, a) } @@ -244,16 +240,16 @@ func (m *MockJetStreamContext) Consumers(stream string, opts ...nats.JSOpt) <-ch } // Consumers indicates an expected call of Consumers. -func (mr *MockJetStreamContextMockRecorder) Consumers(stream any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) Consumers(stream interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{stream}, opts...) + varargs := append([]interface{}{stream}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Consumers", reflect.TypeOf((*MockJetStreamContext)(nil).Consumers), varargs...) } // ConsumersInfo mocks base method. func (m *MockJetStreamContext) ConsumersInfo(stream string, opts ...nats.JSOpt) <-chan *nats.ConsumerInfo { m.ctrl.T.Helper() - varargs := []any{stream} + varargs := []interface{}{stream} for _, a := range opts { varargs = append(varargs, a) } @@ -263,9 +259,9 @@ func (m *MockJetStreamContext) ConsumersInfo(stream string, opts ...nats.JSOpt) } // ConsumersInfo indicates an expected call of ConsumersInfo. -func (mr *MockJetStreamContextMockRecorder) ConsumersInfo(stream any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) ConsumersInfo(stream interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{stream}, opts...) + varargs := append([]interface{}{stream}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConsumersInfo", reflect.TypeOf((*MockJetStreamContext)(nil).ConsumersInfo), varargs...) } @@ -279,7 +275,7 @@ func (m *MockJetStreamContext) CreateKeyValue(cfg *nats.KeyValueConfig) (nats.Ke } // CreateKeyValue indicates an expected call of CreateKeyValue. -func (mr *MockJetStreamContextMockRecorder) CreateKeyValue(cfg any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) CreateKeyValue(cfg interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateKeyValue", reflect.TypeOf((*MockJetStreamContext)(nil).CreateKeyValue), cfg) } @@ -294,7 +290,7 @@ func (m *MockJetStreamContext) CreateObjectStore(cfg *nats.ObjectStoreConfig) (n } // CreateObjectStore indicates an expected call of CreateObjectStore. -func (mr *MockJetStreamContextMockRecorder) CreateObjectStore(cfg any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) CreateObjectStore(cfg interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateObjectStore", reflect.TypeOf((*MockJetStreamContext)(nil).CreateObjectStore), cfg) } @@ -302,7 +298,7 @@ func (mr *MockJetStreamContextMockRecorder) CreateObjectStore(cfg any) *gomock.C // DeleteConsumer mocks base method. func (m *MockJetStreamContext) DeleteConsumer(stream, consumer string, opts ...nats.JSOpt) error { m.ctrl.T.Helper() - varargs := []any{stream, consumer} + varargs := []interface{}{stream, consumer} for _, a := range opts { varargs = append(varargs, a) } @@ -312,9 +308,9 @@ func (m *MockJetStreamContext) DeleteConsumer(stream, consumer string, opts ...n } // DeleteConsumer indicates an expected call of DeleteConsumer. -func (mr *MockJetStreamContextMockRecorder) DeleteConsumer(stream, consumer any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) DeleteConsumer(stream, consumer interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{stream, consumer}, opts...) + varargs := append([]interface{}{stream, consumer}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteConsumer", reflect.TypeOf((*MockJetStreamContext)(nil).DeleteConsumer), varargs...) } @@ -327,7 +323,7 @@ func (m *MockJetStreamContext) DeleteKeyValue(bucket string) error { } // DeleteKeyValue indicates an expected call of DeleteKeyValue. -func (mr *MockJetStreamContextMockRecorder) DeleteKeyValue(bucket any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) DeleteKeyValue(bucket interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteKeyValue", reflect.TypeOf((*MockJetStreamContext)(nil).DeleteKeyValue), bucket) } @@ -335,7 +331,7 @@ func (mr *MockJetStreamContextMockRecorder) DeleteKeyValue(bucket any) *gomock.C // DeleteMsg mocks base method. func (m *MockJetStreamContext) DeleteMsg(name string, seq uint64, opts ...nats.JSOpt) error { m.ctrl.T.Helper() - varargs := []any{name, seq} + varargs := []interface{}{name, seq} for _, a := range opts { varargs = append(varargs, a) } @@ -345,9 +341,9 @@ func (m *MockJetStreamContext) DeleteMsg(name string, seq uint64, opts ...nats.J } // DeleteMsg indicates an expected call of DeleteMsg. -func (mr *MockJetStreamContextMockRecorder) DeleteMsg(name, seq any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) DeleteMsg(name, seq interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{name, seq}, opts...) + varargs := append([]interface{}{name, seq}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteMsg", reflect.TypeOf((*MockJetStreamContext)(nil).DeleteMsg), varargs...) } @@ -360,7 +356,7 @@ func (m *MockJetStreamContext) DeleteObjectStore(bucket string) error { } // DeleteObjectStore indicates an expected call of DeleteObjectStore. -func (mr *MockJetStreamContextMockRecorder) DeleteObjectStore(bucket any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) DeleteObjectStore(bucket interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteObjectStore", reflect.TypeOf((*MockJetStreamContext)(nil).DeleteObjectStore), bucket) } @@ -368,7 +364,7 @@ func (mr *MockJetStreamContextMockRecorder) DeleteObjectStore(bucket any) *gomoc // DeleteStream mocks base method. func (m *MockJetStreamContext) DeleteStream(name string, opts ...nats.JSOpt) error { m.ctrl.T.Helper() - varargs := []any{name} + varargs := []interface{}{name} for _, a := range opts { varargs = append(varargs, a) } @@ -378,16 +374,16 @@ func (m *MockJetStreamContext) DeleteStream(name string, opts ...nats.JSOpt) err } // DeleteStream indicates an expected call of DeleteStream. -func (mr *MockJetStreamContextMockRecorder) DeleteStream(name any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) DeleteStream(name interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{name}, opts...) + varargs := append([]interface{}{name}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStream", reflect.TypeOf((*MockJetStreamContext)(nil).DeleteStream), varargs...) } // GetLastMsg mocks base method. func (m *MockJetStreamContext) GetLastMsg(name, subject string, opts ...nats.JSOpt) (*nats.RawStreamMsg, error) { m.ctrl.T.Helper() - varargs := []any{name, subject} + varargs := []interface{}{name, subject} for _, a := range opts { varargs = append(varargs, a) } @@ -398,16 +394,16 @@ func (m *MockJetStreamContext) GetLastMsg(name, subject string, opts ...nats.JSO } // GetLastMsg indicates an expected call of GetLastMsg. -func (mr *MockJetStreamContextMockRecorder) GetLastMsg(name, subject any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) GetLastMsg(name, subject interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{name, subject}, opts...) + varargs := append([]interface{}{name, subject}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLastMsg", reflect.TypeOf((*MockJetStreamContext)(nil).GetLastMsg), varargs...) } // GetMsg mocks base method. func (m *MockJetStreamContext) GetMsg(name string, seq uint64, opts ...nats.JSOpt) (*nats.RawStreamMsg, error) { m.ctrl.T.Helper() - varargs := []any{name, seq} + varargs := []interface{}{name, seq} for _, a := range opts { varargs = append(varargs, a) } @@ -418,9 +414,9 @@ func (m *MockJetStreamContext) GetMsg(name string, seq uint64, opts ...nats.JSOp } // GetMsg indicates an expected call of GetMsg. -func (mr *MockJetStreamContextMockRecorder) GetMsg(name, seq any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) GetMsg(name, seq interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{name, seq}, opts...) + varargs := append([]interface{}{name, seq}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMsg", reflect.TypeOf((*MockJetStreamContext)(nil).GetMsg), varargs...) } @@ -434,7 +430,7 @@ func (m *MockJetStreamContext) KeyValue(bucket string) (nats.KeyValue, error) { } // KeyValue indicates an expected call of KeyValue. -func (mr *MockJetStreamContextMockRecorder) KeyValue(bucket any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) KeyValue(bucket interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KeyValue", reflect.TypeOf((*MockJetStreamContext)(nil).KeyValue), bucket) } @@ -477,7 +473,7 @@ func (m *MockJetStreamContext) ObjectStore(bucket string) (nats.ObjectStore, err } // ObjectStore indicates an expected call of ObjectStore. -func (mr *MockJetStreamContextMockRecorder) ObjectStore(bucket any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) ObjectStore(bucket interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStore", reflect.TypeOf((*MockJetStreamContext)(nil).ObjectStore), bucket) } @@ -485,7 +481,7 @@ func (mr *MockJetStreamContextMockRecorder) ObjectStore(bucket any) *gomock.Call // ObjectStoreNames mocks base method. func (m *MockJetStreamContext) ObjectStoreNames(opts ...nats.ObjectOpt) <-chan string { m.ctrl.T.Helper() - varargs := []any{} + varargs := []interface{}{} for _, a := range opts { varargs = append(varargs, a) } @@ -495,7 +491,7 @@ func (m *MockJetStreamContext) ObjectStoreNames(opts ...nats.ObjectOpt) <-chan s } // ObjectStoreNames indicates an expected call of ObjectStoreNames. -func (mr *MockJetStreamContextMockRecorder) ObjectStoreNames(opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) ObjectStoreNames(opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStoreNames", reflect.TypeOf((*MockJetStreamContext)(nil).ObjectStoreNames), opts...) } @@ -503,7 +499,7 @@ func (mr *MockJetStreamContextMockRecorder) ObjectStoreNames(opts ...any) *gomoc // ObjectStores mocks base method. func (m *MockJetStreamContext) ObjectStores(opts ...nats.ObjectOpt) <-chan nats.ObjectStoreStatus { m.ctrl.T.Helper() - varargs := []any{} + varargs := []interface{}{} for _, a := range opts { varargs = append(varargs, a) } @@ -513,7 +509,7 @@ func (m *MockJetStreamContext) ObjectStores(opts ...nats.ObjectOpt) <-chan nats. } // ObjectStores indicates an expected call of ObjectStores. -func (mr *MockJetStreamContextMockRecorder) ObjectStores(opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) ObjectStores(opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectStores", reflect.TypeOf((*MockJetStreamContext)(nil).ObjectStores), opts...) } @@ -521,7 +517,7 @@ func (mr *MockJetStreamContextMockRecorder) ObjectStores(opts ...any) *gomock.Ca // Publish mocks base method. func (m *MockJetStreamContext) Publish(subj string, data []byte, opts ...nats.PubOpt) (*nats.PubAck, error) { m.ctrl.T.Helper() - varargs := []any{subj, data} + varargs := []interface{}{subj, data} for _, a := range opts { varargs = append(varargs, a) } @@ -532,16 +528,16 @@ func (m *MockJetStreamContext) Publish(subj string, data []byte, opts ...nats.Pu } // Publish indicates an expected call of Publish. -func (mr *MockJetStreamContextMockRecorder) Publish(subj, data any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) Publish(subj, data interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{subj, data}, opts...) + varargs := append([]interface{}{subj, data}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Publish", reflect.TypeOf((*MockJetStreamContext)(nil).Publish), varargs...) } // PublishAsync mocks base method. func (m *MockJetStreamContext) PublishAsync(subj string, data []byte, opts ...nats.PubOpt) (nats.PubAckFuture, error) { m.ctrl.T.Helper() - varargs := []any{subj, data} + varargs := []interface{}{subj, data} for _, a := range opts { varargs = append(varargs, a) } @@ -552,9 +548,9 @@ func (m *MockJetStreamContext) PublishAsync(subj string, data []byte, opts ...na } // PublishAsync indicates an expected call of PublishAsync. -func (mr *MockJetStreamContextMockRecorder) PublishAsync(subj, data any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) PublishAsync(subj, data interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{subj, data}, opts...) + varargs := append([]interface{}{subj, data}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishAsync", reflect.TypeOf((*MockJetStreamContext)(nil).PublishAsync), varargs...) } @@ -589,7 +585,7 @@ func (mr *MockJetStreamContextMockRecorder) PublishAsyncPending() *gomock.Call { // PublishMsg mocks base method. func (m_2 *MockJetStreamContext) PublishMsg(m *nats.Msg, opts ...nats.PubOpt) (*nats.PubAck, error) { m_2.ctrl.T.Helper() - varargs := []any{m} + varargs := []interface{}{m} for _, a := range opts { varargs = append(varargs, a) } @@ -600,16 +596,16 @@ func (m_2 *MockJetStreamContext) PublishMsg(m *nats.Msg, opts ...nats.PubOpt) (* } // PublishMsg indicates an expected call of PublishMsg. -func (mr *MockJetStreamContextMockRecorder) PublishMsg(m any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) PublishMsg(m interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{m}, opts...) + varargs := append([]interface{}{m}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishMsg", reflect.TypeOf((*MockJetStreamContext)(nil).PublishMsg), varargs...) } // PublishMsgAsync mocks base method. func (m_2 *MockJetStreamContext) PublishMsgAsync(m *nats.Msg, opts ...nats.PubOpt) (nats.PubAckFuture, error) { m_2.ctrl.T.Helper() - varargs := []any{m} + varargs := []interface{}{m} for _, a := range opts { varargs = append(varargs, a) } @@ -620,16 +616,16 @@ func (m_2 *MockJetStreamContext) PublishMsgAsync(m *nats.Msg, opts ...nats.PubOp } // PublishMsgAsync indicates an expected call of PublishMsgAsync. -func (mr *MockJetStreamContextMockRecorder) PublishMsgAsync(m any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) PublishMsgAsync(m interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{m}, opts...) + varargs := append([]interface{}{m}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishMsgAsync", reflect.TypeOf((*MockJetStreamContext)(nil).PublishMsgAsync), varargs...) } // PullSubscribe mocks base method. func (m *MockJetStreamContext) PullSubscribe(subj, durable string, opts ...nats.SubOpt) (*nats.Subscription, error) { m.ctrl.T.Helper() - varargs := []any{subj, durable} + varargs := []interface{}{subj, durable} for _, a := range opts { varargs = append(varargs, a) } @@ -640,16 +636,16 @@ func (m *MockJetStreamContext) PullSubscribe(subj, durable string, opts ...nats. } // PullSubscribe indicates an expected call of PullSubscribe. -func (mr *MockJetStreamContextMockRecorder) PullSubscribe(subj, durable any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) PullSubscribe(subj, durable interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{subj, durable}, opts...) + varargs := append([]interface{}{subj, durable}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PullSubscribe", reflect.TypeOf((*MockJetStreamContext)(nil).PullSubscribe), varargs...) } // PurgeStream mocks base method. func (m *MockJetStreamContext) PurgeStream(name string, opts ...nats.JSOpt) error { m.ctrl.T.Helper() - varargs := []any{name} + varargs := []interface{}{name} for _, a := range opts { varargs = append(varargs, a) } @@ -659,16 +655,16 @@ func (m *MockJetStreamContext) PurgeStream(name string, opts ...nats.JSOpt) erro } // PurgeStream indicates an expected call of PurgeStream. -func (mr *MockJetStreamContextMockRecorder) PurgeStream(name any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) PurgeStream(name interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{name}, opts...) + varargs := append([]interface{}{name}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PurgeStream", reflect.TypeOf((*MockJetStreamContext)(nil).PurgeStream), varargs...) } // QueueSubscribe mocks base method. func (m *MockJetStreamContext) QueueSubscribe(subj, queue string, cb nats.MsgHandler, opts ...nats.SubOpt) (*nats.Subscription, error) { m.ctrl.T.Helper() - varargs := []any{subj, queue, cb} + varargs := []interface{}{subj, queue, cb} for _, a := range opts { varargs = append(varargs, a) } @@ -679,16 +675,16 @@ func (m *MockJetStreamContext) QueueSubscribe(subj, queue string, cb nats.MsgHan } // QueueSubscribe indicates an expected call of QueueSubscribe. -func (mr *MockJetStreamContextMockRecorder) QueueSubscribe(subj, queue, cb any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) QueueSubscribe(subj, queue, cb interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{subj, queue, cb}, opts...) + varargs := append([]interface{}{subj, queue, cb}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueueSubscribe", reflect.TypeOf((*MockJetStreamContext)(nil).QueueSubscribe), varargs...) } // QueueSubscribeSync mocks base method. func (m *MockJetStreamContext) QueueSubscribeSync(subj, queue string, opts ...nats.SubOpt) (*nats.Subscription, error) { m.ctrl.T.Helper() - varargs := []any{subj, queue} + varargs := []interface{}{subj, queue} for _, a := range opts { varargs = append(varargs, a) } @@ -699,16 +695,16 @@ func (m *MockJetStreamContext) QueueSubscribeSync(subj, queue string, opts ...na } // QueueSubscribeSync indicates an expected call of QueueSubscribeSync. -func (mr *MockJetStreamContextMockRecorder) QueueSubscribeSync(subj, queue any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) QueueSubscribeSync(subj, queue interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{subj, queue}, opts...) + varargs := append([]interface{}{subj, queue}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueueSubscribeSync", reflect.TypeOf((*MockJetStreamContext)(nil).QueueSubscribeSync), varargs...) } // SecureDeleteMsg mocks base method. func (m *MockJetStreamContext) SecureDeleteMsg(name string, seq uint64, opts ...nats.JSOpt) error { m.ctrl.T.Helper() - varargs := []any{name, seq} + varargs := []interface{}{name, seq} for _, a := range opts { varargs = append(varargs, a) } @@ -718,16 +714,16 @@ func (m *MockJetStreamContext) SecureDeleteMsg(name string, seq uint64, opts ... } // SecureDeleteMsg indicates an expected call of SecureDeleteMsg. -func (mr *MockJetStreamContextMockRecorder) SecureDeleteMsg(name, seq any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) SecureDeleteMsg(name, seq interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{name, seq}, opts...) + varargs := append([]interface{}{name, seq}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SecureDeleteMsg", reflect.TypeOf((*MockJetStreamContext)(nil).SecureDeleteMsg), varargs...) } // StreamInfo mocks base method. func (m *MockJetStreamContext) StreamInfo(stream string, opts ...nats.JSOpt) (*nats.StreamInfo, error) { m.ctrl.T.Helper() - varargs := []any{stream} + varargs := []interface{}{stream} for _, a := range opts { varargs = append(varargs, a) } @@ -738,16 +734,16 @@ func (m *MockJetStreamContext) StreamInfo(stream string, opts ...nats.JSOpt) (*n } // StreamInfo indicates an expected call of StreamInfo. -func (mr *MockJetStreamContextMockRecorder) StreamInfo(stream any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) StreamInfo(stream interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{stream}, opts...) + varargs := append([]interface{}{stream}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamInfo", reflect.TypeOf((*MockJetStreamContext)(nil).StreamInfo), varargs...) } // StreamNameBySubject mocks base method. func (m *MockJetStreamContext) StreamNameBySubject(arg0 string, arg1 ...nats.JSOpt) (string, error) { m.ctrl.T.Helper() - varargs := []any{arg0} + varargs := []interface{}{arg0} for _, a := range arg1 { varargs = append(varargs, a) } @@ -758,16 +754,16 @@ func (m *MockJetStreamContext) StreamNameBySubject(arg0 string, arg1 ...nats.JSO } // StreamNameBySubject indicates an expected call of StreamNameBySubject. -func (mr *MockJetStreamContextMockRecorder) StreamNameBySubject(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) StreamNameBySubject(arg0 interface{}, arg1 ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0}, arg1...) + varargs := append([]interface{}{arg0}, arg1...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamNameBySubject", reflect.TypeOf((*MockJetStreamContext)(nil).StreamNameBySubject), varargs...) } // StreamNames mocks base method. func (m *MockJetStreamContext) StreamNames(opts ...nats.JSOpt) <-chan string { m.ctrl.T.Helper() - varargs := []any{} + varargs := []interface{}{} for _, a := range opts { varargs = append(varargs, a) } @@ -777,7 +773,7 @@ func (m *MockJetStreamContext) StreamNames(opts ...nats.JSOpt) <-chan string { } // StreamNames indicates an expected call of StreamNames. -func (mr *MockJetStreamContextMockRecorder) StreamNames(opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) StreamNames(opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamNames", reflect.TypeOf((*MockJetStreamContext)(nil).StreamNames), opts...) } @@ -785,7 +781,7 @@ func (mr *MockJetStreamContextMockRecorder) StreamNames(opts ...any) *gomock.Cal // Streams mocks base method. func (m *MockJetStreamContext) Streams(opts ...nats.JSOpt) <-chan *nats.StreamInfo { m.ctrl.T.Helper() - varargs := []any{} + varargs := []interface{}{} for _, a := range opts { varargs = append(varargs, a) } @@ -795,7 +791,7 @@ func (m *MockJetStreamContext) Streams(opts ...nats.JSOpt) <-chan *nats.StreamIn } // Streams indicates an expected call of Streams. -func (mr *MockJetStreamContextMockRecorder) Streams(opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) Streams(opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Streams", reflect.TypeOf((*MockJetStreamContext)(nil).Streams), opts...) } @@ -803,7 +799,7 @@ func (mr *MockJetStreamContextMockRecorder) Streams(opts ...any) *gomock.Call { // StreamsInfo mocks base method. func (m *MockJetStreamContext) StreamsInfo(opts ...nats.JSOpt) <-chan *nats.StreamInfo { m.ctrl.T.Helper() - varargs := []any{} + varargs := []interface{}{} for _, a := range opts { varargs = append(varargs, a) } @@ -813,7 +809,7 @@ func (m *MockJetStreamContext) StreamsInfo(opts ...nats.JSOpt) <-chan *nats.Stre } // StreamsInfo indicates an expected call of StreamsInfo. -func (mr *MockJetStreamContextMockRecorder) StreamsInfo(opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) StreamsInfo(opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamsInfo", reflect.TypeOf((*MockJetStreamContext)(nil).StreamsInfo), opts...) } @@ -821,7 +817,7 @@ func (mr *MockJetStreamContextMockRecorder) StreamsInfo(opts ...any) *gomock.Cal // Subscribe mocks base method. func (m *MockJetStreamContext) Subscribe(subj string, cb nats.MsgHandler, opts ...nats.SubOpt) (*nats.Subscription, error) { m.ctrl.T.Helper() - varargs := []any{subj, cb} + varargs := []interface{}{subj, cb} for _, a := range opts { varargs = append(varargs, a) } @@ -832,16 +828,16 @@ func (m *MockJetStreamContext) Subscribe(subj string, cb nats.MsgHandler, opts . } // Subscribe indicates an expected call of Subscribe. -func (mr *MockJetStreamContextMockRecorder) Subscribe(subj, cb any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) Subscribe(subj, cb interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{subj, cb}, opts...) + varargs := append([]interface{}{subj, cb}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockJetStreamContext)(nil).Subscribe), varargs...) } // SubscribeSync mocks base method. func (m *MockJetStreamContext) SubscribeSync(subj string, opts ...nats.SubOpt) (*nats.Subscription, error) { m.ctrl.T.Helper() - varargs := []any{subj} + varargs := []interface{}{subj} for _, a := range opts { varargs = append(varargs, a) } @@ -852,16 +848,16 @@ func (m *MockJetStreamContext) SubscribeSync(subj string, opts ...nats.SubOpt) ( } // SubscribeSync indicates an expected call of SubscribeSync. -func (mr *MockJetStreamContextMockRecorder) SubscribeSync(subj any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) SubscribeSync(subj interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{subj}, opts...) + varargs := append([]interface{}{subj}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeSync", reflect.TypeOf((*MockJetStreamContext)(nil).SubscribeSync), varargs...) } // UpdateConsumer mocks base method. func (m *MockJetStreamContext) UpdateConsumer(stream string, cfg *nats.ConsumerConfig, opts ...nats.JSOpt) (*nats.ConsumerInfo, error) { m.ctrl.T.Helper() - varargs := []any{stream, cfg} + varargs := []interface{}{stream, cfg} for _, a := range opts { varargs = append(varargs, a) } @@ -872,16 +868,16 @@ func (m *MockJetStreamContext) UpdateConsumer(stream string, cfg *nats.ConsumerC } // UpdateConsumer indicates an expected call of UpdateConsumer. -func (mr *MockJetStreamContextMockRecorder) UpdateConsumer(stream, cfg any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) UpdateConsumer(stream, cfg interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{stream, cfg}, opts...) + varargs := append([]interface{}{stream, cfg}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateConsumer", reflect.TypeOf((*MockJetStreamContext)(nil).UpdateConsumer), varargs...) } // UpdateStream mocks base method. func (m *MockJetStreamContext) UpdateStream(cfg *nats.StreamConfig, opts ...nats.JSOpt) (*nats.StreamInfo, error) { m.ctrl.T.Helper() - varargs := []any{cfg} + varargs := []interface{}{cfg} for _, a := range opts { varargs = append(varargs, a) } @@ -892,9 +888,9 @@ func (m *MockJetStreamContext) UpdateStream(cfg *nats.StreamConfig, opts ...nats } // UpdateStream indicates an expected call of UpdateStream. -func (mr *MockJetStreamContextMockRecorder) UpdateStream(cfg any, opts ...any) *gomock.Call { +func (mr *MockJetStreamContextMockRecorder) UpdateStream(cfg interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{cfg}, opts...) + varargs := append([]interface{}{cfg}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStream", reflect.TypeOf((*MockJetStreamContext)(nil).UpdateStream), varargs...) } @@ -932,7 +928,7 @@ func (m *MockConnectionPool) Acquire(ctx context.Context) (Conn, JetStreamContex } // Acquire indicates an expected call of Acquire. -func (mr *MockConnectionPoolMockRecorder) Acquire(ctx any) *gomock.Call { +func (mr *MockConnectionPoolMockRecorder) Acquire(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Acquire", reflect.TypeOf((*MockConnectionPool)(nil).Acquire), ctx) } diff --git a/golden_hammer/module_test.go b/golden_hammer/module_test.go index e6643056ae..45c8a975f3 100644 --- a/golden_hammer/module_test.go +++ b/golden_hammer/module_test.go @@ -29,7 +29,7 @@ import ( "github.com/nuts-foundation/nuts-node/test" "github.com/nuts-foundation/nuts-node/test/pki" "github.com/nuts-foundation/nuts-node/vcr/openid4vci" - vdr2 "github.com/nuts-foundation/nuts-node/vdr" + "github.com/nuts-foundation/nuts-node/vdr" "github.com/nuts-foundation/nuts-node/vdr/didnuts/didstore" "github.com/nuts-foundation/nuts-node/vdr/resolver" "github.com/stretchr/testify/assert" @@ -113,7 +113,7 @@ func TestGoldenHammer_Fix(t *testing.T) { didResolver.EXPECT().Resolve(vendorDID, gomock.Any()).Return(&vendorDocumentWithBaseURL, nil, nil).MinTimes(1) didResolver.EXPECT().Resolve(clientADID, gomock.Any()).Return(&clientDocumentWithBaseURL, nil, nil).MinTimes(1) didResolver.EXPECT().Resolve(clientBDID, gomock.Any()).Return(&clientDocumentWithBaseURL, nil, nil).MinTimes(1) - vdr := vdr2.NewMockVDR(ctrl) + vdr := vdr.NewMockVDR(ctrl) vdr.EXPECT().Resolver().Return(didResolver).MinTimes(1) vdr.EXPECT().ListOwned(gomock.Any()).Return([]did.DID{vendorDID, clientADID, clientBDID}, nil) service := New(vdr, nil) @@ -138,7 +138,7 @@ func TestGoldenHammer_Fix(t *testing.T) { docClientB := clientDocumentWithoutBaseURL docClientB.ID = clientBDID - vdr := vdr2.NewMockVDR(ctrl) + vdr := vdr.NewMockVDR(ctrl) vdr.EXPECT().Resolver().Return(didResolver).MinTimes(1) // Order DIDs such that care organization DID is first, to test ordering vdr.EXPECT().ListOwned(gomock.Any()).Return([]did.DID{clientADID, vendorDID, clientBDID}, nil) @@ -173,7 +173,7 @@ func TestGoldenHammer_Fix(t *testing.T) { ctrl := gomock.NewController(t) didResolver := didstore.NewMockStore(ctrl) didResolver.EXPECT().Resolve(vendorDID, gomock.Any()).Return(&vendorDocumentWithoutBaseURL, nil, nil).MinTimes(1) - vdr := vdr2.NewMockVDR(ctrl) + vdr := vdr.NewMockVDR(ctrl) vdr.EXPECT().Resolver().Return(didResolver).MinTimes(1) vdr.EXPECT().ListOwned(gomock.Any()).Return([]did.DID{vendorDID}, nil) service := New(vdr, nil) @@ -199,7 +199,7 @@ func TestGoldenHammer_Fix(t *testing.T) { didResolver.EXPECT().Resolve(clientBDID, gomock.Any()).Return(&docClientB, nil, nil).MinTimes(1) // Client C is owned, but not linked to the vendor (via NutsComm service), so do not register the service on that one didResolver.EXPECT().Resolve(clientCDID, gomock.Any()).Return(&did.Document{ID: clientCDID}, nil, nil).MinTimes(1) - vdr := vdr2.NewMockVDR(ctrl) + vdr := vdr.NewMockVDR(ctrl) vdr.EXPECT().Resolver().Return(didResolver).MinTimes(1) vdr.EXPECT().ListOwned(gomock.Any()).Return([]did.DID{vendorDID, clientADID, clientBDID, clientCDID}, nil) didmanAPI := didman.NewMockDidman(ctrl) @@ -220,7 +220,7 @@ func TestGoldenHammer_Fix(t *testing.T) { ctrl := gomock.NewController(t) didResolver := resolver.NewMockDIDResolver(ctrl) didResolver.EXPECT().Resolve(vendorDID, gomock.Any()).Return(nil, nil, fmt.Errorf("resolve error")) - vdr := vdr2.NewMockVDR(ctrl) + vdr := vdr.NewMockVDR(ctrl) vdr.EXPECT().Resolver().Return(didResolver) vdr.EXPECT().ListOwned(gomock.Any()).Return([]did.DID{vendorDID}, nil) service := New(vdr, nil) @@ -241,7 +241,7 @@ func TestGoldenHammer_Lifecycle(t *testing.T) { fixCalled := &atomic.Int64{} ctrl := gomock.NewController(t) - vdr := vdr2.NewMockVDR(ctrl) + vdr := vdr.NewMockVDR(ctrl) vdr.EXPECT().ListOwned(gomock.Any()).DoAndReturn(func(_ context.Context) ([]did.DID, error) { fixCalled.Add(1) return []did.DID{}, nil diff --git a/http/echo_mock.go b/http/echo_mock.go index 3ccb6cfbab..1e1beb9eaa 100644 --- a/http/echo_mock.go +++ b/http/echo_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: http/echo.go -// -// Generated by this command: -// -// mockgen -destination=http/echo_mock.go -package=http -source=http/echo.go -imports echo=github.com/labstack/echo/v4 -// + // Package http is a generated GoMock package. package http @@ -42,7 +38,7 @@ func (m *MockEchoServer) EXPECT() *MockEchoServerMockRecorder { // Add mocks base method. func (m *MockEchoServer) Add(method, path string, handler echo.HandlerFunc, middleware ...echo.MiddlewareFunc) *echo.Route { m.ctrl.T.Helper() - varargs := []any{method, path, handler} + varargs := []interface{}{method, path, handler} for _, a := range middleware { varargs = append(varargs, a) } @@ -52,16 +48,16 @@ func (m *MockEchoServer) Add(method, path string, handler echo.HandlerFunc, midd } // Add indicates an expected call of Add. -func (mr *MockEchoServerMockRecorder) Add(method, path, handler any, middleware ...any) *gomock.Call { +func (mr *MockEchoServerMockRecorder) Add(method, path, handler interface{}, middleware ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{method, path, handler}, middleware...) + varargs := append([]interface{}{method, path, handler}, middleware...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockEchoServer)(nil).Add), varargs...) } // CONNECT mocks base method. func (m_2 *MockEchoServer) CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -71,16 +67,16 @@ func (m_2 *MockEchoServer) CONNECT(path string, h echo.HandlerFunc, m ...echo.Mi } // CONNECT indicates an expected call of CONNECT. -func (mr *MockEchoServerMockRecorder) CONNECT(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoServerMockRecorder) CONNECT(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CONNECT", reflect.TypeOf((*MockEchoServer)(nil).CONNECT), varargs...) } // DELETE mocks base method. func (m_2 *MockEchoServer) DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -90,16 +86,16 @@ func (m_2 *MockEchoServer) DELETE(path string, h echo.HandlerFunc, m ...echo.Mid } // DELETE indicates an expected call of DELETE. -func (mr *MockEchoServerMockRecorder) DELETE(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoServerMockRecorder) DELETE(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DELETE", reflect.TypeOf((*MockEchoServer)(nil).DELETE), varargs...) } // GET mocks base method. func (m_2 *MockEchoServer) GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -109,16 +105,16 @@ func (m_2 *MockEchoServer) GET(path string, h echo.HandlerFunc, m ...echo.Middle } // GET indicates an expected call of GET. -func (mr *MockEchoServerMockRecorder) GET(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoServerMockRecorder) GET(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GET", reflect.TypeOf((*MockEchoServer)(nil).GET), varargs...) } // HEAD mocks base method. func (m_2 *MockEchoServer) HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -128,16 +124,16 @@ func (m_2 *MockEchoServer) HEAD(path string, h echo.HandlerFunc, m ...echo.Middl } // HEAD indicates an expected call of HEAD. -func (mr *MockEchoServerMockRecorder) HEAD(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoServerMockRecorder) HEAD(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HEAD", reflect.TypeOf((*MockEchoServer)(nil).HEAD), varargs...) } // OPTIONS mocks base method. func (m_2 *MockEchoServer) OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -147,16 +143,16 @@ func (m_2 *MockEchoServer) OPTIONS(path string, h echo.HandlerFunc, m ...echo.Mi } // OPTIONS indicates an expected call of OPTIONS. -func (mr *MockEchoServerMockRecorder) OPTIONS(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoServerMockRecorder) OPTIONS(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OPTIONS", reflect.TypeOf((*MockEchoServer)(nil).OPTIONS), varargs...) } // PATCH mocks base method. func (m_2 *MockEchoServer) PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -166,16 +162,16 @@ func (m_2 *MockEchoServer) PATCH(path string, h echo.HandlerFunc, m ...echo.Midd } // PATCH indicates an expected call of PATCH. -func (mr *MockEchoServerMockRecorder) PATCH(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoServerMockRecorder) PATCH(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PATCH", reflect.TypeOf((*MockEchoServer)(nil).PATCH), varargs...) } // POST mocks base method. func (m_2 *MockEchoServer) POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -185,16 +181,16 @@ func (m_2 *MockEchoServer) POST(path string, h echo.HandlerFunc, m ...echo.Middl } // POST indicates an expected call of POST. -func (mr *MockEchoServerMockRecorder) POST(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoServerMockRecorder) POST(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "POST", reflect.TypeOf((*MockEchoServer)(nil).POST), varargs...) } // PUT mocks base method. func (m_2 *MockEchoServer) PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -204,9 +200,9 @@ func (m_2 *MockEchoServer) PUT(path string, h echo.HandlerFunc, m ...echo.Middle } // PUT indicates an expected call of PUT. -func (mr *MockEchoServerMockRecorder) PUT(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoServerMockRecorder) PUT(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PUT", reflect.TypeOf((*MockEchoServer)(nil).PUT), varargs...) } @@ -219,7 +215,7 @@ func (m *MockEchoServer) Shutdown(ctx context.Context) error { } // Shutdown indicates an expected call of Shutdown. -func (mr *MockEchoServerMockRecorder) Shutdown(ctx any) *gomock.Call { +func (mr *MockEchoServerMockRecorder) Shutdown(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Shutdown", reflect.TypeOf((*MockEchoServer)(nil).Shutdown), ctx) } @@ -233,7 +229,7 @@ func (m *MockEchoServer) Start(address string) error { } // Start indicates an expected call of Start. -func (mr *MockEchoServerMockRecorder) Start(address any) *gomock.Call { +func (mr *MockEchoServerMockRecorder) Start(address interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockEchoServer)(nil).Start), address) } @@ -241,7 +237,7 @@ func (mr *MockEchoServerMockRecorder) Start(address any) *gomock.Call { // TRACE mocks base method. func (m_2 *MockEchoServer) TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route { m_2.ctrl.T.Helper() - varargs := []any{path, h} + varargs := []interface{}{path, h} for _, a := range m { varargs = append(varargs, a) } @@ -251,16 +247,16 @@ func (m_2 *MockEchoServer) TRACE(path string, h echo.HandlerFunc, m ...echo.Midd } // TRACE indicates an expected call of TRACE. -func (mr *MockEchoServerMockRecorder) TRACE(path, h any, m ...any) *gomock.Call { +func (mr *MockEchoServerMockRecorder) TRACE(path, h interface{}, m ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{path, h}, m...) + varargs := append([]interface{}{path, h}, m...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TRACE", reflect.TypeOf((*MockEchoServer)(nil).TRACE), varargs...) } // Use mocks base method. func (m *MockEchoServer) Use(middleware ...echo.MiddlewareFunc) { m.ctrl.T.Helper() - varargs := []any{} + varargs := []interface{}{} for _, a := range middleware { varargs = append(varargs, a) } @@ -268,7 +264,7 @@ func (m *MockEchoServer) Use(middleware ...echo.MiddlewareFunc) { } // Use indicates an expected call of Use. -func (mr *MockEchoServerMockRecorder) Use(middleware ...any) *gomock.Call { +func (mr *MockEchoServerMockRecorder) Use(middleware ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Use", reflect.TypeOf((*MockEchoServer)(nil).Use), middleware...) } diff --git a/network/dag/keys.go b/network/dag/keys.go index 37036ca021..d1b4ad3de2 100644 --- a/network/dag/keys.go +++ b/network/dag/keys.go @@ -22,45 +22,45 @@ import ( "fmt" "github.com/nuts-foundation/go-did/did" "github.com/nuts-foundation/nuts-node/crypto/hash" - resolver2 "github.com/nuts-foundation/nuts-node/vdr/resolver" + "github.com/nuts-foundation/nuts-node/vdr/resolver" ) // SourceTXKeyResolver implements the SourceTXKeyResolver interface. type SourceTXKeyResolver struct { - Resolver resolver2.DIDResolver + Resolver resolver.DIDResolver } func (r SourceTXKeyResolver) ResolvePublicKey(kid string, sourceTransactionsRefs []hash.SHA256Hash) (crypto.PublicKey, error) { // try all keys, continue when err == types.ErrNotFound for _, h := range sourceTransactionsRefs { - publicKey, err := resolvePublicKey(r.Resolver, kid, resolver2.ResolveMetadata{ + publicKey, err := resolvePublicKey(r.Resolver, kid, resolver.ResolveMetadata{ SourceTransaction: &h, }) if err == nil { return publicKey, nil } - if err != resolver2.ErrNotFound { + if err != resolver.ErrNotFound { return nil, err } } - return nil, resolver2.ErrNotFound + return nil, resolver.ErrNotFound } -func resolvePublicKey(resolver resolver2.DIDResolver, kid string, metadata resolver2.ResolveMetadata) (crypto.PublicKey, error) { +func resolvePublicKey(didResolver resolver.DIDResolver, kid string, metadata resolver.ResolveMetadata) (crypto.PublicKey, error) { id, err := did.ParseDIDURL(kid) if err != nil { return nil, fmt.Errorf("invalid key ID (id=%s): %w", kid, err) } - holder, _ := resolver2.GetDIDFromURL(kid) // can't fail, already parsed - doc, _, err := resolver.Resolve(holder, &metadata) + holder, _ := resolver.GetDIDFromURL(kid) // can't fail, already parsed + doc, _, err := didResolver.Resolve(holder, &metadata) if err != nil { return nil, err } vm := doc.VerificationMethod.FindByID(*id) if vm == nil { - return nil, resolver2.ErrKeyNotFound + return nil, resolver.ErrKeyNotFound } return vm.PublicKey() diff --git a/network/dag/mock.go b/network/dag/mock.go index 5de19ea3f8..5fdfcd2669 100644 --- a/network/dag/mock.go +++ b/network/dag/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: network/dag/interface.go -// -// Generated by this command: -// -// mockgen -destination=network/dag/mock.go -package=dag -source=network/dag/interface.go State -// + // Package dag is a generated GoMock package. package dag @@ -51,7 +47,7 @@ func (m *MockState) Add(ctx context.Context, transactions Transaction, payload [ } // Add indicates an expected call of Add. -func (mr *MockStateMockRecorder) Add(ctx, transactions, payload any) *gomock.Call { +func (mr *MockStateMockRecorder) Add(ctx, transactions, payload interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockState)(nil).Add), ctx, transactions, payload) } @@ -92,7 +88,7 @@ func (m *MockState) FindBetweenLC(ctx context.Context, startInclusive, endExclus } // FindBetweenLC indicates an expected call of FindBetweenLC. -func (mr *MockStateMockRecorder) FindBetweenLC(ctx, startInclusive, endExclusive any) *gomock.Call { +func (mr *MockStateMockRecorder) FindBetweenLC(ctx, startInclusive, endExclusive interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindBetweenLC", reflect.TypeOf((*MockState)(nil).FindBetweenLC), ctx, startInclusive, endExclusive) } @@ -107,7 +103,7 @@ func (m *MockState) GetTransaction(ctx context.Context, hash hash.SHA256Hash) (T } // GetTransaction indicates an expected call of GetTransaction. -func (mr *MockStateMockRecorder) GetTransaction(ctx, hash any) *gomock.Call { +func (mr *MockStateMockRecorder) GetTransaction(ctx, hash interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransaction", reflect.TypeOf((*MockState)(nil).GetTransaction), ctx, hash) } @@ -122,7 +118,7 @@ func (m *MockState) Head(ctx context.Context) (hash.SHA256Hash, error) { } // Head indicates an expected call of Head. -func (mr *MockStateMockRecorder) Head(ctx any) *gomock.Call { +func (mr *MockStateMockRecorder) Head(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Head", reflect.TypeOf((*MockState)(nil).Head), ctx) } @@ -137,7 +133,7 @@ func (m *MockState) IBLT(reqClock uint32) (tree.Iblt, uint32) { } // IBLT indicates an expected call of IBLT. -func (mr *MockStateMockRecorder) IBLT(reqClock any) *gomock.Call { +func (mr *MockStateMockRecorder) IBLT(reqClock interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IBLT", reflect.TypeOf((*MockState)(nil).IBLT), reqClock) } @@ -164,7 +160,7 @@ func (m *MockState) IsPayloadPresent(ctx context.Context, payloadHash hash.SHA25 } // IsPayloadPresent indicates an expected call of IsPayloadPresent. -func (mr *MockStateMockRecorder) IsPayloadPresent(ctx, payloadHash any) *gomock.Call { +func (mr *MockStateMockRecorder) IsPayloadPresent(ctx, payloadHash interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsPayloadPresent", reflect.TypeOf((*MockState)(nil).IsPayloadPresent), ctx, payloadHash) } @@ -179,7 +175,7 @@ func (m *MockState) IsPresent(arg0 context.Context, arg1 hash.SHA256Hash) (bool, } // IsPresent indicates an expected call of IsPresent. -func (mr *MockStateMockRecorder) IsPresent(arg0, arg1 any) *gomock.Call { +func (mr *MockStateMockRecorder) IsPresent(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsPresent", reflect.TypeOf((*MockState)(nil).IsPresent), arg0, arg1) } @@ -201,7 +197,7 @@ func (mr *MockStateMockRecorder) Migrate() *gomock.Call { // Notifier mocks base method. func (m *MockState) Notifier(name string, receiver ReceiverFn, filters ...NotifierOption) (Notifier, error) { m.ctrl.T.Helper() - varargs := []any{name, receiver} + varargs := []interface{}{name, receiver} for _, a := range filters { varargs = append(varargs, a) } @@ -212,9 +208,9 @@ func (m *MockState) Notifier(name string, receiver ReceiverFn, filters ...Notifi } // Notifier indicates an expected call of Notifier. -func (mr *MockStateMockRecorder) Notifier(name, receiver any, filters ...any) *gomock.Call { +func (mr *MockStateMockRecorder) Notifier(name, receiver interface{}, filters ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{name, receiver}, filters...) + varargs := append([]interface{}{name, receiver}, filters...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Notifier", reflect.TypeOf((*MockState)(nil).Notifier), varargs...) } @@ -242,7 +238,7 @@ func (m *MockState) ReadPayload(ctx context.Context, payloadHash hash.SHA256Hash } // ReadPayload indicates an expected call of ReadPayload. -func (mr *MockStateMockRecorder) ReadPayload(ctx, payloadHash any) *gomock.Call { +func (mr *MockStateMockRecorder) ReadPayload(ctx, payloadHash interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadPayload", reflect.TypeOf((*MockState)(nil).ReadPayload), ctx, payloadHash) } @@ -284,7 +280,7 @@ func (m *MockState) Verify(ctx context.Context) error { } // Verify indicates an expected call of Verify. -func (mr *MockStateMockRecorder) Verify(ctx any) *gomock.Call { +func (mr *MockStateMockRecorder) Verify(ctx interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockState)(nil).Verify), ctx) } @@ -298,7 +294,7 @@ func (m *MockState) WritePayload(ctx context.Context, transaction Transaction, p } // WritePayload indicates an expected call of WritePayload. -func (mr *MockStateMockRecorder) WritePayload(ctx, transaction, payloadHash, data any) *gomock.Call { +func (mr *MockStateMockRecorder) WritePayload(ctx, transaction, payloadHash, data interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WritePayload", reflect.TypeOf((*MockState)(nil).WritePayload), ctx, transaction, payloadHash, data) } @@ -313,7 +309,7 @@ func (m *MockState) XOR(reqClock uint32) (hash.SHA256Hash, uint32) { } // XOR indicates an expected call of XOR. -func (mr *MockStateMockRecorder) XOR(reqClock any) *gomock.Call { +func (mr *MockStateMockRecorder) XOR(reqClock interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "XOR", reflect.TypeOf((*MockState)(nil).XOR), reqClock) } @@ -350,7 +346,7 @@ func (m *MockPayloadStore) isPayloadPresent(tx stoabs.ReadTx, payloadHash hash.S } // isPayloadPresent indicates an expected call of isPayloadPresent. -func (mr *MockPayloadStoreMockRecorder) isPayloadPresent(tx, payloadHash any) *gomock.Call { +func (mr *MockPayloadStoreMockRecorder) isPayloadPresent(tx, payloadHash interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "isPayloadPresent", reflect.TypeOf((*MockPayloadStore)(nil).isPayloadPresent), tx, payloadHash) } @@ -365,7 +361,7 @@ func (m *MockPayloadStore) readPayload(tx stoabs.ReadTx, payloadHash hash.SHA256 } // readPayload indicates an expected call of readPayload. -func (mr *MockPayloadStoreMockRecorder) readPayload(tx, payloadHash any) *gomock.Call { +func (mr *MockPayloadStoreMockRecorder) readPayload(tx, payloadHash interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "readPayload", reflect.TypeOf((*MockPayloadStore)(nil).readPayload), tx, payloadHash) } @@ -379,7 +375,7 @@ func (m *MockPayloadStore) writePayload(tx stoabs.WriteTx, payloadHash hash.SHA2 } // writePayload indicates an expected call of writePayload. -func (mr *MockPayloadStoreMockRecorder) writePayload(tx, payloadHash, data any) *gomock.Call { +func (mr *MockPayloadStoreMockRecorder) writePayload(tx, payloadHash, data interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "writePayload", reflect.TypeOf((*MockPayloadStore)(nil).writePayload), tx, payloadHash, data) } diff --git a/network/dag/notifier_mock.go b/network/dag/notifier_mock.go index ede58268c1..19287da987 100644 --- a/network/dag/notifier_mock.go +++ b/network/dag/notifier_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: network/dag/notifier.go -// -// Generated by this command: -// -// mockgen -destination=network/dag/notifier_mock.go -package=dag -source=network/dag/notifier.go Notifier -// + // Package dag is a generated GoMock package. package dag @@ -62,7 +58,7 @@ func (m *MockNotifier) Finished(hash hash.SHA256Hash) error { } // Finished indicates an expected call of Finished. -func (mr *MockNotifierMockRecorder) Finished(hash any) *gomock.Call { +func (mr *MockNotifierMockRecorder) Finished(hash interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Finished", reflect.TypeOf((*MockNotifier)(nil).Finished), hash) } @@ -103,7 +99,7 @@ func (m *MockNotifier) Notify(event Event) { } // Notify indicates an expected call of Notify. -func (mr *MockNotifierMockRecorder) Notify(event any) *gomock.Call { +func (mr *MockNotifierMockRecorder) Notify(event interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Notify", reflect.TypeOf((*MockNotifier)(nil).Notify), event) } @@ -131,7 +127,7 @@ func (m *MockNotifier) Save(tx stoabs.WriteTx, event Event) error { } // Save indicates an expected call of Save. -func (mr *MockNotifierMockRecorder) Save(tx, event any) *gomock.Call { +func (mr *MockNotifierMockRecorder) Save(tx, event interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockNotifier)(nil).Save), tx, event) } diff --git a/network/mock.go b/network/mock.go index 627b5f109f..76eaf13b69 100644 --- a/network/mock.go +++ b/network/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: network/interface.go -// -// Generated by this command: -// -// mockgen -destination=network/mock.go -package=network -source=network/interface.go -// + // Package network is a generated GoMock package. package network @@ -65,7 +61,7 @@ func (m *MockTransactions) CleanupSubscriberEvents(subcriberName, errorPrefix st } // CleanupSubscriberEvents indicates an expected call of CleanupSubscriberEvents. -func (mr *MockTransactionsMockRecorder) CleanupSubscriberEvents(subcriberName, errorPrefix any) *gomock.Call { +func (mr *MockTransactionsMockRecorder) CleanupSubscriberEvents(subcriberName, errorPrefix interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CleanupSubscriberEvents", reflect.TypeOf((*MockTransactions)(nil).CleanupSubscriberEvents), subcriberName, errorPrefix) } @@ -80,7 +76,7 @@ func (m *MockTransactions) CreateTransaction(ctx context.Context, spec Template) } // CreateTransaction indicates an expected call of CreateTransaction. -func (mr *MockTransactionsMockRecorder) CreateTransaction(ctx, spec any) *gomock.Call { +func (mr *MockTransactionsMockRecorder) CreateTransaction(ctx, spec interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTransaction", reflect.TypeOf((*MockTransactions)(nil).CreateTransaction), ctx, spec) } @@ -92,7 +88,7 @@ func (m *MockTransactions) DiscoverServices(updatedDID did.DID) { } // DiscoverServices indicates an expected call of DiscoverServices. -func (mr *MockTransactionsMockRecorder) DiscoverServices(updatedDID any) *gomock.Call { +func (mr *MockTransactionsMockRecorder) DiscoverServices(updatedDID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DiscoverServices", reflect.TypeOf((*MockTransactions)(nil).DiscoverServices), updatedDID) } @@ -107,7 +103,7 @@ func (m *MockTransactions) GetTransaction(transactionRef hash.SHA256Hash) (dag.T } // GetTransaction indicates an expected call of GetTransaction. -func (mr *MockTransactionsMockRecorder) GetTransaction(transactionRef any) *gomock.Call { +func (mr *MockTransactionsMockRecorder) GetTransaction(transactionRef interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransaction", reflect.TypeOf((*MockTransactions)(nil).GetTransaction), transactionRef) } @@ -122,7 +118,7 @@ func (m *MockTransactions) GetTransactionPayload(transactionRef hash.SHA256Hash) } // GetTransactionPayload indicates an expected call of GetTransactionPayload. -func (mr *MockTransactionsMockRecorder) GetTransactionPayload(transactionRef any) *gomock.Call { +func (mr *MockTransactionsMockRecorder) GetTransactionPayload(transactionRef interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransactionPayload", reflect.TypeOf((*MockTransactions)(nil).GetTransactionPayload), transactionRef) } @@ -137,7 +133,7 @@ func (m *MockTransactions) ListTransactionsInRange(startInclusive, endExclusive } // ListTransactionsInRange indicates an expected call of ListTransactionsInRange. -func (mr *MockTransactionsMockRecorder) ListTransactionsInRange(startInclusive, endExclusive any) *gomock.Call { +func (mr *MockTransactionsMockRecorder) ListTransactionsInRange(startInclusive, endExclusive interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListTransactionsInRange", reflect.TypeOf((*MockTransactions)(nil).ListTransactionsInRange), startInclusive, endExclusive) } @@ -166,7 +162,7 @@ func (m *MockTransactions) Reprocess(ctx context.Context, contentType string) (* } // Reprocess indicates an expected call of Reprocess. -func (mr *MockTransactionsMockRecorder) Reprocess(ctx, contentType any) *gomock.Call { +func (mr *MockTransactionsMockRecorder) Reprocess(ctx, contentType interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reprocess", reflect.TypeOf((*MockTransactions)(nil).Reprocess), ctx, contentType) } @@ -174,7 +170,7 @@ func (mr *MockTransactionsMockRecorder) Reprocess(ctx, contentType any) *gomock. // Subscribe mocks base method. func (m *MockTransactions) Subscribe(name string, receiver dag.ReceiverFn, filters ...SubscriberOption) error { m.ctrl.T.Helper() - varargs := []any{name, receiver} + varargs := []interface{}{name, receiver} for _, a := range filters { varargs = append(varargs, a) } @@ -184,9 +180,9 @@ func (m *MockTransactions) Subscribe(name string, receiver dag.ReceiverFn, filte } // Subscribe indicates an expected call of Subscribe. -func (mr *MockTransactionsMockRecorder) Subscribe(name, receiver any, filters ...any) *gomock.Call { +func (mr *MockTransactionsMockRecorder) Subscribe(name, receiver interface{}, filters ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{name, receiver}, filters...) + varargs := append([]interface{}{name, receiver}, filters...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockTransactions)(nil).Subscribe), varargs...) } diff --git a/network/transport/connection_manager_mock.go b/network/transport/connection_manager_mock.go index da0d360e03..37e1631986 100644 --- a/network/transport/connection_manager_mock.go +++ b/network/transport/connection_manager_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: network/transport/connection_manager.go -// -// Generated by this command: -// -// mockgen -destination=network/transport/connection_manager_mock.go -package=transport -source=network/transport/connection_manager.go -// + // Package transport is a generated GoMock package. package transport @@ -47,7 +43,7 @@ func (m *MockConnectionManager) Connect(peerAddress string, peerDID did.DID, del } // Connect indicates an expected call of Connect. -func (mr *MockConnectionManagerMockRecorder) Connect(peerAddress, peerDID, delay any) *gomock.Call { +func (mr *MockConnectionManagerMockRecorder) Connect(peerAddress, peerDID, delay interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connect", reflect.TypeOf((*MockConnectionManager)(nil).Connect), peerAddress, peerDID, delay) } @@ -101,7 +97,7 @@ func (m *MockConnectionManager) RegisterObserver(callback StreamStateObserverFun } // RegisterObserver indicates an expected call of RegisterObserver. -func (mr *MockConnectionManagerMockRecorder) RegisterObserver(callback any) *gomock.Call { +func (mr *MockConnectionManagerMockRecorder) RegisterObserver(callback interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterObserver", reflect.TypeOf((*MockConnectionManager)(nil).RegisterObserver), callback) } diff --git a/network/transport/grpc/authenticator_mock.go b/network/transport/grpc/authenticator_mock.go index baf80fb3a7..f148eb12ed 100644 --- a/network/transport/grpc/authenticator_mock.go +++ b/network/transport/grpc/authenticator_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: network/transport/grpc/authenticator.go -// -// Generated by this command: -// -// mockgen -destination=network/transport/grpc/authenticator_mock.go -package=grpc -source=network/transport/grpc/authenticator.go -// + // Package grpc is a generated GoMock package. package grpc @@ -49,7 +45,7 @@ func (m *MockAuthenticator) Authenticate(nodeDID did.DID, peer transport.Peer) ( } // Authenticate indicates an expected call of Authenticate. -func (mr *MockAuthenticatorMockRecorder) Authenticate(nodeDID, peer any) *gomock.Call { +func (mr *MockAuthenticatorMockRecorder) Authenticate(nodeDID, peer interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Authenticate", reflect.TypeOf((*MockAuthenticator)(nil).Authenticate), nodeDID, peer) } diff --git a/network/transport/grpc/connection_list_mock.go b/network/transport/grpc/connection_list_mock.go index f10b853d37..7a2c6c779a 100644 --- a/network/transport/grpc/connection_list_mock.go +++ b/network/transport/grpc/connection_list_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: network/transport/grpc/connection_list.go -// -// Generated by this command: -// -// mockgen -destination=network/transport/grpc/connection_list_mock.go -package=grpc -source=network/transport/grpc/connection_list.go -// + // Package grpc is a generated GoMock package. package grpc @@ -54,7 +50,7 @@ func (mr *MockConnectionListMockRecorder) All() *gomock.Call { // AllMatching mocks base method. func (m *MockConnectionList) AllMatching(query ...Predicate) []Connection { m.ctrl.T.Helper() - varargs := []any{} + varargs := []interface{}{} for _, a := range query { varargs = append(varargs, a) } @@ -64,7 +60,7 @@ func (m *MockConnectionList) AllMatching(query ...Predicate) []Connection { } // AllMatching indicates an expected call of AllMatching. -func (mr *MockConnectionListMockRecorder) AllMatching(query ...any) *gomock.Call { +func (mr *MockConnectionListMockRecorder) AllMatching(query ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllMatching", reflect.TypeOf((*MockConnectionList)(nil).AllMatching), query...) } @@ -72,7 +68,7 @@ func (mr *MockConnectionListMockRecorder) AllMatching(query ...any) *gomock.Call // Get mocks base method. func (m *MockConnectionList) Get(query ...Predicate) Connection { m.ctrl.T.Helper() - varargs := []any{} + varargs := []interface{}{} for _, a := range query { varargs = append(varargs, a) } @@ -82,7 +78,7 @@ func (m *MockConnectionList) Get(query ...Predicate) Connection { } // Get indicates an expected call of Get. -func (mr *MockConnectionListMockRecorder) Get(query ...any) *gomock.Call { +func (mr *MockConnectionListMockRecorder) Get(query ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockConnectionList)(nil).Get), query...) } diff --git a/network/transport/grpc/connection_mock.go b/network/transport/grpc/connection_mock.go index 5e9d320010..777b61afdd 100644 --- a/network/transport/grpc/connection_mock.go +++ b/network/transport/grpc/connection_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: network/transport/grpc/connection.go -// -// Generated by this command: -// -// mockgen -destination=network/transport/grpc/connection_mock.go -package=grpc -source=network/transport/grpc/connection.go -// + // Package grpc is a generated GoMock package. package grpc @@ -82,7 +78,7 @@ func (mr *MockConnectionMockRecorder) Peer() *gomock.Call { } // Send mocks base method. -func (m *MockConnection) Send(protocol Protocol, envelope any, ignoreSoftLimit bool) error { +func (m *MockConnection) Send(protocol Protocol, envelope interface{}, ignoreSoftLimit bool) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Send", protocol, envelope, ignoreSoftLimit) ret0, _ := ret[0].(error) @@ -90,7 +86,7 @@ func (m *MockConnection) Send(protocol Protocol, envelope any, ignoreSoftLimit b } // Send indicates an expected call of Send. -func (mr *MockConnectionMockRecorder) Send(protocol, envelope, ignoreSoftLimit any) *gomock.Call { +func (mr *MockConnectionMockRecorder) Send(protocol, envelope, ignoreSoftLimit interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockConnection)(nil).Send), protocol, envelope, ignoreSoftLimit) } @@ -130,7 +126,7 @@ func (m *MockConnection) registerStream(protocol Protocol, stream Stream) bool { } // registerStream indicates an expected call of registerStream. -func (mr *MockConnectionMockRecorder) registerStream(protocol, stream any) *gomock.Call { +func (mr *MockConnectionMockRecorder) registerStream(protocol, stream interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "registerStream", reflect.TypeOf((*MockConnection)(nil).registerStream), protocol, stream) } @@ -142,7 +138,7 @@ func (m *MockConnection) setPeer(peer transport.Peer) { } // setPeer indicates an expected call of setPeer. -func (mr *MockConnectionMockRecorder) setPeer(peer any) *gomock.Call { +func (mr *MockConnectionMockRecorder) setPeer(peer interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "setPeer", reflect.TypeOf((*MockConnection)(nil).setPeer), peer) } @@ -156,7 +152,7 @@ func (m *MockConnection) verifyOrSetPeerID(id transport.PeerID) bool { } // verifyOrSetPeerID indicates an expected call of verifyOrSetPeerID. -func (mr *MockConnectionMockRecorder) verifyOrSetPeerID(id any) *gomock.Call { +func (mr *MockConnectionMockRecorder) verifyOrSetPeerID(id interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "verifyOrSetPeerID", reflect.TypeOf((*MockConnection)(nil).verifyOrSetPeerID), id) } diff --git a/network/transport/grpc/interface_mock.go b/network/transport/grpc/interface_mock.go index 049e5afcdd..4ba29b6321 100644 --- a/network/transport/grpc/interface_mock.go +++ b/network/transport/grpc/interface_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: network/transport/grpc/interface.go -// -// Generated by this command: -// -// mockgen -destination=network/transport/grpc/interface_mock.go -package=grpc -source=network/transport/grpc/interface.go -// + // Package grpc is a generated GoMock package. package grpc @@ -51,7 +47,7 @@ func (m *MockProtocol) Configure(peerID transport.PeerID) error { } // Configure indicates an expected call of Configure. -func (mr *MockProtocolMockRecorder) Configure(peerID any) *gomock.Call { +func (mr *MockProtocolMockRecorder) Configure(peerID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Configure", reflect.TypeOf((*MockProtocol)(nil).Configure), peerID) } @@ -66,16 +62,16 @@ func (m *MockProtocol) CreateClientStream(outgoingContext context.Context, grpcC } // CreateClientStream indicates an expected call of CreateClientStream. -func (mr *MockProtocolMockRecorder) CreateClientStream(outgoingContext, grpcConn any) *gomock.Call { +func (mr *MockProtocolMockRecorder) CreateClientStream(outgoingContext, grpcConn interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateClientStream", reflect.TypeOf((*MockProtocol)(nil).CreateClientStream), outgoingContext, grpcConn) } // CreateEnvelope mocks base method. -func (m *MockProtocol) CreateEnvelope() any { +func (m *MockProtocol) CreateEnvelope() interface{} { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CreateEnvelope") - ret0, _ := ret[0].(any) + ret0, _ := ret[0].(interface{}) return ret0 } @@ -100,7 +96,7 @@ func (mr *MockProtocolMockRecorder) Diagnostics() *gomock.Call { } // GetMessageType mocks base method. -func (m *MockProtocol) GetMessageType(envelope any) string { +func (m *MockProtocol) GetMessageType(envelope interface{}) string { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetMessageType", envelope) ret0, _ := ret[0].(string) @@ -108,13 +104,13 @@ func (m *MockProtocol) GetMessageType(envelope any) string { } // GetMessageType indicates an expected call of GetMessageType. -func (mr *MockProtocolMockRecorder) GetMessageType(envelope any) *gomock.Call { +func (mr *MockProtocolMockRecorder) GetMessageType(envelope interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMessageType", reflect.TypeOf((*MockProtocol)(nil).GetMessageType), envelope) } // Handle mocks base method. -func (m *MockProtocol) Handle(connection Connection, envelope any) error { +func (m *MockProtocol) Handle(connection Connection, envelope interface{}) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Handle", connection, envelope) ret0, _ := ret[0].(error) @@ -122,7 +118,7 @@ func (m *MockProtocol) Handle(connection Connection, envelope any) error { } // Handle indicates an expected call of Handle. -func (mr *MockProtocolMockRecorder) Handle(connection, envelope any) *gomock.Call { +func (mr *MockProtocolMockRecorder) Handle(connection, envelope interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Handle", reflect.TypeOf((*MockProtocol)(nil).Handle), connection, envelope) } @@ -162,7 +158,7 @@ func (m *MockProtocol) Register(registrar grpc.ServiceRegistrar, acceptor func(g } // Register indicates an expected call of Register. -func (mr *MockProtocolMockRecorder) Register(registrar, acceptor, connectionList, connectionManager any) *gomock.Call { +func (mr *MockProtocolMockRecorder) Register(registrar, acceptor, connectionList, connectionManager interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockProtocol)(nil).Register), registrar, acceptor, connectionList, connectionManager) } @@ -194,15 +190,15 @@ func (mr *MockProtocolMockRecorder) Stop() *gomock.Call { } // UnwrapMessage mocks base method. -func (m *MockProtocol) UnwrapMessage(envelope any) any { +func (m *MockProtocol) UnwrapMessage(envelope interface{}) interface{} { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UnwrapMessage", envelope) - ret0, _ := ret[0].(any) + ret0, _ := ret[0].(interface{}) return ret0 } // UnwrapMessage indicates an expected call of UnwrapMessage. -func (mr *MockProtocolMockRecorder) UnwrapMessage(envelope any) *gomock.Call { +func (mr *MockProtocolMockRecorder) UnwrapMessage(envelope interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnwrapMessage", reflect.TypeOf((*MockProtocol)(nil).UnwrapMessage), envelope) } @@ -259,7 +255,7 @@ func (mr *MockStreamMockRecorder) Context() *gomock.Call { } // RecvMsg mocks base method. -func (m_2 *MockStream) RecvMsg(m any) error { +func (m_2 *MockStream) RecvMsg(m interface{}) error { m_2.ctrl.T.Helper() ret := m_2.ctrl.Call(m_2, "RecvMsg", m) ret0, _ := ret[0].(error) @@ -267,13 +263,13 @@ func (m_2 *MockStream) RecvMsg(m any) error { } // RecvMsg indicates an expected call of RecvMsg. -func (mr *MockStreamMockRecorder) RecvMsg(m any) *gomock.Call { +func (mr *MockStreamMockRecorder) RecvMsg(m interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockStream)(nil).RecvMsg), m) } // SendMsg mocks base method. -func (m_2 *MockStream) SendMsg(m any) error { +func (m_2 *MockStream) SendMsg(m interface{}) error { m_2.ctrl.T.Helper() ret := m_2.ctrl.Call(m_2, "SendMsg", m) ret0, _ := ret[0].(error) @@ -281,7 +277,7 @@ func (m_2 *MockStream) SendMsg(m any) error { } // SendMsg indicates an expected call of SendMsg. -func (mr *MockStreamMockRecorder) SendMsg(m any) *gomock.Call { +func (mr *MockStreamMockRecorder) SendMsg(m interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockStream)(nil).SendMsg), m) } @@ -312,7 +308,7 @@ func (m *MockConn) EXPECT() *MockConnMockRecorder { // Invoke mocks base method. func (m *MockConn) Invoke(ctx context.Context, method string, args, reply any, opts ...grpc.CallOption) error { m.ctrl.T.Helper() - varargs := []any{ctx, method, args, reply} + varargs := []interface{}{ctx, method, args, reply} for _, a := range opts { varargs = append(varargs, a) } @@ -322,16 +318,16 @@ func (m *MockConn) Invoke(ctx context.Context, method string, args, reply any, o } // Invoke indicates an expected call of Invoke. -func (mr *MockConnMockRecorder) Invoke(ctx, method, args, reply any, opts ...any) *gomock.Call { +func (mr *MockConnMockRecorder) Invoke(ctx, method, args, reply interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{ctx, method, args, reply}, opts...) + varargs := append([]interface{}{ctx, method, args, reply}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Invoke", reflect.TypeOf((*MockConn)(nil).Invoke), varargs...) } // NewStream mocks base method. func (m *MockConn) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) { m.ctrl.T.Helper() - varargs := []any{ctx, desc, method} + varargs := []interface{}{ctx, desc, method} for _, a := range opts { varargs = append(varargs, a) } @@ -342,9 +338,9 @@ func (m *MockConn) NewStream(ctx context.Context, desc *grpc.StreamDesc, method } // NewStream indicates an expected call of NewStream. -func (mr *MockConnMockRecorder) NewStream(ctx, desc, method any, opts ...any) *gomock.Call { +func (mr *MockConnMockRecorder) NewStream(ctx, desc, method interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{ctx, desc, method}, opts...) + varargs := append([]interface{}{ctx, desc, method}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewStream", reflect.TypeOf((*MockConn)(nil).NewStream), varargs...) } @@ -423,7 +419,7 @@ func (m_2 *MockClientStream) RecvMsg(m any) error { } // RecvMsg indicates an expected call of RecvMsg. -func (mr *MockClientStreamMockRecorder) RecvMsg(m any) *gomock.Call { +func (mr *MockClientStreamMockRecorder) RecvMsg(m interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockClientStream)(nil).RecvMsg), m) } @@ -437,7 +433,7 @@ func (m_2 *MockClientStream) SendMsg(m any) error { } // SendMsg indicates an expected call of SendMsg. -func (mr *MockClientStreamMockRecorder) SendMsg(m any) *gomock.Call { +func (mr *MockClientStreamMockRecorder) SendMsg(m interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockClientStream)(nil).SendMsg), m) } diff --git a/network/transport/protocol_mock.go b/network/transport/protocol_mock.go index e1eaeaa6c8..6be3b80aa3 100644 --- a/network/transport/protocol_mock.go +++ b/network/transport/protocol_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: network/transport/protocol.go -// -// Generated by this command: -// -// mockgen -destination=network/transport/protocol_mock.go -package=transport -source=network/transport/protocol.go Protocol -// + // Package transport is a generated GoMock package. package transport @@ -47,7 +43,7 @@ func (m *MockProtocol) Configure(peerID PeerID) error { } // Configure indicates an expected call of Configure. -func (mr *MockProtocolMockRecorder) Configure(peerID any) *gomock.Call { +func (mr *MockProtocolMockRecorder) Configure(peerID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Configure", reflect.TypeOf((*MockProtocol)(nil).Configure), peerID) } diff --git a/network/transport/v2/gossip/mock.go b/network/transport/v2/gossip/mock.go index 74dd2edb2b..f3950c05ba 100644 --- a/network/transport/v2/gossip/mock.go +++ b/network/transport/v2/gossip/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: network/transport/v2/gossip/manager.go -// -// Generated by this command: -// -// mockgen -destination=network/transport/v2/gossip/mock.go -package=gossip -source=network/transport/v2/gossip/manager.go -// + // Package gossip is a generated GoMock package. package gossip @@ -42,7 +38,7 @@ func (m *MockManager) EXPECT() *MockManagerMockRecorder { // GossipReceived mocks base method. func (m *MockManager) GossipReceived(peer transport.Peer, refs ...hash.SHA256Hash) { m.ctrl.T.Helper() - varargs := []any{peer} + varargs := []interface{}{peer} for _, a := range refs { varargs = append(varargs, a) } @@ -50,9 +46,9 @@ func (m *MockManager) GossipReceived(peer transport.Peer, refs ...hash.SHA256Has } // GossipReceived indicates an expected call of GossipReceived. -func (mr *MockManagerMockRecorder) GossipReceived(peer any, refs ...any) *gomock.Call { +func (mr *MockManagerMockRecorder) GossipReceived(peer interface{}, refs ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{peer}, refs...) + varargs := append([]interface{}{peer}, refs...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GossipReceived", reflect.TypeOf((*MockManager)(nil).GossipReceived), varargs...) } @@ -63,7 +59,7 @@ func (m *MockManager) PeerConnected(peer transport.Peer, xor hash.SHA256Hash, cl } // PeerConnected indicates an expected call of PeerConnected. -func (mr *MockManagerMockRecorder) PeerConnected(peer, xor, clock any) *gomock.Call { +func (mr *MockManagerMockRecorder) PeerConnected(peer, xor, clock interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeerConnected", reflect.TypeOf((*MockManager)(nil).PeerConnected), peer, xor, clock) } @@ -75,7 +71,7 @@ func (m *MockManager) PeerDisconnected(peer transport.Peer) { } // PeerDisconnected indicates an expected call of PeerDisconnected. -func (mr *MockManagerMockRecorder) PeerDisconnected(peer any) *gomock.Call { +func (mr *MockManagerMockRecorder) PeerDisconnected(peer interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeerDisconnected", reflect.TypeOf((*MockManager)(nil).PeerDisconnected), peer) } @@ -87,7 +83,7 @@ func (m *MockManager) RegisterSender(arg0 SenderFunc) { } // RegisterSender indicates an expected call of RegisterSender. -func (mr *MockManagerMockRecorder) RegisterSender(arg0 any) *gomock.Call { +func (mr *MockManagerMockRecorder) RegisterSender(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterSender", reflect.TypeOf((*MockManager)(nil).RegisterSender), arg0) } @@ -99,7 +95,7 @@ func (m *MockManager) TransactionRegistered(transaction, xor hash.SHA256Hash, cl } // TransactionRegistered indicates an expected call of TransactionRegistered. -func (mr *MockManagerMockRecorder) TransactionRegistered(transaction, xor, clock any) *gomock.Call { +func (mr *MockManagerMockRecorder) TransactionRegistered(transaction, xor, clock interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransactionRegistered", reflect.TypeOf((*MockManager)(nil).TransactionRegistered), transaction, xor, clock) } diff --git a/network/transport/v2/protocol.go b/network/transport/v2/protocol.go index 025ab31da9..7636a70b5f 100644 --- a/network/transport/v2/protocol.go +++ b/network/transport/v2/protocol.go @@ -24,7 +24,7 @@ import ( "fmt" "github.com/nuts-foundation/go-did/did" "github.com/nuts-foundation/go-stoabs" - vdr "github.com/nuts-foundation/nuts-node/vdr/resolver" + "github.com/nuts-foundation/nuts-node/vdr/resolver" "strings" "sync" "time" @@ -74,7 +74,7 @@ func New( config Config, nodeDID did.DID, state dag.State, - didResolver vdr.DIDResolver, + didResolver resolver.DIDResolver, decrypter crypto.Decrypter, diagnosticsProvider func() transport.Diagnostics, dagStore stoabs.KVStore, @@ -101,7 +101,7 @@ type protocol struct { state dag.State ctx context.Context routines *sync.WaitGroup - didResolver vdr.DIDResolver + didResolver resolver.DIDResolver privatePayloadReceiver dag.Notifier decrypter crypto.Decrypter connectionList grpc.ConnectionList diff --git a/network/transport/v2/senders_mock.go b/network/transport/v2/senders_mock.go index c052d9f076..7d64b02a79 100644 --- a/network/transport/v2/senders_mock.go +++ b/network/transport/v2/senders_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: network/transport/v2/senders.go -// -// Generated by this command: -// -// mockgen -destination=network/transport/v2/senders_mock.go -package=v2 -source=network/transport/v2/senders.go -// + // Package v2 is a generated GoMock package. package v2 @@ -48,7 +44,7 @@ func (m *MockmessageSender) broadcastDiagnostics(diagnostics transport.Diagnosti } // broadcastDiagnostics indicates an expected call of broadcastDiagnostics. -func (mr *MockmessageSenderMockRecorder) broadcastDiagnostics(diagnostics any) *gomock.Call { +func (mr *MockmessageSenderMockRecorder) broadcastDiagnostics(diagnostics interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "broadcastDiagnostics", reflect.TypeOf((*MockmessageSender)(nil).broadcastDiagnostics), diagnostics) } @@ -62,7 +58,7 @@ func (m *MockmessageSender) sendGossipMsg(connection grpc.Connection, refs []has } // sendGossipMsg indicates an expected call of sendGossipMsg. -func (mr *MockmessageSenderMockRecorder) sendGossipMsg(connection, refs, xor, clock any) *gomock.Call { +func (mr *MockmessageSenderMockRecorder) sendGossipMsg(connection, refs, xor, clock interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "sendGossipMsg", reflect.TypeOf((*MockmessageSender)(nil).sendGossipMsg), connection, refs, xor, clock) } @@ -76,7 +72,7 @@ func (m *MockmessageSender) sendState(connection grpc.Connection, xor hash.SHA25 } // sendState indicates an expected call of sendState. -func (mr *MockmessageSenderMockRecorder) sendState(connection, xor, clock any) *gomock.Call { +func (mr *MockmessageSenderMockRecorder) sendState(connection, xor, clock interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "sendState", reflect.TypeOf((*MockmessageSender)(nil).sendState), connection, xor, clock) } @@ -90,7 +86,7 @@ func (m *MockmessageSender) sendTransactionList(connection grpc.Connection, conv } // sendTransactionList indicates an expected call of sendTransactionList. -func (mr *MockmessageSenderMockRecorder) sendTransactionList(connection, conversationID, transactions any) *gomock.Call { +func (mr *MockmessageSenderMockRecorder) sendTransactionList(connection, conversationID, transactions interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "sendTransactionList", reflect.TypeOf((*MockmessageSender)(nil).sendTransactionList), connection, conversationID, transactions) } @@ -104,7 +100,7 @@ func (m *MockmessageSender) sendTransactionListQuery(connection grpc.Connection, } // sendTransactionListQuery indicates an expected call of sendTransactionListQuery. -func (mr *MockmessageSenderMockRecorder) sendTransactionListQuery(connection, refs any) *gomock.Call { +func (mr *MockmessageSenderMockRecorder) sendTransactionListQuery(connection, refs interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "sendTransactionListQuery", reflect.TypeOf((*MockmessageSender)(nil).sendTransactionListQuery), connection, refs) } @@ -118,7 +114,7 @@ func (m *MockmessageSender) sendTransactionRangeQuery(connection grpc.Connection } // sendTransactionRangeQuery indicates an expected call of sendTransactionRangeQuery. -func (mr *MockmessageSenderMockRecorder) sendTransactionRangeQuery(connection, lcStart, lcEnd any) *gomock.Call { +func (mr *MockmessageSenderMockRecorder) sendTransactionRangeQuery(connection, lcStart, lcEnd interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "sendTransactionRangeQuery", reflect.TypeOf((*MockmessageSender)(nil).sendTransactionRangeQuery), connection, lcStart, lcEnd) } @@ -132,7 +128,7 @@ func (m *MockmessageSender) sendTransactionSet(connection grpc.Connection, conve } // sendTransactionSet indicates an expected call of sendTransactionSet. -func (mr *MockmessageSenderMockRecorder) sendTransactionSet(connection, conversationID, LCReq, LC, iblt any) *gomock.Call { +func (mr *MockmessageSenderMockRecorder) sendTransactionSet(connection, conversationID, LCReq, LC, iblt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "sendTransactionSet", reflect.TypeOf((*MockmessageSender)(nil).sendTransactionSet), connection, conversationID, LCReq, LC, iblt) } diff --git a/pki/mock.go b/pki/mock.go index d184cfa1e0..a59e3cbe52 100644 --- a/pki/mock.go +++ b/pki/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: pki/interface.go -// -// Generated by this command: -// -// mockgen -destination=pki/mock.go -package=pki -source=pki/interface.go -// + // Package pki is a generated GoMock package. package pki @@ -62,7 +58,7 @@ func (m *MockDenylist) Subscribe(f func()) { } // Subscribe indicates an expected call of Subscribe. -func (mr *MockDenylistMockRecorder) Subscribe(f any) *gomock.Call { +func (mr *MockDenylistMockRecorder) Subscribe(f interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockDenylist)(nil).Subscribe), f) } @@ -104,7 +100,7 @@ func (m *MockDenylist) ValidateCert(cert *x509.Certificate) error { } // ValidateCert indicates an expected call of ValidateCert. -func (mr *MockDenylistMockRecorder) ValidateCert(cert any) *gomock.Call { +func (mr *MockDenylistMockRecorder) ValidateCert(cert interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateCert", reflect.TypeOf((*MockDenylist)(nil).ValidateCert), cert) } @@ -141,7 +137,7 @@ func (m *MockValidator) AddTruststore(chain []*x509.Certificate) error { } // AddTruststore indicates an expected call of AddTruststore. -func (mr *MockValidatorMockRecorder) AddTruststore(chain any) *gomock.Call { +func (mr *MockValidatorMockRecorder) AddTruststore(chain interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTruststore", reflect.TypeOf((*MockValidator)(nil).AddTruststore), chain) } @@ -155,7 +151,7 @@ func (m *MockValidator) SetVerifyPeerCertificateFunc(config *tls.Config) error { } // SetVerifyPeerCertificateFunc indicates an expected call of SetVerifyPeerCertificateFunc. -func (mr *MockValidatorMockRecorder) SetVerifyPeerCertificateFunc(config any) *gomock.Call { +func (mr *MockValidatorMockRecorder) SetVerifyPeerCertificateFunc(config interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetVerifyPeerCertificateFunc", reflect.TypeOf((*MockValidator)(nil).SetVerifyPeerCertificateFunc), config) } @@ -167,7 +163,7 @@ func (m *MockValidator) SubscribeDenied(f func()) { } // SubscribeDenied indicates an expected call of SubscribeDenied. -func (mr *MockValidatorMockRecorder) SubscribeDenied(f any) *gomock.Call { +func (mr *MockValidatorMockRecorder) SubscribeDenied(f interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeDenied", reflect.TypeOf((*MockValidator)(nil).SubscribeDenied), f) } @@ -181,7 +177,7 @@ func (m *MockValidator) Validate(chain []*x509.Certificate) error { } // Validate indicates an expected call of Validate. -func (mr *MockValidatorMockRecorder) Validate(chain any) *gomock.Call { +func (mr *MockValidatorMockRecorder) Validate(chain interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockValidator)(nil).Validate), chain) } @@ -218,7 +214,7 @@ func (m *MockProvider) AddTruststore(chain []*x509.Certificate) error { } // AddTruststore indicates an expected call of AddTruststore. -func (mr *MockProviderMockRecorder) AddTruststore(chain any) *gomock.Call { +func (mr *MockProviderMockRecorder) AddTruststore(chain interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTruststore", reflect.TypeOf((*MockProvider)(nil).AddTruststore), chain) } @@ -233,7 +229,7 @@ func (m *MockProvider) CreateTLSConfig(cfg core.TLSConfig) (*tls.Config, error) } // CreateTLSConfig indicates an expected call of CreateTLSConfig. -func (mr *MockProviderMockRecorder) CreateTLSConfig(cfg any) *gomock.Call { +func (mr *MockProviderMockRecorder) CreateTLSConfig(cfg interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTLSConfig", reflect.TypeOf((*MockProvider)(nil).CreateTLSConfig), cfg) } @@ -247,7 +243,7 @@ func (m *MockProvider) SetVerifyPeerCertificateFunc(config *tls.Config) error { } // SetVerifyPeerCertificateFunc indicates an expected call of SetVerifyPeerCertificateFunc. -func (mr *MockProviderMockRecorder) SetVerifyPeerCertificateFunc(config any) *gomock.Call { +func (mr *MockProviderMockRecorder) SetVerifyPeerCertificateFunc(config interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetVerifyPeerCertificateFunc", reflect.TypeOf((*MockProvider)(nil).SetVerifyPeerCertificateFunc), config) } @@ -259,7 +255,7 @@ func (m *MockProvider) SubscribeDenied(f func()) { } // SubscribeDenied indicates an expected call of SubscribeDenied. -func (mr *MockProviderMockRecorder) SubscribeDenied(f any) *gomock.Call { +func (mr *MockProviderMockRecorder) SubscribeDenied(f interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeDenied", reflect.TypeOf((*MockProvider)(nil).SubscribeDenied), f) } @@ -273,7 +269,7 @@ func (m *MockProvider) Validate(chain []*x509.Certificate) error { } // Validate indicates an expected call of Validate. -func (mr *MockProviderMockRecorder) Validate(chain any) *gomock.Call { +func (mr *MockProviderMockRecorder) Validate(chain interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockProvider)(nil).Validate), chain) } diff --git a/storage/mock.go b/storage/mock.go index f67a88e420..3f2c3e2d2e 100644 --- a/storage/mock.go +++ b/storage/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: storage/interface.go -// -// Generated by this command: -// -// mockgen -destination=storage/mock.go -package=storage -source=storage/interface.go -// + // Package storage is a generated GoMock package. package storage @@ -48,7 +44,7 @@ func (m *MockEngine) Configure(config core.ServerConfig) error { } // Configure indicates an expected call of Configure. -func (mr *MockEngineMockRecorder) Configure(config any) *gomock.Call { +func (mr *MockEngineMockRecorder) Configure(config interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Configure", reflect.TypeOf((*MockEngine)(nil).Configure), config) } @@ -62,7 +58,7 @@ func (m *MockEngine) GetProvider(moduleName string) Provider { } // GetProvider indicates an expected call of GetProvider. -func (mr *MockEngineMockRecorder) GetProvider(moduleName any) *gomock.Call { +func (mr *MockEngineMockRecorder) GetProvider(moduleName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProvider", reflect.TypeOf((*MockEngine)(nil).GetProvider), moduleName) } @@ -128,7 +124,7 @@ func (m *MockProvider) GetKVStore(name string, class Class) (stoabs.KVStore, err } // GetKVStore indicates an expected call of GetKVStore. -func (mr *MockProviderMockRecorder) GetKVStore(name, class any) *gomock.Call { +func (mr *MockProviderMockRecorder) GetKVStore(name, class interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetKVStore", reflect.TypeOf((*MockProvider)(nil).GetKVStore), name, class) } @@ -178,7 +174,7 @@ func (m *Mockdatabase) createStore(moduleName, storeName string) (stoabs.KVStore } // createStore indicates an expected call of createStore. -func (mr *MockdatabaseMockRecorder) createStore(moduleName, storeName any) *gomock.Call { +func (mr *MockdatabaseMockRecorder) createStore(moduleName, storeName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "createStore", reflect.TypeOf((*Mockdatabase)(nil).createStore), moduleName, storeName) } diff --git a/vcr/holder/mock.go b/vcr/holder/mock.go index 4ea283f52b..96829a7c28 100644 --- a/vcr/holder/mock.go +++ b/vcr/holder/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: vcr/holder/interface.go -// -// Generated by this command: -// -// mockgen -destination=vcr/holder/mock.go -package=holder -source=vcr/holder/interface.go -// + // Package holder is a generated GoMock package. package holder @@ -51,7 +47,7 @@ func (m *MockWallet) BuildPresentation(ctx context.Context, credentials []vc.Ver } // BuildPresentation indicates an expected call of BuildPresentation. -func (mr *MockWalletMockRecorder) BuildPresentation(ctx, credentials, options, signerDID, validateVC any) *gomock.Call { +func (mr *MockWalletMockRecorder) BuildPresentation(ctx, credentials, options, signerDID, validateVC interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildPresentation", reflect.TypeOf((*MockWallet)(nil).BuildPresentation), ctx, credentials, options, signerDID, validateVC) } @@ -95,7 +91,7 @@ func (m *MockWallet) List(ctx context.Context, holderDID did.DID) ([]vc.Verifiab } // List indicates an expected call of List. -func (mr *MockWalletMockRecorder) List(ctx, holderDID any) *gomock.Call { +func (mr *MockWalletMockRecorder) List(ctx, holderDID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockWallet)(nil).List), ctx, holderDID) } @@ -103,7 +99,7 @@ func (mr *MockWalletMockRecorder) List(ctx, holderDID any) *gomock.Call { // Put mocks base method. func (m *MockWallet) Put(ctx context.Context, credentials ...vc.VerifiableCredential) error { m.ctrl.T.Helper() - varargs := []any{ctx} + varargs := []interface{}{ctx} for _, a := range credentials { varargs = append(varargs, a) } @@ -113,8 +109,8 @@ func (m *MockWallet) Put(ctx context.Context, credentials ...vc.VerifiableCreden } // Put indicates an expected call of Put. -func (mr *MockWalletMockRecorder) Put(ctx any, credentials ...any) *gomock.Call { +func (mr *MockWalletMockRecorder) Put(ctx interface{}, credentials ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{ctx}, credentials...) + varargs := append([]interface{}{ctx}, credentials...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockWallet)(nil).Put), varargs...) } diff --git a/vcr/holder/openid_mock.go b/vcr/holder/openid_mock.go index c3a992f738..7ac57f4d5c 100644 --- a/vcr/holder/openid_mock.go +++ b/vcr/holder/openid_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: vcr/holder/openid.go -// -// Generated by this command: -// -// mockgen -destination=vcr/holder/openid_mock.go -package=holder -source=vcr/holder/openid.go -// + // Package holder is a generated GoMock package. package holder @@ -48,7 +44,7 @@ func (m *MockOpenIDHandler) HandleCredentialOffer(ctx context.Context, offer ope } // HandleCredentialOffer indicates an expected call of HandleCredentialOffer. -func (mr *MockOpenIDHandlerMockRecorder) HandleCredentialOffer(ctx, offer any) *gomock.Call { +func (mr *MockOpenIDHandlerMockRecorder) HandleCredentialOffer(ctx, offer interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleCredentialOffer", reflect.TypeOf((*MockOpenIDHandler)(nil).HandleCredentialOffer), ctx, offer) } diff --git a/vcr/issuer/issuer.go b/vcr/issuer/issuer.go index fa6ee6a74a..100c6062e0 100644 --- a/vcr/issuer/issuer.go +++ b/vcr/issuer/issuer.go @@ -23,7 +23,7 @@ import ( "encoding/json" "fmt" "github.com/nuts-foundation/nuts-node/vcr/openid4vci" - resolver2 "github.com/nuts-foundation/nuts-node/vdr/resolver" + "github.com/nuts-foundation/nuts-node/vdr/resolver" "time" "github.com/google/uuid" @@ -52,10 +52,10 @@ var TimeFunc = time.Now // See https://github.com/nuts-foundation/nuts-node/issues/2063 func NewIssuer(store Store, vcrStore types.Writer, networkPublisher Publisher, openidHandlerFn func(ctx context.Context, id did.DID) (OpenIDHandler, error), - didResolver resolver2.DIDResolver, keyStore crypto.KeyStore, jsonldManager jsonld.JSONLD, trustConfig *trust.Config, + didResolver resolver.DIDResolver, keyStore crypto.KeyStore, jsonldManager jsonld.JSONLD, trustConfig *trust.Config, ) Issuer { - resolver := vdrKeyResolver{ - publicKeyResolver: resolver2.DIDKeyResolver{Resolver: didResolver}, + keyResolver := vdrKeyResolver{ + publicKeyResolver: resolver.DIDKeyResolver{Resolver: didResolver}, privateKeyResolver: keyStore, } return &issuer{ @@ -63,9 +63,9 @@ func NewIssuer(store Store, vcrStore types.Writer, networkPublisher Publisher, networkPublisher: networkPublisher, openidHandlerFn: openidHandlerFn, walletResolver: openid4vci.DIDIdentifierResolver{ - ServiceResolver: resolver2.DIDServiceResolver{Resolver: didResolver}, + ServiceResolver: resolver.DIDServiceResolver{Resolver: didResolver}, }, - keyResolver: resolver, + keyResolver: keyResolver, keyStore: keyStore, jsonldManager: jsonldManager, trustConfig: trustConfig, @@ -77,7 +77,7 @@ type issuer struct { store Store networkPublisher Publisher openidHandlerFn func(ctx context.Context, id did.DID) (OpenIDHandler, error) - serviceResolver resolver2.ServiceResolver + serviceResolver resolver.ServiceResolver keyResolver keyResolver keyStore crypto.KeyStore trustConfig *trust.Config @@ -193,7 +193,7 @@ func (i issuer) buildVC(ctx context.Context, credentialOptions vc.VerifiableCred if err != nil { const errString = "failed to sign credential: could not resolve an assertionKey for issuer: %w" // Differentiate between a DID document not found and some other error: - if resolver2.IsFunctionalResolveError(err) { + if resolver.IsFunctionalResolveError(err) { return nil, core.InvalidInputError(errString, err) } return nil, fmt.Errorf(errString, err) @@ -297,7 +297,7 @@ func (i issuer) buildRevocation(ctx context.Context, credentialID ssi.URI) (*cre if err != nil { const errString = "failed to revoke credential (%s): could not resolve an assertionKey for issuer: %w" // Differentiate between a DID document not found and some other error: - if resolver2.IsFunctionalResolveError(err) { + if resolver.IsFunctionalResolveError(err) { return nil, core.InvalidInputError(errString, credentialID, err) } return nil, fmt.Errorf(errString, credentialID, err) diff --git a/vcr/issuer/issuer_test.go b/vcr/issuer/issuer_test.go index b561a4df93..ab5f4b3569 100644 --- a/vcr/issuer/issuer_test.go +++ b/vcr/issuer/issuer_test.go @@ -26,7 +26,7 @@ import ( "github.com/nuts-foundation/nuts-node/audit" "github.com/nuts-foundation/nuts-node/core" "github.com/nuts-foundation/nuts-node/vcr/openid4vci" - vdr "github.com/nuts-foundation/nuts-node/vdr/resolver" + "github.com/nuts-foundation/nuts-node/vdr/resolver" "github.com/stretchr/testify/require" "path" "testing" @@ -158,7 +158,7 @@ func Test_issuer_buildVC(t *testing.T) { ctrl := gomock.NewController(t) keyResolverMock := NewMockkeyResolver(ctrl) - keyResolverMock.EXPECT().ResolveAssertionKey(ctx, *issuerDID).Return(nil, vdr.ErrNotFound) + keyResolverMock.EXPECT().ResolveAssertionKey(ctx, *issuerDID).Return(nil, resolver.ErrNotFound) sut := issuer{keyResolver: keyResolverMock} credentialOptions := vc.VerifiableCredential{ @@ -479,7 +479,7 @@ _:c14n0 . ctrl := gomock.NewController(t) keyResolverMock := NewMockkeyResolver(ctrl) - keyResolverMock.EXPECT().ResolveAssertionKey(ctx, issuerDID).Return(nil, vdr.ErrNotFound) + keyResolverMock.EXPECT().ResolveAssertionKey(ctx, issuerDID).Return(nil, resolver.ErrNotFound) sut := issuer{keyResolver: keyResolverMock} _, err := sut.buildRevocation(ctx, *testVC.ID) diff --git a/vcr/issuer/mock.go b/vcr/issuer/mock.go index d41c9326d3..d0987f97b0 100644 --- a/vcr/issuer/mock.go +++ b/vcr/issuer/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: vcr/issuer/interface.go -// -// Generated by this command: -// -// mockgen -destination=vcr/issuer/mock.go -package=issuer -source=vcr/issuer/interface.go -// + // Package issuer is a generated GoMock package. package issuer @@ -53,7 +49,7 @@ func (m *MockPublisher) PublishCredential(ctx context.Context, verifiableCredent } // PublishCredential indicates an expected call of PublishCredential. -func (mr *MockPublisherMockRecorder) PublishCredential(ctx, verifiableCredential, public any) *gomock.Call { +func (mr *MockPublisherMockRecorder) PublishCredential(ctx, verifiableCredential, public interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishCredential", reflect.TypeOf((*MockPublisher)(nil).PublishCredential), ctx, verifiableCredential, public) } @@ -67,7 +63,7 @@ func (m *MockPublisher) PublishRevocation(ctx context.Context, revocation creden } // PublishRevocation indicates an expected call of PublishRevocation. -func (mr *MockPublisherMockRecorder) PublishRevocation(ctx, revocation any) *gomock.Call { +func (mr *MockPublisherMockRecorder) PublishRevocation(ctx, revocation interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishRevocation", reflect.TypeOf((*MockPublisher)(nil).PublishRevocation), ctx, revocation) } @@ -105,7 +101,7 @@ func (m *MockkeyResolver) ResolveAssertionKey(ctx context.Context, issuerDID did } // ResolveAssertionKey indicates an expected call of ResolveAssertionKey. -func (mr *MockkeyResolverMockRecorder) ResolveAssertionKey(ctx, issuerDID any) *gomock.Call { +func (mr *MockkeyResolverMockRecorder) ResolveAssertionKey(ctx, issuerDID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResolveAssertionKey", reflect.TypeOf((*MockkeyResolver)(nil).ResolveAssertionKey), ctx, issuerDID) } @@ -143,7 +139,7 @@ func (m *MockIssuer) Issue(ctx context.Context, unsignedCredential vc.Verifiable } // Issue indicates an expected call of Issue. -func (mr *MockIssuerMockRecorder) Issue(ctx, unsignedCredential, publish, public any) *gomock.Call { +func (mr *MockIssuerMockRecorder) Issue(ctx, unsignedCredential, publish, public interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Issue", reflect.TypeOf((*MockIssuer)(nil).Issue), ctx, unsignedCredential, publish, public) } @@ -158,7 +154,7 @@ func (m *MockIssuer) Revoke(ctx context.Context, credentialID ssi.URI) (*credent } // Revoke indicates an expected call of Revoke. -func (mr *MockIssuerMockRecorder) Revoke(ctx, credentialID any) *gomock.Call { +func (mr *MockIssuerMockRecorder) Revoke(ctx, credentialID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revoke", reflect.TypeOf((*MockIssuer)(nil).Revoke), ctx, credentialID) } @@ -173,7 +169,7 @@ func (m *MockIssuer) SearchCredential(credentialType ssi.URI, issuer did.DID, su } // SearchCredential indicates an expected call of SearchCredential. -func (mr *MockIssuerMockRecorder) SearchCredential(credentialType, issuer, subject any) *gomock.Call { +func (mr *MockIssuerMockRecorder) SearchCredential(credentialType, issuer, subject interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SearchCredential", reflect.TypeOf((*MockIssuer)(nil).SearchCredential), credentialType, issuer, subject) } @@ -239,7 +235,7 @@ func (m *MockStore) GetCredential(id ssi.URI) (*vc.VerifiableCredential, error) } // GetCredential indicates an expected call of GetCredential. -func (mr *MockStoreMockRecorder) GetCredential(id any) *gomock.Call { +func (mr *MockStoreMockRecorder) GetCredential(id interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCredential", reflect.TypeOf((*MockStore)(nil).GetCredential), id) } @@ -254,7 +250,7 @@ func (m *MockStore) GetRevocation(id ssi.URI) (*credential.Revocation, error) { } // GetRevocation indicates an expected call of GetRevocation. -func (mr *MockStoreMockRecorder) GetRevocation(id any) *gomock.Call { +func (mr *MockStoreMockRecorder) GetRevocation(id interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRevocation", reflect.TypeOf((*MockStore)(nil).GetRevocation), id) } @@ -269,7 +265,7 @@ func (m *MockStore) SearchCredential(credentialType ssi.URI, issuer did.DID, sub } // SearchCredential indicates an expected call of SearchCredential. -func (mr *MockStoreMockRecorder) SearchCredential(credentialType, issuer, subject any) *gomock.Call { +func (mr *MockStoreMockRecorder) SearchCredential(credentialType, issuer, subject interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SearchCredential", reflect.TypeOf((*MockStore)(nil).SearchCredential), credentialType, issuer, subject) } @@ -283,7 +279,7 @@ func (m *MockStore) StoreCredential(vc vc.VerifiableCredential) error { } // StoreCredential indicates an expected call of StoreCredential. -func (mr *MockStoreMockRecorder) StoreCredential(vc any) *gomock.Call { +func (mr *MockStoreMockRecorder) StoreCredential(vc interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoreCredential", reflect.TypeOf((*MockStore)(nil).StoreCredential), vc) } @@ -297,7 +293,7 @@ func (m *MockStore) StoreRevocation(r credential.Revocation) error { } // StoreRevocation indicates an expected call of StoreRevocation. -func (mr *MockStoreMockRecorder) StoreRevocation(r any) *gomock.Call { +func (mr *MockStoreMockRecorder) StoreRevocation(r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoreRevocation", reflect.TypeOf((*MockStore)(nil).StoreRevocation), r) } @@ -335,7 +331,7 @@ func (m *MockCredentialSearcher) SearchCredential(credentialType ssi.URI, issuer } // SearchCredential indicates an expected call of SearchCredential. -func (mr *MockCredentialSearcherMockRecorder) SearchCredential(credentialType, issuer, subject any) *gomock.Call { +func (mr *MockCredentialSearcherMockRecorder) SearchCredential(credentialType, issuer, subject interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SearchCredential", reflect.TypeOf((*MockCredentialSearcher)(nil).SearchCredential), credentialType, issuer, subject) } diff --git a/vcr/issuer/openid_mock.go b/vcr/issuer/openid_mock.go index 60678f126e..1785bb3d62 100644 --- a/vcr/issuer/openid_mock.go +++ b/vcr/issuer/openid_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: vcr/issuer/openid.go -// -// Generated by this command: -// -// mockgen -destination=vcr/issuer/openid_mock.go -package=issuer -source=vcr/issuer/openid.go -// + // Package issuer is a generated GoMock package. package issuer @@ -51,7 +47,7 @@ func (m *MockOpenIDHandler) HandleAccessTokenRequest(ctx context.Context, preAut } // HandleAccessTokenRequest indicates an expected call of HandleAccessTokenRequest. -func (mr *MockOpenIDHandlerMockRecorder) HandleAccessTokenRequest(ctx, preAuthorizedCode any) *gomock.Call { +func (mr *MockOpenIDHandlerMockRecorder) HandleAccessTokenRequest(ctx, preAuthorizedCode interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleAccessTokenRequest", reflect.TypeOf((*MockOpenIDHandler)(nil).HandleAccessTokenRequest), ctx, preAuthorizedCode) } @@ -66,7 +62,7 @@ func (m *MockOpenIDHandler) HandleCredentialRequest(ctx context.Context, request } // HandleCredentialRequest indicates an expected call of HandleCredentialRequest. -func (mr *MockOpenIDHandlerMockRecorder) HandleCredentialRequest(ctx, request, accessToken any) *gomock.Call { +func (mr *MockOpenIDHandlerMockRecorder) HandleCredentialRequest(ctx, request, accessToken interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleCredentialRequest", reflect.TypeOf((*MockOpenIDHandler)(nil).HandleCredentialRequest), ctx, request, accessToken) } @@ -94,7 +90,7 @@ func (m *MockOpenIDHandler) OfferCredential(ctx context.Context, credential vc.V } // OfferCredential indicates an expected call of OfferCredential. -func (mr *MockOpenIDHandlerMockRecorder) OfferCredential(ctx, credential, walletIdentifier any) *gomock.Call { +func (mr *MockOpenIDHandlerMockRecorder) OfferCredential(ctx, credential, walletIdentifier interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferCredential", reflect.TypeOf((*MockOpenIDHandler)(nil).OfferCredential), ctx, credential, walletIdentifier) } diff --git a/vcr/mock.go b/vcr/mock.go index 91ac316497..8334ea07c9 100644 --- a/vcr/mock.go +++ b/vcr/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: vcr/interface.go -// -// Generated by this command: -// -// mockgen -destination=vcr/mock.go -package=vcr -source=vcr/interface.go -// + // Package vcr is a generated GoMock package. package vcr @@ -55,7 +51,7 @@ func (m *MockFinder) Search(ctx context.Context, searchTerms []SearchTerm, allow } // Search indicates an expected call of Search. -func (mr *MockFinderMockRecorder) Search(ctx, searchTerms, allowUntrusted, resolveTime any) *gomock.Call { +func (mr *MockFinderMockRecorder) Search(ctx, searchTerms, allowUntrusted, resolveTime interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Search", reflect.TypeOf((*MockFinder)(nil).Search), ctx, searchTerms, allowUntrusted, resolveTime) } @@ -92,7 +88,7 @@ func (m *MockTrustManager) Trust(credentialType, issuer ssi.URI) error { } // Trust indicates an expected call of Trust. -func (mr *MockTrustManagerMockRecorder) Trust(credentialType, issuer any) *gomock.Call { +func (mr *MockTrustManagerMockRecorder) Trust(credentialType, issuer interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trust", reflect.TypeOf((*MockTrustManager)(nil).Trust), credentialType, issuer) } @@ -107,7 +103,7 @@ func (m *MockTrustManager) Trusted(credentialType ssi.URI) ([]ssi.URI, error) { } // Trusted indicates an expected call of Trusted. -func (mr *MockTrustManagerMockRecorder) Trusted(credentialType any) *gomock.Call { +func (mr *MockTrustManagerMockRecorder) Trusted(credentialType interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trusted", reflect.TypeOf((*MockTrustManager)(nil).Trusted), credentialType) } @@ -121,7 +117,7 @@ func (m *MockTrustManager) Untrust(credentialType, issuer ssi.URI) error { } // Untrust indicates an expected call of Untrust. -func (mr *MockTrustManagerMockRecorder) Untrust(credentialType, issuer any) *gomock.Call { +func (mr *MockTrustManagerMockRecorder) Untrust(credentialType, issuer interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Untrust", reflect.TypeOf((*MockTrustManager)(nil).Untrust), credentialType, issuer) } @@ -136,7 +132,7 @@ func (m *MockTrustManager) Untrusted(credentialType ssi.URI) ([]ssi.URI, error) } // Untrusted indicates an expected call of Untrusted. -func (mr *MockTrustManagerMockRecorder) Untrusted(credentialType any) *gomock.Call { +func (mr *MockTrustManagerMockRecorder) Untrusted(credentialType interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Untrusted", reflect.TypeOf((*MockTrustManager)(nil).Untrusted), credentialType) } @@ -174,7 +170,7 @@ func (m *MockResolver) Resolve(ID ssi.URI, resolveTime *time.Time) (*vc.Verifiab } // Resolve indicates an expected call of Resolve. -func (mr *MockResolverMockRecorder) Resolve(ID, resolveTime any) *gomock.Call { +func (mr *MockResolverMockRecorder) Resolve(ID, resolveTime interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resolve", reflect.TypeOf((*MockResolver)(nil).Resolve), ID, resolveTime) } @@ -212,7 +208,7 @@ func (m *MockVCR) GetOpenIDHolder(ctx context.Context, id did.DID) (holder.OpenI } // GetOpenIDHolder indicates an expected call of GetOpenIDHolder. -func (mr *MockVCRMockRecorder) GetOpenIDHolder(ctx, id any) *gomock.Call { +func (mr *MockVCRMockRecorder) GetOpenIDHolder(ctx, id interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOpenIDHolder", reflect.TypeOf((*MockVCR)(nil).GetOpenIDHolder), ctx, id) } @@ -227,7 +223,7 @@ func (m *MockVCR) GetOpenIDIssuer(ctx context.Context, id did.DID) (issuer.OpenI } // GetOpenIDIssuer indicates an expected call of GetOpenIDIssuer. -func (mr *MockVCRMockRecorder) GetOpenIDIssuer(ctx, id any) *gomock.Call { +func (mr *MockVCRMockRecorder) GetOpenIDIssuer(ctx, id interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOpenIDIssuer", reflect.TypeOf((*MockVCR)(nil).GetOpenIDIssuer), ctx, id) } @@ -270,7 +266,7 @@ func (m *MockVCR) Resolve(ID ssi.URI, resolveTime *time.Time) (*vc.VerifiableCre } // Resolve indicates an expected call of Resolve. -func (mr *MockVCRMockRecorder) Resolve(ID, resolveTime any) *gomock.Call { +func (mr *MockVCRMockRecorder) Resolve(ID, resolveTime interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resolve", reflect.TypeOf((*MockVCR)(nil).Resolve), ID, resolveTime) } @@ -285,7 +281,7 @@ func (m *MockVCR) Search(ctx context.Context, searchTerms []SearchTerm, allowUnt } // Search indicates an expected call of Search. -func (mr *MockVCRMockRecorder) Search(ctx, searchTerms, allowUntrusted, resolveTime any) *gomock.Call { +func (mr *MockVCRMockRecorder) Search(ctx, searchTerms, allowUntrusted, resolveTime interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Search", reflect.TypeOf((*MockVCR)(nil).Search), ctx, searchTerms, allowUntrusted, resolveTime) } @@ -299,7 +295,7 @@ func (m *MockVCR) StoreCredential(vc vc.VerifiableCredential, validAt *time.Time } // StoreCredential indicates an expected call of StoreCredential. -func (mr *MockVCRMockRecorder) StoreCredential(vc, validAt any) *gomock.Call { +func (mr *MockVCRMockRecorder) StoreCredential(vc, validAt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoreCredential", reflect.TypeOf((*MockVCR)(nil).StoreCredential), vc, validAt) } @@ -313,7 +309,7 @@ func (m *MockVCR) Trust(credentialType, issuer ssi.URI) error { } // Trust indicates an expected call of Trust. -func (mr *MockVCRMockRecorder) Trust(credentialType, issuer any) *gomock.Call { +func (mr *MockVCRMockRecorder) Trust(credentialType, issuer interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trust", reflect.TypeOf((*MockVCR)(nil).Trust), credentialType, issuer) } @@ -328,7 +324,7 @@ func (m *MockVCR) Trusted(credentialType ssi.URI) ([]ssi.URI, error) { } // Trusted indicates an expected call of Trusted. -func (mr *MockVCRMockRecorder) Trusted(credentialType any) *gomock.Call { +func (mr *MockVCRMockRecorder) Trusted(credentialType interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trusted", reflect.TypeOf((*MockVCR)(nil).Trusted), credentialType) } @@ -342,7 +338,7 @@ func (m *MockVCR) Untrust(credentialType, issuer ssi.URI) error { } // Untrust indicates an expected call of Untrust. -func (mr *MockVCRMockRecorder) Untrust(credentialType, issuer any) *gomock.Call { +func (mr *MockVCRMockRecorder) Untrust(credentialType, issuer interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Untrust", reflect.TypeOf((*MockVCR)(nil).Untrust), credentialType, issuer) } @@ -357,7 +353,7 @@ func (m *MockVCR) Untrusted(credentialType ssi.URI) ([]ssi.URI, error) { } // Untrusted indicates an expected call of Untrusted. -func (mr *MockVCRMockRecorder) Untrusted(credentialType any) *gomock.Call { +func (mr *MockVCRMockRecorder) Untrusted(credentialType interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Untrusted", reflect.TypeOf((*MockVCR)(nil).Untrusted), credentialType) } diff --git a/vcr/openid4vci/identifiers_mock.go b/vcr/openid4vci/identifiers_mock.go index dfd3d673a9..af131af52f 100644 --- a/vcr/openid4vci/identifiers_mock.go +++ b/vcr/openid4vci/identifiers_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: vcr/openid4vci/identifiers.go -// -// Generated by this command: -// -// mockgen -destination=vcr/openid4vci/identifiers_mock.go -package=openid4vci -source=vcr/openid4vci/identifiers.go -// + // Package openid4vci is a generated GoMock package. package openid4vci @@ -48,7 +44,7 @@ func (m *MockIdentifierResolver) Resolve(id did.DID) (string, error) { } // Resolve indicates an expected call of Resolve. -func (mr *MockIdentifierResolverMockRecorder) Resolve(id any) *gomock.Call { +func (mr *MockIdentifierResolverMockRecorder) Resolve(id interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resolve", reflect.TypeOf((*MockIdentifierResolver)(nil).Resolve), id) } diff --git a/vcr/openid4vci/identifiers_test.go b/vcr/openid4vci/identifiers_test.go index cd94cec5f1..10be177dd3 100644 --- a/vcr/openid4vci/identifiers_test.go +++ b/vcr/openid4vci/identifiers_test.go @@ -25,7 +25,7 @@ import ( "github.com/nuts-foundation/go-did/did" "github.com/nuts-foundation/nuts-node/jsonld" "github.com/nuts-foundation/nuts-node/test/pki" - resolver2 "github.com/nuts-foundation/nuts-node/vdr/resolver" + "github.com/nuts-foundation/nuts-node/vdr/resolver" "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" @@ -43,9 +43,9 @@ var issuerIdentifier = "http://example.com/n2n/identity/" + issuerDID.String() var issuerService = did.Service{ ServiceEndpoint: "http://example.com/", } -var issuerQuery = ssi.MustParseURI(issuerDID.String() + "/serviceEndpoint?type=" + resolver2.BaseURLServiceType) +var issuerQuery = ssi.MustParseURI(issuerDID.String() + "/serviceEndpoint?type=" + resolver.BaseURLServiceType) var holderDID = did.MustParseDID("did:nuts:GvkzxsezHvEc8nGhgz6Xo3jbqkHwswLmWw3CYtCm7hAW") -var holderQuery = ssi.MustParseURI(holderDID.String() + "/serviceEndpoint?type=" + resolver2.BaseURLServiceType) +var holderQuery = ssi.MustParseURI(holderDID.String() + "/serviceEndpoint?type=" + resolver.BaseURLServiceType) var holderIdentifier = "http://example.com/n2n/identity/" + holderDID.String() var holderService = did.Service{ ServiceEndpoint: "http://example.com/", @@ -54,8 +54,8 @@ var holderService = did.Service{ func TestDIDIdentifierResolver_Resolve(t *testing.T) { t.Run("found", func(t *testing.T) { ctrl := gomock.NewController(t) - serviceResolver := resolver2.NewMockServiceResolver(ctrl) - serviceResolver.EXPECT().Resolve(issuerQuery, resolver2.DefaultMaxServiceReferenceDepth).Return(issuerService, nil) + serviceResolver := resolver.NewMockServiceResolver(ctrl) + serviceResolver.EXPECT().Resolve(issuerQuery, resolver.DefaultMaxServiceReferenceDepth).Return(issuerService, nil) resolver := DIDIdentifierResolver{ServiceResolver: serviceResolver} identifier, err := resolver.Resolve(issuerDID) @@ -65,8 +65,8 @@ func TestDIDIdentifierResolver_Resolve(t *testing.T) { }) t.Run("DID not found", func(t *testing.T) { ctrl := gomock.NewController(t) - serviceResolver := resolver2.NewMockServiceResolver(ctrl) - serviceResolver.EXPECT().Resolve(issuerQuery, resolver2.DefaultMaxServiceReferenceDepth).Return(did.Service{}, resolver2.ErrNotFound) + serviceResolver := resolver.NewMockServiceResolver(ctrl) + serviceResolver.EXPECT().Resolve(issuerQuery, resolver.DefaultMaxServiceReferenceDepth).Return(did.Service{}, resolver.ErrNotFound) resolver := DIDIdentifierResolver{ServiceResolver: serviceResolver} identifier, err := resolver.Resolve(issuerDID) @@ -76,8 +76,8 @@ func TestDIDIdentifierResolver_Resolve(t *testing.T) { }) t.Run("service not found", func(t *testing.T) { ctrl := gomock.NewController(t) - serviceResolver := resolver2.NewMockServiceResolver(ctrl) - serviceResolver.EXPECT().Resolve(issuerQuery, resolver2.DefaultMaxServiceReferenceDepth).Return(did.Service{}, resolver2.ErrServiceNotFound) + serviceResolver := resolver.NewMockServiceResolver(ctrl) + serviceResolver.EXPECT().Resolve(issuerQuery, resolver.DefaultMaxServiceReferenceDepth).Return(did.Service{}, resolver.ErrServiceNotFound) resolver := DIDIdentifierResolver{ServiceResolver: serviceResolver} identifier, err := resolver.Resolve(issuerDID) @@ -87,8 +87,8 @@ func TestDIDIdentifierResolver_Resolve(t *testing.T) { }) t.Run("invalid service", func(t *testing.T) { ctrl := gomock.NewController(t) - serviceResolver := resolver2.NewMockServiceResolver(ctrl) - serviceResolver.EXPECT().Resolve(issuerQuery, resolver2.DefaultMaxServiceReferenceDepth). + serviceResolver := resolver.NewMockServiceResolver(ctrl) + serviceResolver.EXPECT().Resolve(issuerQuery, resolver.DefaultMaxServiceReferenceDepth). Return(did.Service{ServiceEndpoint: map[string]string{"foo": "bar"}}, nil) resolver := DIDIdentifierResolver{ServiceResolver: serviceResolver} @@ -99,8 +99,8 @@ func TestDIDIdentifierResolver_Resolve(t *testing.T) { }) t.Run("other error", func(t *testing.T) { ctrl := gomock.NewController(t) - serviceResolver := resolver2.NewMockServiceResolver(ctrl) - serviceResolver.EXPECT().Resolve(issuerQuery, resolver2.DefaultMaxServiceReferenceDepth).Return(did.Service{}, errors.New("b00m!")) + serviceResolver := resolver.NewMockServiceResolver(ctrl) + serviceResolver.EXPECT().Resolve(issuerQuery, resolver.DefaultMaxServiceReferenceDepth).Return(did.Service{}, errors.New("b00m!")) resolver := DIDIdentifierResolver{ServiceResolver: serviceResolver} identifier, err := resolver.Resolve(issuerDID) diff --git a/vcr/openid4vci/issuer_client_mock.go b/vcr/openid4vci/issuer_client_mock.go index 13b000e602..4bad77b317 100644 --- a/vcr/openid4vci/issuer_client_mock.go +++ b/vcr/openid4vci/issuer_client_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: vcr/openid4vci/issuer_client.go -// -// Generated by this command: -// -// mockgen -destination=vcr/openid4vci/issuer_client_mock.go -package=openid4vci -source=vcr/openid4vci/issuer_client.go -// + // Package openid4vci is a generated GoMock package. package openid4vci @@ -63,7 +59,7 @@ func (m *MockIssuerAPIClient) RequestAccessToken(grantType string, params map[st } // RequestAccessToken indicates an expected call of RequestAccessToken. -func (mr *MockIssuerAPIClientMockRecorder) RequestAccessToken(grantType, params any) *gomock.Call { +func (mr *MockIssuerAPIClientMockRecorder) RequestAccessToken(grantType, params interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestAccessToken", reflect.TypeOf((*MockIssuerAPIClient)(nil).RequestAccessToken), grantType, params) } @@ -78,7 +74,7 @@ func (m *MockIssuerAPIClient) RequestCredential(ctx context.Context, request Cre } // RequestCredential indicates an expected call of RequestCredential. -func (mr *MockIssuerAPIClientMockRecorder) RequestCredential(ctx, request, accessToken any) *gomock.Call { +func (mr *MockIssuerAPIClientMockRecorder) RequestCredential(ctx, request, accessToken interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestCredential", reflect.TypeOf((*MockIssuerAPIClient)(nil).RequestCredential), ctx, request, accessToken) } @@ -116,7 +112,7 @@ func (m *MockOAuth2Client) RequestAccessToken(grantType string, params map[strin } // RequestAccessToken indicates an expected call of RequestAccessToken. -func (mr *MockOAuth2ClientMockRecorder) RequestAccessToken(grantType, params any) *gomock.Call { +func (mr *MockOAuth2ClientMockRecorder) RequestAccessToken(grantType, params interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestAccessToken", reflect.TypeOf((*MockOAuth2Client)(nil).RequestAccessToken), grantType, params) } diff --git a/vcr/openid4vci/wallet_client_mock.go b/vcr/openid4vci/wallet_client_mock.go index e371837b48..01bccc4096 100644 --- a/vcr/openid4vci/wallet_client_mock.go +++ b/vcr/openid4vci/wallet_client_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: vcr/openid4vci/wallet_client.go -// -// Generated by this command: -// -// mockgen -destination=vcr/openid4vci/wallet_client_mock.go -package=openid4vci -source=vcr/openid4vci/wallet_client.go -// + // Package openid4vci is a generated GoMock package. package openid4vci @@ -61,7 +57,7 @@ func (m *MockWalletAPIClient) OfferCredential(ctx context.Context, offer Credent } // OfferCredential indicates an expected call of OfferCredential. -func (mr *MockWalletAPIClientMockRecorder) OfferCredential(ctx, offer any) *gomock.Call { +func (mr *MockWalletAPIClientMockRecorder) OfferCredential(ctx, offer interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfferCredential", reflect.TypeOf((*MockWalletAPIClient)(nil).OfferCredential), ctx, offer) } diff --git a/vcr/signature/mock.go b/vcr/signature/mock.go index b552ce7470..2c52ac4834 100644 --- a/vcr/signature/mock.go +++ b/vcr/signature/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: vcr/signature/signature.go -// -// Generated by this command: -// -// mockgen -destination=vcr/signature/mock.go -package=signature -source=vcr/signature/signature.go -// + // Package signature is a generated GoMock package. package signature @@ -49,13 +45,13 @@ func (m *MockSuite) CalculateDigest(doc []byte) []byte { } // CalculateDigest indicates an expected call of CalculateDigest. -func (mr *MockSuiteMockRecorder) CalculateDigest(doc any) *gomock.Call { +func (mr *MockSuiteMockRecorder) CalculateDigest(doc interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CalculateDigest", reflect.TypeOf((*MockSuite)(nil).CalculateDigest), doc) } // CanonicalizeDocument mocks base method. -func (m *MockSuite) CanonicalizeDocument(doc any) ([]byte, error) { +func (m *MockSuite) CanonicalizeDocument(doc interface{}) ([]byte, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CanonicalizeDocument", doc) ret0, _ := ret[0].([]byte) @@ -64,7 +60,7 @@ func (m *MockSuite) CanonicalizeDocument(doc any) ([]byte, error) { } // CanonicalizeDocument indicates an expected call of CanonicalizeDocument. -func (mr *MockSuiteMockRecorder) CanonicalizeDocument(doc any) *gomock.Call { +func (mr *MockSuiteMockRecorder) CanonicalizeDocument(doc interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CanonicalizeDocument", reflect.TypeOf((*MockSuite)(nil).CanonicalizeDocument), doc) } @@ -93,7 +89,7 @@ func (m *MockSuite) Sign(ctx context.Context, doc []byte, key crypto.Key) ([]byt } // Sign indicates an expected call of Sign. -func (mr *MockSuiteMockRecorder) Sign(ctx, doc, key any) *gomock.Call { +func (mr *MockSuiteMockRecorder) Sign(ctx, doc, key interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sign", reflect.TypeOf((*MockSuite)(nil).Sign), ctx, doc, key) } diff --git a/vcr/types/mock.go b/vcr/types/mock.go index 73a6b83990..be0b565217 100644 --- a/vcr/types/mock.go +++ b/vcr/types/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: vcr/types/interface.go -// -// Generated by this command: -// -// mockgen -destination=vcr/types/mock.go -package=types -source=vcr/types/interface.go -// + // Package types is a generated GoMock package. package types @@ -48,7 +44,7 @@ func (m *MockWriter) StoreCredential(vc vc.VerifiableCredential, validAt *time.T } // StoreCredential indicates an expected call of StoreCredential. -func (mr *MockWriterMockRecorder) StoreCredential(vc, validAt any) *gomock.Call { +func (mr *MockWriterMockRecorder) StoreCredential(vc, validAt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoreCredential", reflect.TypeOf((*MockWriter)(nil).StoreCredential), vc, validAt) } diff --git a/vcr/vcr.go b/vcr/vcr.go index 3273138224..81fe82d4b5 100644 --- a/vcr/vcr.go +++ b/vcr/vcr.go @@ -29,7 +29,7 @@ import ( "github.com/nuts-foundation/nuts-node/pki" "github.com/nuts-foundation/nuts-node/vcr/credential" "github.com/nuts-foundation/nuts-node/vcr/openid4vci" - vdr2 "github.com/nuts-foundation/nuts-node/vdr" + "github.com/nuts-foundation/nuts-node/vdr" "github.com/nuts-foundation/nuts-node/vdr/resolver" "io/fs" "net/http" @@ -61,7 +61,7 @@ const credentialsBackupShelf = "credentials" var _ core.Migratable = (*vcr)(nil) // NewVCRInstance creates a new vcr instance with default config and empty concept registry -func NewVCRInstance(keyStore crypto.KeyStore, vdrInstance vdr2.VDR, +func NewVCRInstance(keyStore crypto.KeyStore, vdrInstance vdr.VDR, network network.Transactions, jsonldManager jsonld.JSONLD, eventManager events.Event, storageClient storage.Engine, pkiProvider pki.Provider) VCR { r := &vcr{ @@ -104,7 +104,7 @@ type vcr struct { issuerHttpClient core.HTTPRequestDoer walletHttpClient core.HTTPRequestDoer pkiProvider pki.Provider - vdrInstance vdr2.VDR + vdrInstance vdr.VDR } func (c *vcr) GetOpenIDIssuer(ctx context.Context, id did.DID) (issuer.OpenIDHandler, error) { diff --git a/vcr/verifier/mock.go b/vcr/verifier/mock.go index 709e9acd4f..b7c6a716ee 100644 --- a/vcr/verifier/mock.go +++ b/vcr/verifier/mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: vcr/verifier/interface.go -// -// Generated by this command: -// -// mockgen -destination=vcr/verifier/mock.go -package=verifier -source=vcr/verifier/interface.go -// + // Package verifier is a generated GoMock package. package verifier @@ -52,7 +48,7 @@ func (m *MockVerifier) GetRevocation(id ssi.URI) (*credential.Revocation, error) } // GetRevocation indicates an expected call of GetRevocation. -func (mr *MockVerifierMockRecorder) GetRevocation(id any) *gomock.Call { +func (mr *MockVerifierMockRecorder) GetRevocation(id interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRevocation", reflect.TypeOf((*MockVerifier)(nil).GetRevocation), id) } @@ -67,7 +63,7 @@ func (m *MockVerifier) IsRevoked(credentialID ssi.URI) (bool, error) { } // IsRevoked indicates an expected call of IsRevoked. -func (mr *MockVerifierMockRecorder) IsRevoked(credentialID any) *gomock.Call { +func (mr *MockVerifierMockRecorder) IsRevoked(credentialID interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsRevoked", reflect.TypeOf((*MockVerifier)(nil).IsRevoked), credentialID) } @@ -81,7 +77,7 @@ func (m *MockVerifier) RegisterRevocation(revocation credential.Revocation) erro } // RegisterRevocation indicates an expected call of RegisterRevocation. -func (mr *MockVerifierMockRecorder) RegisterRevocation(revocation any) *gomock.Call { +func (mr *MockVerifierMockRecorder) RegisterRevocation(revocation interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterRevocation", reflect.TypeOf((*MockVerifier)(nil).RegisterRevocation), revocation) } @@ -95,7 +91,7 @@ func (m *MockVerifier) Validate(credentialToVerify vc.VerifiableCredential, at * } // Validate indicates an expected call of Validate. -func (mr *MockVerifierMockRecorder) Validate(credentialToVerify, at any) *gomock.Call { +func (mr *MockVerifierMockRecorder) Validate(credentialToVerify, at interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockVerifier)(nil).Validate), credentialToVerify, at) } @@ -109,7 +105,7 @@ func (m *MockVerifier) Verify(credential vc.VerifiableCredential, allowUntrusted } // Verify indicates an expected call of Verify. -func (mr *MockVerifierMockRecorder) Verify(credential, allowUntrusted, checkSignature, validAt any) *gomock.Call { +func (mr *MockVerifierMockRecorder) Verify(credential, allowUntrusted, checkSignature, validAt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockVerifier)(nil).Verify), credential, allowUntrusted, checkSignature, validAt) } @@ -124,7 +120,7 @@ func (m *MockVerifier) VerifyVP(presentation vc.VerifiablePresentation, verifyVC } // VerifyVP indicates an expected call of VerifyVP. -func (mr *MockVerifierMockRecorder) VerifyVP(presentation, verifyVCs, allowUntrustedVCs, validAt any) *gomock.Call { +func (mr *MockVerifierMockRecorder) VerifyVP(presentation, verifyVCs, allowUntrustedVCs, validAt interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyVP", reflect.TypeOf((*MockVerifier)(nil).VerifyVP), presentation, verifyVCs, allowUntrustedVCs, validAt) } @@ -190,7 +186,7 @@ func (m *MockStore) GetRevocations(id ssi.URI) ([]*credential.Revocation, error) } // GetRevocations indicates an expected call of GetRevocations. -func (mr *MockStoreMockRecorder) GetRevocations(id any) *gomock.Call { +func (mr *MockStoreMockRecorder) GetRevocations(id interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRevocations", reflect.TypeOf((*MockStore)(nil).GetRevocations), id) } @@ -204,7 +200,7 @@ func (m *MockStore) StoreRevocation(r credential.Revocation) error { } // StoreRevocation indicates an expected call of StoreRevocation. -func (mr *MockStoreMockRecorder) StoreRevocation(r any) *gomock.Call { +func (mr *MockStoreMockRecorder) StoreRevocation(r interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoreRevocation", reflect.TypeOf((*MockStore)(nil).StoreRevocation), r) } diff --git a/vdr/api/v1/api_test.go b/vdr/api/v1/api_test.go index 9afc286468..867af71f8d 100644 --- a/vdr/api/v1/api_test.go +++ b/vdr/api/v1/api_test.go @@ -19,7 +19,7 @@ import ( "context" "errors" "github.com/nuts-foundation/nuts-node/audit" - vdr2 "github.com/nuts-foundation/nuts-node/vdr" + "github.com/nuts-foundation/nuts-node/vdr" "github.com/nuts-foundation/nuts-node/vdr/didnuts" "github.com/nuts-foundation/nuts-node/vdr/management" "github.com/nuts-foundation/nuts-node/vdr/resolver" @@ -466,7 +466,7 @@ func Test_ErrorStatusCodes(t *testing.T) { type mockContext struct { ctrl *gomock.Controller - vdr *vdr2.MockVDR + vdr *vdr.MockVDR didResolver *resolver.MockDIDResolver docUpdater *management.MockDocManipulator client *Wrapper @@ -477,7 +477,7 @@ func newMockContext(t *testing.T) mockContext { t.Helper() ctrl := gomock.NewController(t) didResolver := resolver.NewMockDIDResolver(ctrl) - vdr := vdr2.NewMockVDR(ctrl) + vdr := vdr.NewMockVDR(ctrl) vdr.EXPECT().Resolver().Return(didResolver).AnyTimes() docManipulator := management.NewMockDocManipulator(ctrl) client := &Wrapper{VDR: vdr, DocManipulator: docManipulator} diff --git a/vdr/didnuts/ambassador_mock.go b/vdr/didnuts/ambassador_mock.go index c7f11c2714..717693c25d 100644 --- a/vdr/didnuts/ambassador_mock.go +++ b/vdr/didnuts/ambassador_mock.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: vdr/didnuts/ambassador.go -// -// Generated by this command: -// -// mockgen -destination=vdr/didnuts/ambassador_mock.go -package=didnuts -source=vdr/didnuts/ambassador.go -// + // Package didnuts is a generated GoMock package. package didnuts diff --git a/vdr/didnuts/didstore/metadata.go b/vdr/didnuts/didstore/metadata.go index 729bbfd9b6..c22a0414ae 100644 --- a/vdr/didnuts/didstore/metadata.go +++ b/vdr/didnuts/didstore/metadata.go @@ -19,7 +19,7 @@ package didstore import ( - vdr "github.com/nuts-foundation/nuts-node/vdr/resolver" + "github.com/nuts-foundation/nuts-node/vdr/resolver" "time" "github.com/nuts-foundation/nuts-node/crypto/hash" @@ -43,8 +43,8 @@ type documentMetadata struct { Deactivated bool `json:"deactivated"` } -func (md documentMetadata) asVDRMetadata() vdr.DocumentMetadata { - result := vdr.DocumentMetadata{ +func (md documentMetadata) asVDRMetadata() resolver.DocumentMetadata { + result := resolver.DocumentMetadata{ Created: md.Created, Hash: md.Hash, PreviousHash: md.PreviousHash, diff --git a/vdr/didnuts/didstore/mock.go b/vdr/didnuts/didstore/mock.go index d123833145..b13e4af251 100644 --- a/vdr/didnuts/didstore/mock.go +++ b/vdr/didnuts/didstore/mock.go @@ -1,19 +1,15 @@ // Code generated by MockGen. DO NOT EDIT. // Source: vdr/didnuts/didstore/interface.go -// -// Generated by this command: -// -// mockgen -destination=vdr/didnuts/didstore/mock.go -package=didstore -source=vdr/didnuts/didstore/interface.go -// + // Package didstore is a generated GoMock package. package didstore import ( - "github.com/nuts-foundation/nuts-node/vdr/management" - "github.com/nuts-foundation/nuts-node/vdr/resolver" reflect "reflect" did "github.com/nuts-foundation/go-did/did" + management "github.com/nuts-foundation/nuts-node/vdr/management" + resolver "github.com/nuts-foundation/nuts-node/vdr/resolver" gomock "go.uber.org/mock/gomock" ) @@ -49,7 +45,7 @@ func (m *MockStore) Add(didDocument did.Document, transaction Transaction) error } // Add indicates an expected call of Add. -func (mr *MockStoreMockRecorder) Add(didDocument, transaction any) *gomock.Call { +func (mr *MockStoreMockRecorder) Add(didDocument, transaction interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockStore)(nil).Add), didDocument, transaction) } @@ -63,7 +59,7 @@ func (m *MockStore) Conflicted(fn management.DocIterator) error { } // Conflicted indicates an expected call of Conflicted. -func (mr *MockStoreMockRecorder) Conflicted(fn any) *gomock.Call { +func (mr *MockStoreMockRecorder) Conflicted(fn interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Conflicted", reflect.TypeOf((*MockStore)(nil).Conflicted), fn) } @@ -107,7 +103,7 @@ func (m *MockStore) Iterate(fn management.DocIterator) error { } // Iterate indicates an expected call of Iterate. -func (mr *MockStoreMockRecorder) Iterate(fn any) *gomock.Call { +func (mr *MockStoreMockRecorder) Iterate(fn interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Iterate", reflect.TypeOf((*MockStore)(nil).Iterate), fn) } @@ -123,7 +119,7 @@ func (m *MockStore) Resolve(id did.DID, metadata *resolver.ResolveMetadata) (*di } // Resolve indicates an expected call of Resolve. -func (mr *MockStoreMockRecorder) Resolve(id, metadata any) *gomock.Call { +func (mr *MockStoreMockRecorder) Resolve(id, metadata interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resolve", reflect.TypeOf((*MockStore)(nil).Resolve), id, metadata) } diff --git a/vdr/management/management.go b/vdr/management/management.go index 80d47884c2..2bd7846ea6 100644 --- a/vdr/management/management.go +++ b/vdr/management/management.go @@ -22,7 +22,6 @@ import ( "context" "github.com/nuts-foundation/go-did/did" "github.com/nuts-foundation/nuts-node/crypto" - "github.com/nuts-foundation/nuts-node/vdr/resolver" ) // DocCreator is the interface that wraps the Create method @@ -34,13 +33,6 @@ type DocCreator interface { Create(ctx context.Context, options DIDCreationOptions) (*did.Document, crypto.Key, error) } -// DocWriter is the interface that groups al the DID Document write methods -type DocWriter interface { - // Write writes a DID Document. - // When a document already exists, the Update should be used instead - Write(document did.Document, metadata resolver.DocumentMetadata) error -} - // DocUpdater is the interface that defines functions that alter the state of a DID document type DocUpdater interface { // Update replaces the DID document identified by DID with the nextVersion diff --git a/vdr/management/management_mock.go b/vdr/management/management_mock.go index f56bb9b57a..b535aaedc3 100644 --- a/vdr/management/management_mock.go +++ b/vdr/management/management_mock.go @@ -10,7 +10,6 @@ import ( did "github.com/nuts-foundation/go-did/did" crypto "github.com/nuts-foundation/nuts-node/crypto" - resolver "github.com/nuts-foundation/nuts-node/vdr/resolver" gomock "go.uber.org/mock/gomock" ) @@ -53,43 +52,6 @@ func (mr *MockDocCreatorMockRecorder) Create(ctx, options interface{}) *gomock.C return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockDocCreator)(nil).Create), ctx, options) } -// MockDocWriter is a mock of DocWriter interface. -type MockDocWriter struct { - ctrl *gomock.Controller - recorder *MockDocWriterMockRecorder -} - -// MockDocWriterMockRecorder is the mock recorder for MockDocWriter. -type MockDocWriterMockRecorder struct { - mock *MockDocWriter -} - -// NewMockDocWriter creates a new mock instance. -func NewMockDocWriter(ctrl *gomock.Controller) *MockDocWriter { - mock := &MockDocWriter{ctrl: ctrl} - mock.recorder = &MockDocWriterMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockDocWriter) EXPECT() *MockDocWriterMockRecorder { - return m.recorder -} - -// Write mocks base method. -func (m *MockDocWriter) Write(document did.Document, metadata resolver.DocumentMetadata) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Write", document, metadata) - ret0, _ := ret[0].(error) - return ret0 -} - -// Write indicates an expected call of Write. -func (mr *MockDocWriterMockRecorder) Write(document, metadata interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockDocWriter)(nil).Write), document, metadata) -} - // MockDocUpdater is a mock of DocUpdater interface. type MockDocUpdater struct { ctrl *gomock.Controller