diff --git a/apps/api/project.json b/apps/api/project.json index 8a9d1cc571..61b5820efe 100644 --- a/apps/api/project.json +++ b/apps/api/project.json @@ -279,18 +279,18 @@ "executor": "nx:run-commands", "options": { "commands": [ - "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install github.com/daixiang0/gci@v0.11.2", - "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install github.com/dmarkham/enumer@v1.5.11", - "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install go.uber.org/mock/mockgen@v0.4.0", - "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install golang.org/x/tools/cmd/stringer@v0.36.0", - "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install github.com/rakyll/statik@v0.1.7", - "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install github.com/bufbuild/buf/cmd/buf@v1.45.0", - "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.35.1", - "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1", - "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@v2.22.0", - "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.22.0", - "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install github.com/envoyproxy/protoc-gen-validate@v1.1.0", - "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install connectrpc.com/connect/cmd/protoc-gen-connect-go@v1.18.1", + "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install github.com/daixiang0/gci@v0.14.0", + "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install github.com/dmarkham/enumer@v1.6.3", + "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install go.uber.org/mock/mockgen@v0.6.0", + "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install golang.org/x/tools/cmd/stringer@v0.43.0", + "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install github.com/rakyll/statik@v0.1.8", + "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install github.com/bufbuild/buf/cmd/buf@v1.67.0", + "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.11", + "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.6.1", + "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@v2.28.0", + "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.28.0", + "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install github.com/envoyproxy/protoc-gen-validate@v1.3.3", + "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install connectrpc.com/connect/cmd/protoc-gen-connect-go@v1.19.1", "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install ./internal/protoc/protoc-gen-authoption", "GOBIN=${PWD}/.artifacts/bin/$(go env GOOS)/$(go env GOARCH) go install ./internal/protoc/protoc-gen-zitadel" ] diff --git a/internal/auth_request/repository/mock/repository.mock.go b/internal/auth_request/repository/mock/repository.mock.go index c05e5010fe..b5dfe7f286 100644 --- a/internal/auth_request/repository/mock/repository.mock.go +++ b/internal/auth_request/repository/mock/repository.mock.go @@ -21,6 +21,7 @@ import ( type MockAuthRequestCache struct { ctrl *gomock.Controller recorder *MockAuthRequestCacheMockRecorder + isgomock struct{} } // MockAuthRequestCacheMockRecorder is the mock recorder for MockAuthRequestCache. @@ -41,99 +42,99 @@ func (m *MockAuthRequestCache) EXPECT() *MockAuthRequestCacheMockRecorder { } // CacheAuthRequest mocks base method. -func (m *MockAuthRequestCache) CacheAuthRequest(arg0 context.Context, arg1 *domain.AuthRequest) { +func (m *MockAuthRequestCache) CacheAuthRequest(ctx context.Context, request *domain.AuthRequest) { m.ctrl.T.Helper() - m.ctrl.Call(m, "CacheAuthRequest", arg0, arg1) + m.ctrl.Call(m, "CacheAuthRequest", ctx, request) } // CacheAuthRequest indicates an expected call of CacheAuthRequest. -func (mr *MockAuthRequestCacheMockRecorder) CacheAuthRequest(arg0, arg1 any) *gomock.Call { +func (mr *MockAuthRequestCacheMockRecorder) CacheAuthRequest(ctx, request any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CacheAuthRequest", reflect.TypeOf((*MockAuthRequestCache)(nil).CacheAuthRequest), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CacheAuthRequest", reflect.TypeOf((*MockAuthRequestCache)(nil).CacheAuthRequest), ctx, request) } // DeleteAuthRequest mocks base method. -func (m *MockAuthRequestCache) DeleteAuthRequest(arg0 context.Context, arg1 string) error { +func (m *MockAuthRequestCache) DeleteAuthRequest(ctx context.Context, id string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteAuthRequest", arg0, arg1) + ret := m.ctrl.Call(m, "DeleteAuthRequest", ctx, id) ret0, _ := ret[0].(error) return ret0 } // DeleteAuthRequest indicates an expected call of DeleteAuthRequest. -func (mr *MockAuthRequestCacheMockRecorder) DeleteAuthRequest(arg0, arg1 any) *gomock.Call { +func (mr *MockAuthRequestCacheMockRecorder) DeleteAuthRequest(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAuthRequest", reflect.TypeOf((*MockAuthRequestCache)(nil).DeleteAuthRequest), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAuthRequest", reflect.TypeOf((*MockAuthRequestCache)(nil).DeleteAuthRequest), ctx, id) } // GetAuthRequestByCode mocks base method. -func (m *MockAuthRequestCache) GetAuthRequestByCode(arg0 context.Context, arg1 string) (*domain.AuthRequest, error) { +func (m *MockAuthRequestCache) GetAuthRequestByCode(ctx context.Context, code string) (*domain.AuthRequest, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAuthRequestByCode", arg0, arg1) + ret := m.ctrl.Call(m, "GetAuthRequestByCode", ctx, code) ret0, _ := ret[0].(*domain.AuthRequest) ret1, _ := ret[1].(error) return ret0, ret1 } // GetAuthRequestByCode indicates an expected call of GetAuthRequestByCode. -func (mr *MockAuthRequestCacheMockRecorder) GetAuthRequestByCode(arg0, arg1 any) *gomock.Call { +func (mr *MockAuthRequestCacheMockRecorder) GetAuthRequestByCode(ctx, code any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthRequestByCode", reflect.TypeOf((*MockAuthRequestCache)(nil).GetAuthRequestByCode), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthRequestByCode", reflect.TypeOf((*MockAuthRequestCache)(nil).GetAuthRequestByCode), ctx, code) } // GetAuthRequestByID mocks base method. -func (m *MockAuthRequestCache) GetAuthRequestByID(arg0 context.Context, arg1 string) (*domain.AuthRequest, error) { +func (m *MockAuthRequestCache) GetAuthRequestByID(ctx context.Context, id string) (*domain.AuthRequest, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAuthRequestByID", arg0, arg1) + ret := m.ctrl.Call(m, "GetAuthRequestByID", ctx, id) ret0, _ := ret[0].(*domain.AuthRequest) ret1, _ := ret[1].(error) return ret0, ret1 } // GetAuthRequestByID indicates an expected call of GetAuthRequestByID. -func (mr *MockAuthRequestCacheMockRecorder) GetAuthRequestByID(arg0, arg1 any) *gomock.Call { +func (mr *MockAuthRequestCacheMockRecorder) GetAuthRequestByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthRequestByID", reflect.TypeOf((*MockAuthRequestCache)(nil).GetAuthRequestByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthRequestByID", reflect.TypeOf((*MockAuthRequestCache)(nil).GetAuthRequestByID), ctx, id) } // Health mocks base method. -func (m *MockAuthRequestCache) Health(arg0 context.Context) error { +func (m *MockAuthRequestCache) Health(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Health", arg0) + ret := m.ctrl.Call(m, "Health", ctx) ret0, _ := ret[0].(error) return ret0 } // Health indicates an expected call of Health. -func (mr *MockAuthRequestCacheMockRecorder) Health(arg0 any) *gomock.Call { +func (mr *MockAuthRequestCacheMockRecorder) Health(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Health", reflect.TypeOf((*MockAuthRequestCache)(nil).Health), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Health", reflect.TypeOf((*MockAuthRequestCache)(nil).Health), ctx) } // SaveAuthRequest mocks base method. -func (m *MockAuthRequestCache) SaveAuthRequest(arg0 context.Context, arg1 *domain.AuthRequest) error { +func (m *MockAuthRequestCache) SaveAuthRequest(ctx context.Context, request *domain.AuthRequest) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SaveAuthRequest", arg0, arg1) + ret := m.ctrl.Call(m, "SaveAuthRequest", ctx, request) ret0, _ := ret[0].(error) return ret0 } // SaveAuthRequest indicates an expected call of SaveAuthRequest. -func (mr *MockAuthRequestCacheMockRecorder) SaveAuthRequest(arg0, arg1 any) *gomock.Call { +func (mr *MockAuthRequestCacheMockRecorder) SaveAuthRequest(ctx, request any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveAuthRequest", reflect.TypeOf((*MockAuthRequestCache)(nil).SaveAuthRequest), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveAuthRequest", reflect.TypeOf((*MockAuthRequestCache)(nil).SaveAuthRequest), ctx, request) } // UpdateAuthRequest mocks base method. -func (m *MockAuthRequestCache) UpdateAuthRequest(arg0 context.Context, arg1 *domain.AuthRequest) error { +func (m *MockAuthRequestCache) UpdateAuthRequest(ctx context.Context, request *domain.AuthRequest) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateAuthRequest", arg0, arg1) + ret := m.ctrl.Call(m, "UpdateAuthRequest", ctx, request) ret0, _ := ret[0].(error) return ret0 } // UpdateAuthRequest indicates an expected call of UpdateAuthRequest. -func (mr *MockAuthRequestCacheMockRecorder) UpdateAuthRequest(arg0, arg1 any) *gomock.Call { +func (mr *MockAuthRequestCacheMockRecorder) UpdateAuthRequest(ctx, request any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAuthRequest", reflect.TypeOf((*MockAuthRequestCache)(nil).UpdateAuthRequest), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAuthRequest", reflect.TypeOf((*MockAuthRequestCache)(nil).UpdateAuthRequest), ctx, request) } diff --git a/internal/command/mock_login_paths.go b/internal/command/mock_login_paths.go index 718eed2702..13da5e0cf0 100644 --- a/internal/command/mock_login_paths.go +++ b/internal/command/mock_login_paths.go @@ -20,6 +20,7 @@ import ( type MockLoginPaths struct { ctrl *gomock.Controller recorder *MockLoginPathsMockRecorder + isgomock struct{} } // MockLoginPathsMockRecorder is the mock recorder for MockLoginPaths. @@ -40,57 +41,57 @@ func (m *MockLoginPaths) EXPECT() *MockLoginPathsMockRecorder { } // DefaultDomainClaimedURLTemplate mocks base method. -func (m *MockLoginPaths) DefaultDomainClaimedURLTemplate(arg0 context.Context) string { +func (m *MockLoginPaths) DefaultDomainClaimedURLTemplate(ctx context.Context) string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DefaultDomainClaimedURLTemplate", arg0) + ret := m.ctrl.Call(m, "DefaultDomainClaimedURLTemplate", ctx) ret0, _ := ret[0].(string) return ret0 } // DefaultDomainClaimedURLTemplate indicates an expected call of DefaultDomainClaimedURLTemplate. -func (mr *MockLoginPathsMockRecorder) DefaultDomainClaimedURLTemplate(arg0 any) *gomock.Call { +func (mr *MockLoginPathsMockRecorder) DefaultDomainClaimedURLTemplate(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultDomainClaimedURLTemplate", reflect.TypeOf((*MockLoginPaths)(nil).DefaultDomainClaimedURLTemplate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultDomainClaimedURLTemplate", reflect.TypeOf((*MockLoginPaths)(nil).DefaultDomainClaimedURLTemplate), ctx) } // DefaultEmailCodeURLTemplate mocks base method. -func (m *MockLoginPaths) DefaultEmailCodeURLTemplate(arg0 context.Context) string { +func (m *MockLoginPaths) DefaultEmailCodeURLTemplate(ctx context.Context) string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DefaultEmailCodeURLTemplate", arg0) + ret := m.ctrl.Call(m, "DefaultEmailCodeURLTemplate", ctx) ret0, _ := ret[0].(string) return ret0 } // DefaultEmailCodeURLTemplate indicates an expected call of DefaultEmailCodeURLTemplate. -func (mr *MockLoginPathsMockRecorder) DefaultEmailCodeURLTemplate(arg0 any) *gomock.Call { +func (mr *MockLoginPathsMockRecorder) DefaultEmailCodeURLTemplate(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultEmailCodeURLTemplate", reflect.TypeOf((*MockLoginPaths)(nil).DefaultEmailCodeURLTemplate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultEmailCodeURLTemplate", reflect.TypeOf((*MockLoginPaths)(nil).DefaultEmailCodeURLTemplate), ctx) } // DefaultPasskeySetURLTemplate mocks base method. -func (m *MockLoginPaths) DefaultPasskeySetURLTemplate(arg0 context.Context) string { +func (m *MockLoginPaths) DefaultPasskeySetURLTemplate(ctx context.Context) string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DefaultPasskeySetURLTemplate", arg0) + ret := m.ctrl.Call(m, "DefaultPasskeySetURLTemplate", ctx) ret0, _ := ret[0].(string) return ret0 } // DefaultPasskeySetURLTemplate indicates an expected call of DefaultPasskeySetURLTemplate. -func (mr *MockLoginPathsMockRecorder) DefaultPasskeySetURLTemplate(arg0 any) *gomock.Call { +func (mr *MockLoginPathsMockRecorder) DefaultPasskeySetURLTemplate(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultPasskeySetURLTemplate", reflect.TypeOf((*MockLoginPaths)(nil).DefaultPasskeySetURLTemplate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultPasskeySetURLTemplate", reflect.TypeOf((*MockLoginPaths)(nil).DefaultPasskeySetURLTemplate), ctx) } // DefaultPasswordSetURLTemplate mocks base method. -func (m *MockLoginPaths) DefaultPasswordSetURLTemplate(arg0 context.Context) string { +func (m *MockLoginPaths) DefaultPasswordSetURLTemplate(ctx context.Context) string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DefaultPasswordSetURLTemplate", arg0) + ret := m.ctrl.Call(m, "DefaultPasswordSetURLTemplate", ctx) ret0, _ := ret[0].(string) return ret0 } // DefaultPasswordSetURLTemplate indicates an expected call of DefaultPasswordSetURLTemplate. -func (mr *MockLoginPathsMockRecorder) DefaultPasswordSetURLTemplate(arg0 any) *gomock.Call { +func (mr *MockLoginPathsMockRecorder) DefaultPasswordSetURLTemplate(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultPasswordSetURLTemplate", reflect.TypeOf((*MockLoginPaths)(nil).DefaultPasswordSetURLTemplate), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultPasswordSetURLTemplate", reflect.TypeOf((*MockLoginPaths)(nil).DefaultPasswordSetURLTemplate), ctx) } diff --git a/internal/crypto/code.go b/internal/crypto/code.go index d017a974f2..34123e7901 100644 --- a/internal/crypto/code.go +++ b/internal/crypto/code.go @@ -23,6 +23,8 @@ type GeneratorConfig struct { IncludeSymbols bool } +//go:generate mockgen -source code.go -destination ./code_mock.go -package crypto + type Generator interface { Length() uint Expiry() time.Duration diff --git a/internal/crypto/code_mock.go b/internal/crypto/code_mock.go index 3ed342c7d4..c308681fba 100644 --- a/internal/crypto/code_mock.go +++ b/internal/crypto/code_mock.go @@ -20,6 +20,7 @@ import ( type MockGenerator struct { ctrl *gomock.Controller recorder *MockGeneratorMockRecorder + isgomock struct{} } // MockGeneratorMockRecorder is the mock recorder for MockGenerator. diff --git a/internal/crypto/crypto.mock.go b/internal/crypto/crypto.mock.go new file mode 100644 index 0000000000..b9672e738a --- /dev/null +++ b/internal/crypto/crypto.mock.go @@ -0,0 +1,271 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/zitadel/zitadel/internal/crypto (interfaces: EncryptionAlgorithm) +// +// Generated by this command: +// +// mockgen -typed -package crypto -destination ./crypto.mock.go . EncryptionAlgorithm +// + +// Package crypto is a generated GoMock package. +package crypto + +import ( + reflect "reflect" + + gomock "go.uber.org/mock/gomock" +) + +// MockEncryptionAlgorithm is a mock of EncryptionAlgorithm interface. +type MockEncryptionAlgorithm struct { + ctrl *gomock.Controller + recorder *MockEncryptionAlgorithmMockRecorder + isgomock struct{} +} + +// MockEncryptionAlgorithmMockRecorder is the mock recorder for MockEncryptionAlgorithm. +type MockEncryptionAlgorithmMockRecorder struct { + mock *MockEncryptionAlgorithm +} + +// NewMockEncryptionAlgorithm creates a new mock instance. +func NewMockEncryptionAlgorithm(ctrl *gomock.Controller) *MockEncryptionAlgorithm { + mock := &MockEncryptionAlgorithm{ctrl: ctrl} + mock.recorder = &MockEncryptionAlgorithmMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockEncryptionAlgorithm) EXPECT() *MockEncryptionAlgorithmMockRecorder { + return m.recorder +} + +// Algorithm mocks base method. +func (m *MockEncryptionAlgorithm) Algorithm() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Algorithm") + ret0, _ := ret[0].(string) + return ret0 +} + +// Algorithm indicates an expected call of Algorithm. +func (mr *MockEncryptionAlgorithmMockRecorder) Algorithm() *MockEncryptionAlgorithmAlgorithmCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Algorithm", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).Algorithm)) + return &MockEncryptionAlgorithmAlgorithmCall{Call: call} +} + +// MockEncryptionAlgorithmAlgorithmCall wrap *gomock.Call +type MockEncryptionAlgorithmAlgorithmCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEncryptionAlgorithmAlgorithmCall) Return(arg0 string) *MockEncryptionAlgorithmAlgorithmCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEncryptionAlgorithmAlgorithmCall) Do(f func() string) *MockEncryptionAlgorithmAlgorithmCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEncryptionAlgorithmAlgorithmCall) DoAndReturn(f func() string) *MockEncryptionAlgorithmAlgorithmCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Decrypt mocks base method. +func (m *MockEncryptionAlgorithm) Decrypt(hashed []byte, keyID string) ([]byte, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Decrypt", hashed, keyID) + ret0, _ := ret[0].([]byte) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Decrypt indicates an expected call of Decrypt. +func (mr *MockEncryptionAlgorithmMockRecorder) Decrypt(hashed, keyID any) *MockEncryptionAlgorithmDecryptCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Decrypt", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).Decrypt), hashed, keyID) + return &MockEncryptionAlgorithmDecryptCall{Call: call} +} + +// MockEncryptionAlgorithmDecryptCall wrap *gomock.Call +type MockEncryptionAlgorithmDecryptCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEncryptionAlgorithmDecryptCall) Return(arg0 []byte, arg1 error) *MockEncryptionAlgorithmDecryptCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEncryptionAlgorithmDecryptCall) Do(f func([]byte, string) ([]byte, error)) *MockEncryptionAlgorithmDecryptCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEncryptionAlgorithmDecryptCall) DoAndReturn(f func([]byte, string) ([]byte, error)) *MockEncryptionAlgorithmDecryptCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// DecryptString mocks base method. +func (m *MockEncryptionAlgorithm) DecryptString(hashed []byte, keyID string) (string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DecryptString", hashed, keyID) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DecryptString indicates an expected call of DecryptString. +func (mr *MockEncryptionAlgorithmMockRecorder) DecryptString(hashed, keyID any) *MockEncryptionAlgorithmDecryptStringCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DecryptString", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).DecryptString), hashed, keyID) + return &MockEncryptionAlgorithmDecryptStringCall{Call: call} +} + +// MockEncryptionAlgorithmDecryptStringCall wrap *gomock.Call +type MockEncryptionAlgorithmDecryptStringCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEncryptionAlgorithmDecryptStringCall) Return(arg0 string, arg1 error) *MockEncryptionAlgorithmDecryptStringCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEncryptionAlgorithmDecryptStringCall) Do(f func([]byte, string) (string, error)) *MockEncryptionAlgorithmDecryptStringCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEncryptionAlgorithmDecryptStringCall) DoAndReturn(f func([]byte, string) (string, error)) *MockEncryptionAlgorithmDecryptStringCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// DecryptionKeyIDs mocks base method. +func (m *MockEncryptionAlgorithm) DecryptionKeyIDs() []string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DecryptionKeyIDs") + ret0, _ := ret[0].([]string) + return ret0 +} + +// DecryptionKeyIDs indicates an expected call of DecryptionKeyIDs. +func (mr *MockEncryptionAlgorithmMockRecorder) DecryptionKeyIDs() *MockEncryptionAlgorithmDecryptionKeyIDsCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DecryptionKeyIDs", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).DecryptionKeyIDs)) + return &MockEncryptionAlgorithmDecryptionKeyIDsCall{Call: call} +} + +// MockEncryptionAlgorithmDecryptionKeyIDsCall wrap *gomock.Call +type MockEncryptionAlgorithmDecryptionKeyIDsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEncryptionAlgorithmDecryptionKeyIDsCall) Return(arg0 []string) *MockEncryptionAlgorithmDecryptionKeyIDsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEncryptionAlgorithmDecryptionKeyIDsCall) Do(f func() []string) *MockEncryptionAlgorithmDecryptionKeyIDsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEncryptionAlgorithmDecryptionKeyIDsCall) DoAndReturn(f func() []string) *MockEncryptionAlgorithmDecryptionKeyIDsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Encrypt mocks base method. +func (m *MockEncryptionAlgorithm) Encrypt(value []byte) ([]byte, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Encrypt", value) + ret0, _ := ret[0].([]byte) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Encrypt indicates an expected call of Encrypt. +func (mr *MockEncryptionAlgorithmMockRecorder) Encrypt(value any) *MockEncryptionAlgorithmEncryptCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Encrypt", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).Encrypt), value) + return &MockEncryptionAlgorithmEncryptCall{Call: call} +} + +// MockEncryptionAlgorithmEncryptCall wrap *gomock.Call +type MockEncryptionAlgorithmEncryptCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEncryptionAlgorithmEncryptCall) Return(arg0 []byte, arg1 error) *MockEncryptionAlgorithmEncryptCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEncryptionAlgorithmEncryptCall) Do(f func([]byte) ([]byte, error)) *MockEncryptionAlgorithmEncryptCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEncryptionAlgorithmEncryptCall) DoAndReturn(f func([]byte) ([]byte, error)) *MockEncryptionAlgorithmEncryptCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// EncryptionKeyID mocks base method. +func (m *MockEncryptionAlgorithm) EncryptionKeyID() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EncryptionKeyID") + ret0, _ := ret[0].(string) + return ret0 +} + +// EncryptionKeyID indicates an expected call of EncryptionKeyID. +func (mr *MockEncryptionAlgorithmMockRecorder) EncryptionKeyID() *MockEncryptionAlgorithmEncryptionKeyIDCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EncryptionKeyID", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).EncryptionKeyID)) + return &MockEncryptionAlgorithmEncryptionKeyIDCall{Call: call} +} + +// MockEncryptionAlgorithmEncryptionKeyIDCall wrap *gomock.Call +type MockEncryptionAlgorithmEncryptionKeyIDCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockEncryptionAlgorithmEncryptionKeyIDCall) Return(arg0 string) *MockEncryptionAlgorithmEncryptionKeyIDCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockEncryptionAlgorithmEncryptionKeyIDCall) Do(f func() string) *MockEncryptionAlgorithmEncryptionKeyIDCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockEncryptionAlgorithmEncryptionKeyIDCall) DoAndReturn(f func() string) *MockEncryptionAlgorithmEncryptionKeyIDCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/internal/crypto/crypto_mock.go b/internal/crypto/crypto_mock.go deleted file mode 100644 index 4f2adea475..0000000000 --- a/internal/crypto/crypto_mock.go +++ /dev/null @@ -1,126 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: crypto.go -// -// Generated by this command: -// -// mockgen -source crypto.go -destination ./crypto_mock.go -package crypto -// - -// Package crypto is a generated GoMock package. -package crypto - -import ( - reflect "reflect" - - gomock "go.uber.org/mock/gomock" -) - -// MockEncryptionAlgorithm is a mock of EncryptionAlgorithm interface. -type MockEncryptionAlgorithm struct { - ctrl *gomock.Controller - recorder *MockEncryptionAlgorithmMockRecorder -} - -// MockEncryptionAlgorithmMockRecorder is the mock recorder for MockEncryptionAlgorithm. -type MockEncryptionAlgorithmMockRecorder struct { - mock *MockEncryptionAlgorithm -} - -// NewMockEncryptionAlgorithm creates a new mock instance. -func NewMockEncryptionAlgorithm(ctrl *gomock.Controller) *MockEncryptionAlgorithm { - mock := &MockEncryptionAlgorithm{ctrl: ctrl} - mock.recorder = &MockEncryptionAlgorithmMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockEncryptionAlgorithm) EXPECT() *MockEncryptionAlgorithmMockRecorder { - return m.recorder -} - -// Algorithm mocks base method. -func (m *MockEncryptionAlgorithm) Algorithm() string { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Algorithm") - ret0, _ := ret[0].(string) - return ret0 -} - -// Algorithm indicates an expected call of Algorithm. -func (mr *MockEncryptionAlgorithmMockRecorder) Algorithm() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Algorithm", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).Algorithm)) -} - -// Decrypt mocks base method. -func (m *MockEncryptionAlgorithm) Decrypt(hashed []byte, keyID string) ([]byte, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Decrypt", hashed, keyID) - ret0, _ := ret[0].([]byte) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Decrypt indicates an expected call of Decrypt. -func (mr *MockEncryptionAlgorithmMockRecorder) Decrypt(hashed, keyID any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Decrypt", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).Decrypt), hashed, keyID) -} - -// DecryptString mocks base method. -func (m *MockEncryptionAlgorithm) DecryptString(hashed []byte, keyID string) (string, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DecryptString", hashed, keyID) - ret0, _ := ret[0].(string) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// DecryptString indicates an expected call of DecryptString. -func (mr *MockEncryptionAlgorithmMockRecorder) DecryptString(hashed, keyID any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DecryptString", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).DecryptString), hashed, keyID) -} - -// DecryptionKeyIDs mocks base method. -func (m *MockEncryptionAlgorithm) DecryptionKeyIDs() []string { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DecryptionKeyIDs") - ret0, _ := ret[0].([]string) - return ret0 -} - -// DecryptionKeyIDs indicates an expected call of DecryptionKeyIDs. -func (mr *MockEncryptionAlgorithmMockRecorder) DecryptionKeyIDs() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DecryptionKeyIDs", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).DecryptionKeyIDs)) -} - -// Encrypt mocks base method. -func (m *MockEncryptionAlgorithm) Encrypt(value []byte) ([]byte, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Encrypt", value) - ret0, _ := ret[0].([]byte) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Encrypt indicates an expected call of Encrypt. -func (mr *MockEncryptionAlgorithmMockRecorder) Encrypt(value any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Encrypt", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).Encrypt), value) -} - -// EncryptionKeyID mocks base method. -func (m *MockEncryptionAlgorithm) EncryptionKeyID() string { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EncryptionKeyID") - ret0, _ := ret[0].(string) - return ret0 -} - -// EncryptionKeyID indicates an expected call of EncryptionKeyID. -func (mr *MockEncryptionAlgorithmMockRecorder) EncryptionKeyID() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EncryptionKeyID", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).EncryptionKeyID)) -} diff --git a/internal/crypto/generate.go b/internal/crypto/generate.go deleted file mode 100644 index fd3de9f759..0000000000 --- a/internal/crypto/generate.go +++ /dev/null @@ -1,4 +0,0 @@ -package crypto - -//go:generate mockgen -source crypto.go -destination ./crypto_mock.go -package crypto -//go:generate mockgen -source code.go -destination ./code_mock.go -package crypto diff --git a/internal/domain/deviceauthstate_string.go b/internal/domain/deviceauthstate_string.go index df61b82bb2..35eb669554 100644 --- a/internal/domain/deviceauthstate_string.go +++ b/internal/domain/deviceauthstate_string.go @@ -22,8 +22,9 @@ const _DeviceAuthState_name = "undefinedinitiatedapproveddeniedexpireddoneinvali var _DeviceAuthState_index = [...]uint8{0, 9, 18, 26, 32, 39, 43, 50} func (i DeviceAuthState) String() string { - if i >= DeviceAuthState(len(_DeviceAuthState_index)-1) { + idx := int(i) - 0 + if i < 0 || idx >= len(_DeviceAuthState_index)-1 { return "DeviceAuthState(" + strconv.FormatInt(int64(i), 10) + ")" } - return _DeviceAuthState_name[_DeviceAuthState_index[i]:_DeviceAuthState_index[i+1]] + return _DeviceAuthState_name[_DeviceAuthState_index[idx]:_DeviceAuthState_index[idx+1]] } diff --git a/internal/eventstore/mock/queue.mock.go b/internal/eventstore/mock/queue.mock.go index 403a60ad47..5c45965971 100644 --- a/internal/eventstore/mock/queue.mock.go +++ b/internal/eventstore/mock/queue.mock.go @@ -23,6 +23,7 @@ import ( type MockExecutionQueue struct { ctrl *gomock.Controller recorder *MockExecutionQueueMockRecorder + isgomock struct{} } // MockExecutionQueueMockRecorder is the mock recorder for MockExecutionQueue. @@ -43,10 +44,10 @@ func (m *MockExecutionQueue) EXPECT() *MockExecutionQueueMockRecorder { } // InsertManyFastTx mocks base method. -func (m *MockExecutionQueue) InsertManyFastTx(arg0 context.Context, arg1 *sql.Tx, arg2 []river.JobArgs, arg3 ...queue.InsertOpt) error { +func (m *MockExecutionQueue) InsertManyFastTx(ctx context.Context, tx *sql.Tx, args []river.JobArgs, opts ...queue.InsertOpt) error { m.ctrl.T.Helper() - varargs := []any{arg0, arg1, arg2} - for _, a := range arg3 { + varargs := []any{ctx, tx, args} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "InsertManyFastTx", varargs...) @@ -55,8 +56,8 @@ func (m *MockExecutionQueue) InsertManyFastTx(arg0 context.Context, arg1 *sql.Tx } // InsertManyFastTx indicates an expected call of InsertManyFastTx. -func (mr *MockExecutionQueueMockRecorder) InsertManyFastTx(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call { +func (mr *MockExecutionQueueMockRecorder) InsertManyFastTx(ctx, tx, args any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1, arg2}, arg3...) + varargs := append([]any{ctx, tx, args}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsertManyFastTx", reflect.TypeOf((*MockExecutionQueue)(nil).InsertManyFastTx), varargs...) } diff --git a/internal/eventstore/repository/mock/repository.mock.go b/internal/eventstore/repository/mock/repository.mock.go index 12925bc975..2fddcc76be 100644 --- a/internal/eventstore/repository/mock/repository.mock.go +++ b/internal/eventstore/repository/mock/repository.mock.go @@ -23,6 +23,7 @@ import ( type MockQuerier struct { ctrl *gomock.Controller recorder *MockQuerierMockRecorder + isgomock struct{} } // MockQuerierMockRecorder is the mock recorder for MockQuerier. @@ -57,67 +58,68 @@ func (mr *MockQuerierMockRecorder) Client() *gomock.Call { } // FilterToReducer mocks base method. -func (m *MockQuerier) FilterToReducer(arg0 context.Context, arg1 *eventstore.SearchQueryBuilder, arg2 eventstore.Reducer) error { +func (m *MockQuerier) FilterToReducer(ctx context.Context, searchQuery *eventstore.SearchQueryBuilder, r eventstore.Reducer) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "FilterToReducer", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "FilterToReducer", ctx, searchQuery, r) ret0, _ := ret[0].(error) return ret0 } // FilterToReducer indicates an expected call of FilterToReducer. -func (mr *MockQuerierMockRecorder) FilterToReducer(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockQuerierMockRecorder) FilterToReducer(ctx, searchQuery, r any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FilterToReducer", reflect.TypeOf((*MockQuerier)(nil).FilterToReducer), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FilterToReducer", reflect.TypeOf((*MockQuerier)(nil).FilterToReducer), ctx, searchQuery, r) } // Health mocks base method. -func (m *MockQuerier) Health(arg0 context.Context) error { +func (m *MockQuerier) Health(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Health", arg0) + ret := m.ctrl.Call(m, "Health", ctx) ret0, _ := ret[0].(error) return ret0 } // Health indicates an expected call of Health. -func (mr *MockQuerierMockRecorder) Health(arg0 any) *gomock.Call { +func (mr *MockQuerierMockRecorder) Health(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Health", reflect.TypeOf((*MockQuerier)(nil).Health), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Health", reflect.TypeOf((*MockQuerier)(nil).Health), ctx) } // InstanceIDs mocks base method. -func (m *MockQuerier) InstanceIDs(arg0 context.Context, arg1 *eventstore.SearchQueryBuilder) ([]string, error) { +func (m *MockQuerier) InstanceIDs(ctx context.Context, queryFactory *eventstore.SearchQueryBuilder) ([]string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "InstanceIDs", arg0, arg1) + ret := m.ctrl.Call(m, "InstanceIDs", ctx, queryFactory) ret0, _ := ret[0].([]string) ret1, _ := ret[1].(error) return ret0, ret1 } // InstanceIDs indicates an expected call of InstanceIDs. -func (mr *MockQuerierMockRecorder) InstanceIDs(arg0, arg1 any) *gomock.Call { +func (mr *MockQuerierMockRecorder) InstanceIDs(ctx, queryFactory any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceIDs", reflect.TypeOf((*MockQuerier)(nil).InstanceIDs), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceIDs", reflect.TypeOf((*MockQuerier)(nil).InstanceIDs), ctx, queryFactory) } // LatestPosition mocks base method. -func (m *MockQuerier) LatestPosition(arg0 context.Context, arg1 *eventstore.SearchQueryBuilder) (decimal.Decimal, error) { +func (m *MockQuerier) LatestPosition(ctx context.Context, queryFactory *eventstore.SearchQueryBuilder) (decimal.Decimal, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LatestPosition", arg0, arg1) + ret := m.ctrl.Call(m, "LatestPosition", ctx, queryFactory) ret0, _ := ret[0].(decimal.Decimal) ret1, _ := ret[1].(error) return ret0, ret1 } // LatestPosition indicates an expected call of LatestPosition. -func (mr *MockQuerierMockRecorder) LatestPosition(arg0, arg1 any) *gomock.Call { +func (mr *MockQuerierMockRecorder) LatestPosition(ctx, queryFactory any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestPosition", reflect.TypeOf((*MockQuerier)(nil).LatestPosition), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestPosition", reflect.TypeOf((*MockQuerier)(nil).LatestPosition), ctx, queryFactory) } // MockPusher is a mock of Pusher interface. type MockPusher struct { ctrl *gomock.Controller recorder *MockPusherMockRecorder + isgomock struct{} } // MockPusherMockRecorder is the mock recorder for MockPusher. @@ -152,24 +154,24 @@ func (mr *MockPusherMockRecorder) Client() *gomock.Call { } // Health mocks base method. -func (m *MockPusher) Health(arg0 context.Context) error { +func (m *MockPusher) Health(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Health", arg0) + ret := m.ctrl.Call(m, "Health", ctx) ret0, _ := ret[0].(error) return ret0 } // Health indicates an expected call of Health. -func (mr *MockPusherMockRecorder) Health(arg0 any) *gomock.Call { +func (mr *MockPusherMockRecorder) Health(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Health", reflect.TypeOf((*MockPusher)(nil).Health), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Health", reflect.TypeOf((*MockPusher)(nil).Health), ctx) } // Push mocks base method. -func (m *MockPusher) Push(arg0 context.Context, arg1 database.ContextQueryExecuter, arg2 ...eventstore.Command) ([]eventstore.Event, error) { +func (m *MockPusher) Push(ctx context.Context, client database.ContextQueryExecuter, commands ...eventstore.Command) ([]eventstore.Event, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, client} + for _, a := range commands { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "Push", varargs...) @@ -179,8 +181,8 @@ func (m *MockPusher) Push(arg0 context.Context, arg1 database.ContextQueryExecut } // Push indicates an expected call of Push. -func (mr *MockPusherMockRecorder) Push(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockPusherMockRecorder) Push(ctx, client any, commands ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, client}, commands...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Push", reflect.TypeOf((*MockPusher)(nil).Push), varargs...) } diff --git a/internal/execution/gen_mock.go b/internal/execution/gen_mock.go deleted file mode 100644 index 80f25fb216..0000000000 --- a/internal/execution/gen_mock.go +++ /dev/null @@ -1,3 +0,0 @@ -package execution - -//go:generate mockgen -package mock -destination ./mock/queue.mock.go github.com/zitadel/zitadel/internal/execution Queue diff --git a/internal/id/mock/generator.mock.go b/internal/id/mock/generator.mock.go index 9fce9d9581..1887974871 100644 --- a/internal/id/mock/generator.mock.go +++ b/internal/id/mock/generator.mock.go @@ -19,6 +19,7 @@ import ( type MockGenerator struct { ctrl *gomock.Controller recorder *MockGeneratorMockRecorder + isgomock struct{} } // MockGeneratorMockRecorder is the mock recorder for MockGenerator. diff --git a/internal/notification/channels/mock/channel.mock.go b/internal/notification/channels/mock/channel.mock.go index 3594178a4d..e49886b2c0 100644 --- a/internal/notification/channels/mock/channel.mock.go +++ b/internal/notification/channels/mock/channel.mock.go @@ -20,6 +20,7 @@ import ( type MockNotificationChannel struct { ctrl *gomock.Controller recorder *MockNotificationChannelMockRecorder + isgomock struct{} } // MockNotificationChannelMockRecorder is the mock recorder for MockNotificationChannel. @@ -40,15 +41,15 @@ func (m *MockNotificationChannel) EXPECT() *MockNotificationChannelMockRecorder } // HandleMessage mocks base method. -func (m *MockNotificationChannel) HandleMessage(arg0 channels.Message) error { +func (m *MockNotificationChannel) HandleMessage(message channels.Message) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HandleMessage", arg0) + ret := m.ctrl.Call(m, "HandleMessage", message) ret0, _ := ret[0].(error) return ret0 } // HandleMessage indicates an expected call of HandleMessage. -func (mr *MockNotificationChannelMockRecorder) HandleMessage(arg0 any) *gomock.Call { +func (mr *MockNotificationChannelMockRecorder) HandleMessage(message any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleMessage", reflect.TypeOf((*MockNotificationChannel)(nil).HandleMessage), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleMessage", reflect.TypeOf((*MockNotificationChannel)(nil).HandleMessage), message) } diff --git a/internal/notification/channels/mock/message.mock.go b/internal/notification/channels/mock/message.mock.go index d05dc0ff9e..6d2ae76e47 100644 --- a/internal/notification/channels/mock/message.mock.go +++ b/internal/notification/channels/mock/message.mock.go @@ -20,6 +20,7 @@ import ( type MockMessage struct { ctrl *gomock.Controller recorder *MockMessageMockRecorder + isgomock struct{} } // MockMessageMockRecorder is the mock recorder for MockMessage. diff --git a/internal/notification/handlers/mock/commands.mock.go b/internal/notification/handlers/mock/commands.mock.go index 8cb525fa13..270b2b225c 100644 --- a/internal/notification/handlers/mock/commands.mock.go +++ b/internal/notification/handlers/mock/commands.mock.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -typed -package mock -destination ./mock/commands.mock.go . Commands +// mockgen -package mock -destination ./mock/commands.mock.go github.com/zitadel/zitadel/internal/notification/handlers Commands // // Package mock is a generated GoMock package. @@ -44,17 +44,17 @@ func (m *MockCommands) EXPECT() *MockCommandsMockRecorder { } // BackChannelLogoutSent mocks base method. -func (m *MockCommands) BackChannelLogoutSent(arg0 context.Context, arg1, arg2, arg3 string) error { +func (m *MockCommands) BackChannelLogoutSent(ctx context.Context, id, oidcSessionID, instanceID string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BackChannelLogoutSent", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "BackChannelLogoutSent", ctx, id, oidcSessionID, instanceID) ret0, _ := ret[0].(error) return ret0 } // BackChannelLogoutSent indicates an expected call of BackChannelLogoutSent. -func (mr *MockCommandsMockRecorder) BackChannelLogoutSent(arg0, arg1, arg2, arg3 any) *gomock.Call { +func (mr *MockCommandsMockRecorder) BackChannelLogoutSent(ctx, id, oidcSessionID, instanceID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BackChannelLogoutSent", reflect.TypeOf((*MockCommands)(nil).BackChannelLogoutSent), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BackChannelLogoutSent", reflect.TypeOf((*MockCommands)(nil).BackChannelLogoutSent), ctx, id, oidcSessionID, instanceID) } // HumanEmailVerificationCodeSent mocks base method. @@ -66,33 +66,9 @@ func (m *MockCommands) HumanEmailVerificationCodeSent(ctx context.Context, orgID } // HumanEmailVerificationCodeSent indicates an expected call of HumanEmailVerificationCodeSent. -func (mr *MockCommandsMockRecorder) HumanEmailVerificationCodeSent(ctx, orgID, userID any) *MockCommandsHumanEmailVerificationCodeSentCall { +func (mr *MockCommandsMockRecorder) HumanEmailVerificationCodeSent(ctx, orgID, userID any) *gomock.Call { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HumanEmailVerificationCodeSent", reflect.TypeOf((*MockCommands)(nil).HumanEmailVerificationCodeSent), ctx, orgID, userID) - return &MockCommandsHumanEmailVerificationCodeSentCall{Call: call} -} - -// MockCommandsHumanEmailVerificationCodeSentCall wrap *gomock.Call -type MockCommandsHumanEmailVerificationCodeSentCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *MockCommandsHumanEmailVerificationCodeSentCall) Return(arg0 error) *MockCommandsHumanEmailVerificationCodeSentCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *MockCommandsHumanEmailVerificationCodeSentCall) Do(f func(context.Context, string, string) error) *MockCommandsHumanEmailVerificationCodeSentCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MockCommandsHumanEmailVerificationCodeSentCall) DoAndReturn(f func(context.Context, string, string) error) *MockCommandsHumanEmailVerificationCodeSentCall { - c.Call = c.Call.DoAndReturn(f) - return c + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HumanEmailVerificationCodeSent", reflect.TypeOf((*MockCommands)(nil).HumanEmailVerificationCodeSent), ctx, orgID, userID) } // HumanInitCodeSent mocks base method. @@ -104,33 +80,9 @@ func (m *MockCommands) HumanInitCodeSent(ctx context.Context, orgID, userID stri } // HumanInitCodeSent indicates an expected call of HumanInitCodeSent. -func (mr *MockCommandsMockRecorder) HumanInitCodeSent(ctx, orgID, userID any) *MockCommandsHumanInitCodeSentCall { +func (mr *MockCommandsMockRecorder) HumanInitCodeSent(ctx, orgID, userID any) *gomock.Call { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HumanInitCodeSent", reflect.TypeOf((*MockCommands)(nil).HumanInitCodeSent), ctx, orgID, userID) - return &MockCommandsHumanInitCodeSentCall{Call: call} -} - -// MockCommandsHumanInitCodeSentCall wrap *gomock.Call -type MockCommandsHumanInitCodeSentCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *MockCommandsHumanInitCodeSentCall) Return(arg0 error) *MockCommandsHumanInitCodeSentCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *MockCommandsHumanInitCodeSentCall) Do(f func(context.Context, string, string) error) *MockCommandsHumanInitCodeSentCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MockCommandsHumanInitCodeSentCall) DoAndReturn(f func(context.Context, string, string) error) *MockCommandsHumanInitCodeSentCall { - c.Call = c.Call.DoAndReturn(f) - return c + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HumanInitCodeSent", reflect.TypeOf((*MockCommands)(nil).HumanInitCodeSent), ctx, orgID, userID) } // HumanOTPEmailCodeSent mocks base method. @@ -142,33 +94,9 @@ func (m *MockCommands) HumanOTPEmailCodeSent(ctx context.Context, userID, resour } // HumanOTPEmailCodeSent indicates an expected call of HumanOTPEmailCodeSent. -func (mr *MockCommandsMockRecorder) HumanOTPEmailCodeSent(ctx, userID, resourceOwner any) *MockCommandsHumanOTPEmailCodeSentCall { +func (mr *MockCommandsMockRecorder) HumanOTPEmailCodeSent(ctx, userID, resourceOwner any) *gomock.Call { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HumanOTPEmailCodeSent", reflect.TypeOf((*MockCommands)(nil).HumanOTPEmailCodeSent), ctx, userID, resourceOwner) - return &MockCommandsHumanOTPEmailCodeSentCall{Call: call} -} - -// MockCommandsHumanOTPEmailCodeSentCall wrap *gomock.Call -type MockCommandsHumanOTPEmailCodeSentCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *MockCommandsHumanOTPEmailCodeSentCall) Return(arg0 error) *MockCommandsHumanOTPEmailCodeSentCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *MockCommandsHumanOTPEmailCodeSentCall) Do(f func(context.Context, string, string) error) *MockCommandsHumanOTPEmailCodeSentCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MockCommandsHumanOTPEmailCodeSentCall) DoAndReturn(f func(context.Context, string, string) error) *MockCommandsHumanOTPEmailCodeSentCall { - c.Call = c.Call.DoAndReturn(f) - return c + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HumanOTPEmailCodeSent", reflect.TypeOf((*MockCommands)(nil).HumanOTPEmailCodeSent), ctx, userID, resourceOwner) } // HumanOTPSMSCodeSent mocks base method. @@ -180,33 +108,9 @@ func (m *MockCommands) HumanOTPSMSCodeSent(ctx context.Context, userID, resource } // HumanOTPSMSCodeSent indicates an expected call of HumanOTPSMSCodeSent. -func (mr *MockCommandsMockRecorder) HumanOTPSMSCodeSent(ctx, userID, resourceOwner, generatorInfo any) *MockCommandsHumanOTPSMSCodeSentCall { +func (mr *MockCommandsMockRecorder) HumanOTPSMSCodeSent(ctx, userID, resourceOwner, generatorInfo any) *gomock.Call { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HumanOTPSMSCodeSent", reflect.TypeOf((*MockCommands)(nil).HumanOTPSMSCodeSent), ctx, userID, resourceOwner, generatorInfo) - return &MockCommandsHumanOTPSMSCodeSentCall{Call: call} -} - -// MockCommandsHumanOTPSMSCodeSentCall wrap *gomock.Call -type MockCommandsHumanOTPSMSCodeSentCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *MockCommandsHumanOTPSMSCodeSentCall) Return(arg0 error) *MockCommandsHumanOTPSMSCodeSentCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *MockCommandsHumanOTPSMSCodeSentCall) Do(f func(context.Context, string, string, *senders.CodeGeneratorInfo) error) *MockCommandsHumanOTPSMSCodeSentCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MockCommandsHumanOTPSMSCodeSentCall) DoAndReturn(f func(context.Context, string, string, *senders.CodeGeneratorInfo) error) *MockCommandsHumanOTPSMSCodeSentCall { - c.Call = c.Call.DoAndReturn(f) - return c + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HumanOTPSMSCodeSent", reflect.TypeOf((*MockCommands)(nil).HumanOTPSMSCodeSent), ctx, userID, resourceOwner, generatorInfo) } // HumanPasswordlessInitCodeSent mocks base method. @@ -218,33 +122,9 @@ func (m *MockCommands) HumanPasswordlessInitCodeSent(ctx context.Context, userID } // HumanPasswordlessInitCodeSent indicates an expected call of HumanPasswordlessInitCodeSent. -func (mr *MockCommandsMockRecorder) HumanPasswordlessInitCodeSent(ctx, userID, resourceOwner, codeID any) *MockCommandsHumanPasswordlessInitCodeSentCall { +func (mr *MockCommandsMockRecorder) HumanPasswordlessInitCodeSent(ctx, userID, resourceOwner, codeID any) *gomock.Call { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HumanPasswordlessInitCodeSent", reflect.TypeOf((*MockCommands)(nil).HumanPasswordlessInitCodeSent), ctx, userID, resourceOwner, codeID) - return &MockCommandsHumanPasswordlessInitCodeSentCall{Call: call} -} - -// MockCommandsHumanPasswordlessInitCodeSentCall wrap *gomock.Call -type MockCommandsHumanPasswordlessInitCodeSentCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *MockCommandsHumanPasswordlessInitCodeSentCall) Return(arg0 error) *MockCommandsHumanPasswordlessInitCodeSentCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *MockCommandsHumanPasswordlessInitCodeSentCall) Do(f func(context.Context, string, string, string) error) *MockCommandsHumanPasswordlessInitCodeSentCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MockCommandsHumanPasswordlessInitCodeSentCall) DoAndReturn(f func(context.Context, string, string, string) error) *MockCommandsHumanPasswordlessInitCodeSentCall { - c.Call = c.Call.DoAndReturn(f) - return c + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HumanPasswordlessInitCodeSent", reflect.TypeOf((*MockCommands)(nil).HumanPasswordlessInitCodeSent), ctx, userID, resourceOwner, codeID) } // HumanPhoneVerificationCodeSent mocks base method. @@ -256,33 +136,9 @@ func (m *MockCommands) HumanPhoneVerificationCodeSent(ctx context.Context, orgID } // HumanPhoneVerificationCodeSent indicates an expected call of HumanPhoneVerificationCodeSent. -func (mr *MockCommandsMockRecorder) HumanPhoneVerificationCodeSent(ctx, orgID, userID, generatorInfo any) *MockCommandsHumanPhoneVerificationCodeSentCall { +func (mr *MockCommandsMockRecorder) HumanPhoneVerificationCodeSent(ctx, orgID, userID, generatorInfo any) *gomock.Call { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HumanPhoneVerificationCodeSent", reflect.TypeOf((*MockCommands)(nil).HumanPhoneVerificationCodeSent), ctx, orgID, userID, generatorInfo) - return &MockCommandsHumanPhoneVerificationCodeSentCall{Call: call} -} - -// MockCommandsHumanPhoneVerificationCodeSentCall wrap *gomock.Call -type MockCommandsHumanPhoneVerificationCodeSentCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *MockCommandsHumanPhoneVerificationCodeSentCall) Return(arg0 error) *MockCommandsHumanPhoneVerificationCodeSentCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *MockCommandsHumanPhoneVerificationCodeSentCall) Do(f func(context.Context, string, string, *senders.CodeGeneratorInfo) error) *MockCommandsHumanPhoneVerificationCodeSentCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MockCommandsHumanPhoneVerificationCodeSentCall) DoAndReturn(f func(context.Context, string, string, *senders.CodeGeneratorInfo) error) *MockCommandsHumanPhoneVerificationCodeSentCall { - c.Call = c.Call.DoAndReturn(f) - return c + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HumanPhoneVerificationCodeSent", reflect.TypeOf((*MockCommands)(nil).HumanPhoneVerificationCodeSent), ctx, orgID, userID, generatorInfo) } // InviteCodeSent mocks base method. @@ -294,33 +150,9 @@ func (m *MockCommands) InviteCodeSent(ctx context.Context, orgID, userID string) } // InviteCodeSent indicates an expected call of InviteCodeSent. -func (mr *MockCommandsMockRecorder) InviteCodeSent(ctx, orgID, userID any) *MockCommandsInviteCodeSentCall { +func (mr *MockCommandsMockRecorder) InviteCodeSent(ctx, orgID, userID any) *gomock.Call { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InviteCodeSent", reflect.TypeOf((*MockCommands)(nil).InviteCodeSent), ctx, orgID, userID) - return &MockCommandsInviteCodeSentCall{Call: call} -} - -// MockCommandsInviteCodeSentCall wrap *gomock.Call -type MockCommandsInviteCodeSentCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *MockCommandsInviteCodeSentCall) Return(arg0 error) *MockCommandsInviteCodeSentCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *MockCommandsInviteCodeSentCall) Do(f func(context.Context, string, string) error) *MockCommandsInviteCodeSentCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MockCommandsInviteCodeSentCall) DoAndReturn(f func(context.Context, string, string) error) *MockCommandsInviteCodeSentCall { - c.Call = c.Call.DoAndReturn(f) - return c + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InviteCodeSent", reflect.TypeOf((*MockCommands)(nil).InviteCodeSent), ctx, orgID, userID) } // MilestonePushed mocks base method. @@ -332,33 +164,9 @@ func (m *MockCommands) MilestonePushed(ctx context.Context, instanceID string, m } // MilestonePushed indicates an expected call of MilestonePushed. -func (mr *MockCommandsMockRecorder) MilestonePushed(ctx, instanceID, msType, endpoints any) *MockCommandsMilestonePushedCall { +func (mr *MockCommandsMockRecorder) MilestonePushed(ctx, instanceID, msType, endpoints any) *gomock.Call { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MilestonePushed", reflect.TypeOf((*MockCommands)(nil).MilestonePushed), ctx, instanceID, msType, endpoints) - return &MockCommandsMilestonePushedCall{Call: call} -} - -// MockCommandsMilestonePushedCall wrap *gomock.Call -type MockCommandsMilestonePushedCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *MockCommandsMilestonePushedCall) Return(arg0 error) *MockCommandsMilestonePushedCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *MockCommandsMilestonePushedCall) Do(f func(context.Context, string, milestone.Type, []string) error) *MockCommandsMilestonePushedCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MockCommandsMilestonePushedCall) DoAndReturn(f func(context.Context, string, milestone.Type, []string) error) *MockCommandsMilestonePushedCall { - c.Call = c.Call.DoAndReturn(f) - return c + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MilestonePushed", reflect.TypeOf((*MockCommands)(nil).MilestonePushed), ctx, instanceID, msType, endpoints) } // OTPEmailSent mocks base method. @@ -370,33 +178,9 @@ func (m *MockCommands) OTPEmailSent(ctx context.Context, sessionID, resourceOwne } // OTPEmailSent indicates an expected call of OTPEmailSent. -func (mr *MockCommandsMockRecorder) OTPEmailSent(ctx, sessionID, resourceOwner any) *MockCommandsOTPEmailSentCall { +func (mr *MockCommandsMockRecorder) OTPEmailSent(ctx, sessionID, resourceOwner any) *gomock.Call { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OTPEmailSent", reflect.TypeOf((*MockCommands)(nil).OTPEmailSent), ctx, sessionID, resourceOwner) - return &MockCommandsOTPEmailSentCall{Call: call} -} - -// MockCommandsOTPEmailSentCall wrap *gomock.Call -type MockCommandsOTPEmailSentCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *MockCommandsOTPEmailSentCall) Return(arg0 error) *MockCommandsOTPEmailSentCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *MockCommandsOTPEmailSentCall) Do(f func(context.Context, string, string) error) *MockCommandsOTPEmailSentCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MockCommandsOTPEmailSentCall) DoAndReturn(f func(context.Context, string, string) error) *MockCommandsOTPEmailSentCall { - c.Call = c.Call.DoAndReturn(f) - return c + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OTPEmailSent", reflect.TypeOf((*MockCommands)(nil).OTPEmailSent), ctx, sessionID, resourceOwner) } // OTPSMSSent mocks base method. @@ -408,33 +192,9 @@ func (m *MockCommands) OTPSMSSent(ctx context.Context, sessionID, resourceOwner } // OTPSMSSent indicates an expected call of OTPSMSSent. -func (mr *MockCommandsMockRecorder) OTPSMSSent(ctx, sessionID, resourceOwner, generatorInfo any) *MockCommandsOTPSMSSentCall { +func (mr *MockCommandsMockRecorder) OTPSMSSent(ctx, sessionID, resourceOwner, generatorInfo any) *gomock.Call { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OTPSMSSent", reflect.TypeOf((*MockCommands)(nil).OTPSMSSent), ctx, sessionID, resourceOwner, generatorInfo) - return &MockCommandsOTPSMSSentCall{Call: call} -} - -// MockCommandsOTPSMSSentCall wrap *gomock.Call -type MockCommandsOTPSMSSentCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *MockCommandsOTPSMSSentCall) Return(arg0 error) *MockCommandsOTPSMSSentCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *MockCommandsOTPSMSSentCall) Do(f func(context.Context, string, string, *senders.CodeGeneratorInfo) error) *MockCommandsOTPSMSSentCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MockCommandsOTPSMSSentCall) DoAndReturn(f func(context.Context, string, string, *senders.CodeGeneratorInfo) error) *MockCommandsOTPSMSSentCall { - c.Call = c.Call.DoAndReturn(f) - return c + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OTPSMSSent", reflect.TypeOf((*MockCommands)(nil).OTPSMSSent), ctx, sessionID, resourceOwner, generatorInfo) } // PasswordChangeSent mocks base method. @@ -446,33 +206,9 @@ func (m *MockCommands) PasswordChangeSent(ctx context.Context, orgID, userID str } // PasswordChangeSent indicates an expected call of PasswordChangeSent. -func (mr *MockCommandsMockRecorder) PasswordChangeSent(ctx, orgID, userID any) *MockCommandsPasswordChangeSentCall { +func (mr *MockCommandsMockRecorder) PasswordChangeSent(ctx, orgID, userID any) *gomock.Call { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PasswordChangeSent", reflect.TypeOf((*MockCommands)(nil).PasswordChangeSent), ctx, orgID, userID) - return &MockCommandsPasswordChangeSentCall{Call: call} -} - -// MockCommandsPasswordChangeSentCall wrap *gomock.Call -type MockCommandsPasswordChangeSentCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *MockCommandsPasswordChangeSentCall) Return(arg0 error) *MockCommandsPasswordChangeSentCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *MockCommandsPasswordChangeSentCall) Do(f func(context.Context, string, string) error) *MockCommandsPasswordChangeSentCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MockCommandsPasswordChangeSentCall) DoAndReturn(f func(context.Context, string, string) error) *MockCommandsPasswordChangeSentCall { - c.Call = c.Call.DoAndReturn(f) - return c + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PasswordChangeSent", reflect.TypeOf((*MockCommands)(nil).PasswordChangeSent), ctx, orgID, userID) } // PasswordCodeSent mocks base method. @@ -484,33 +220,9 @@ func (m *MockCommands) PasswordCodeSent(ctx context.Context, orgID, userID strin } // PasswordCodeSent indicates an expected call of PasswordCodeSent. -func (mr *MockCommandsMockRecorder) PasswordCodeSent(ctx, orgID, userID, generatorInfo any) *MockCommandsPasswordCodeSentCall { +func (mr *MockCommandsMockRecorder) PasswordCodeSent(ctx, orgID, userID, generatorInfo any) *gomock.Call { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PasswordCodeSent", reflect.TypeOf((*MockCommands)(nil).PasswordCodeSent), ctx, orgID, userID, generatorInfo) - return &MockCommandsPasswordCodeSentCall{Call: call} -} - -// MockCommandsPasswordCodeSentCall wrap *gomock.Call -type MockCommandsPasswordCodeSentCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *MockCommandsPasswordCodeSentCall) Return(arg0 error) *MockCommandsPasswordCodeSentCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *MockCommandsPasswordCodeSentCall) Do(f func(context.Context, string, string, *senders.CodeGeneratorInfo) error) *MockCommandsPasswordCodeSentCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MockCommandsPasswordCodeSentCall) DoAndReturn(f func(context.Context, string, string, *senders.CodeGeneratorInfo) error) *MockCommandsPasswordCodeSentCall { - c.Call = c.Call.DoAndReturn(f) - return c + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PasswordCodeSent", reflect.TypeOf((*MockCommands)(nil).PasswordCodeSent), ctx, orgID, userID, generatorInfo) } // UsageNotificationSent mocks base method. @@ -522,33 +234,9 @@ func (m *MockCommands) UsageNotificationSent(ctx context.Context, dueEvent *quot } // UsageNotificationSent indicates an expected call of UsageNotificationSent. -func (mr *MockCommandsMockRecorder) UsageNotificationSent(ctx, dueEvent any) *MockCommandsUsageNotificationSentCall { +func (mr *MockCommandsMockRecorder) UsageNotificationSent(ctx, dueEvent any) *gomock.Call { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UsageNotificationSent", reflect.TypeOf((*MockCommands)(nil).UsageNotificationSent), ctx, dueEvent) - return &MockCommandsUsageNotificationSentCall{Call: call} -} - -// MockCommandsUsageNotificationSentCall wrap *gomock.Call -type MockCommandsUsageNotificationSentCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *MockCommandsUsageNotificationSentCall) Return(arg0 error) *MockCommandsUsageNotificationSentCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *MockCommandsUsageNotificationSentCall) Do(f func(context.Context, *quota.NotificationDueEvent) error) *MockCommandsUsageNotificationSentCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MockCommandsUsageNotificationSentCall) DoAndReturn(f func(context.Context, *quota.NotificationDueEvent) error) *MockCommandsUsageNotificationSentCall { - c.Call = c.Call.DoAndReturn(f) - return c + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UsageNotificationSent", reflect.TypeOf((*MockCommands)(nil).UsageNotificationSent), ctx, dueEvent) } // UserDomainClaimedSent mocks base method. @@ -560,31 +248,7 @@ func (m *MockCommands) UserDomainClaimedSent(ctx context.Context, orgID, userID } // UserDomainClaimedSent indicates an expected call of UserDomainClaimedSent. -func (mr *MockCommandsMockRecorder) UserDomainClaimedSent(ctx, orgID, userID any) *MockCommandsUserDomainClaimedSentCall { +func (mr *MockCommandsMockRecorder) UserDomainClaimedSent(ctx, orgID, userID any) *gomock.Call { mr.mock.ctrl.T.Helper() - call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserDomainClaimedSent", reflect.TypeOf((*MockCommands)(nil).UserDomainClaimedSent), ctx, orgID, userID) - return &MockCommandsUserDomainClaimedSentCall{Call: call} -} - -// MockCommandsUserDomainClaimedSentCall wrap *gomock.Call -type MockCommandsUserDomainClaimedSentCall struct { - *gomock.Call -} - -// Return rewrite *gomock.Call.Return -func (c *MockCommandsUserDomainClaimedSentCall) Return(arg0 error) *MockCommandsUserDomainClaimedSentCall { - c.Call = c.Call.Return(arg0) - return c -} - -// Do rewrite *gomock.Call.Do -func (c *MockCommandsUserDomainClaimedSentCall) Do(f func(context.Context, string, string) error) *MockCommandsUserDomainClaimedSentCall { - c.Call = c.Call.Do(f) - return c -} - -// DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *MockCommandsUserDomainClaimedSentCall) DoAndReturn(f func(context.Context, string, string) error) *MockCommandsUserDomainClaimedSentCall { - c.Call = c.Call.DoAndReturn(f) - return c + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserDomainClaimedSent", reflect.TypeOf((*MockCommands)(nil).UserDomainClaimedSent), ctx, orgID, userID) } diff --git a/internal/notification/senders/mock/code_generator.mock.go b/internal/notification/senders/mock/code_generator.mock.go index 15bdd2cc31..37969df292 100644 --- a/internal/notification/senders/mock/code_generator.mock.go +++ b/internal/notification/senders/mock/code_generator.mock.go @@ -19,6 +19,7 @@ import ( type MockCodeGenerator struct { ctrl *gomock.Controller recorder *MockCodeGeneratorMockRecorder + isgomock struct{} } // MockCodeGeneratorMockRecorder is the mock recorder for MockCodeGenerator. @@ -39,15 +40,15 @@ func (m *MockCodeGenerator) EXPECT() *MockCodeGeneratorMockRecorder { } // VerifyCode mocks base method. -func (m *MockCodeGenerator) VerifyCode(arg0, arg1 string) error { +func (m *MockCodeGenerator) VerifyCode(verificationID, code string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "VerifyCode", arg0, arg1) + ret := m.ctrl.Call(m, "VerifyCode", verificationID, code) ret0, _ := ret[0].(error) return ret0 } // VerifyCode indicates an expected call of VerifyCode. -func (mr *MockCodeGeneratorMockRecorder) VerifyCode(arg0, arg1 any) *gomock.Call { +func (mr *MockCodeGeneratorMockRecorder) VerifyCode(verificationID, code any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyCode", reflect.TypeOf((*MockCodeGenerator)(nil).VerifyCode), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyCode", reflect.TypeOf((*MockCodeGenerator)(nil).VerifyCode), verificationID, code) } diff --git a/internal/serviceping/mock/queries.mock.go b/internal/serviceping/mock/queries.mock.go index a19484a389..593c4d5ff7 100644 --- a/internal/serviceping/mock/queries.mock.go +++ b/internal/serviceping/mock/queries.mock.go @@ -21,6 +21,7 @@ import ( type MockQueries struct { ctrl *gomock.Controller recorder *MockQueriesMockRecorder + isgomock struct{} } // MockQueriesMockRecorder is the mock recorder for MockQueries. @@ -41,31 +42,31 @@ func (m *MockQueries) EXPECT() *MockQueriesMockRecorder { } // ListResourceCounts mocks base method. -func (m *MockQueries) ListResourceCounts(arg0 context.Context, arg1, arg2 int) ([]query.ResourceCount, error) { +func (m *MockQueries) ListResourceCounts(ctx context.Context, lastID, size int) ([]query.ResourceCount, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListResourceCounts", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ListResourceCounts", ctx, lastID, size) ret0, _ := ret[0].([]query.ResourceCount) ret1, _ := ret[1].(error) return ret0, ret1 } // ListResourceCounts indicates an expected call of ListResourceCounts. -func (mr *MockQueriesMockRecorder) ListResourceCounts(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockQueriesMockRecorder) ListResourceCounts(ctx, lastID, size any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceCounts", reflect.TypeOf((*MockQueries)(nil).ListResourceCounts), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceCounts", reflect.TypeOf((*MockQueries)(nil).ListResourceCounts), ctx, lastID, size) } // SearchInstances mocks base method. -func (m *MockQueries) SearchInstances(arg0 context.Context, arg1 *query.InstanceSearchQueries) (*query.Instances, error) { +func (m *MockQueries) SearchInstances(ctx context.Context, queries *query.InstanceSearchQueries) (*query.Instances, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SearchInstances", arg0, arg1) + ret := m.ctrl.Call(m, "SearchInstances", ctx, queries) ret0, _ := ret[0].(*query.Instances) ret1, _ := ret[1].(error) return ret0, ret1 } // SearchInstances indicates an expected call of SearchInstances. -func (mr *MockQueriesMockRecorder) SearchInstances(arg0, arg1 any) *gomock.Call { +func (mr *MockQueriesMockRecorder) SearchInstances(ctx, queries any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SearchInstances", reflect.TypeOf((*MockQueries)(nil).SearchInstances), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SearchInstances", reflect.TypeOf((*MockQueries)(nil).SearchInstances), ctx, queries) } diff --git a/internal/serviceping/mock/queue.mock.go b/internal/serviceping/mock/queue.mock.go index 0eb606bed5..e984352a8c 100644 --- a/internal/serviceping/mock/queue.mock.go +++ b/internal/serviceping/mock/queue.mock.go @@ -22,6 +22,7 @@ import ( type MockQueue struct { ctrl *gomock.Controller recorder *MockQueueMockRecorder + isgomock struct{} } // MockQueueMockRecorder is the mock recorder for MockQueue. @@ -42,10 +43,10 @@ func (m *MockQueue) EXPECT() *MockQueueMockRecorder { } // Insert mocks base method. -func (m *MockQueue) Insert(arg0 context.Context, arg1 river.JobArgs, arg2 ...queue.InsertOpt) error { +func (m *MockQueue) Insert(ctx context.Context, args river.JobArgs, opts ...queue.InsertOpt) error { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, args} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "Insert", varargs...) @@ -54,8 +55,8 @@ func (m *MockQueue) Insert(arg0 context.Context, arg1 river.JobArgs, arg2 ...que } // Insert indicates an expected call of Insert. -func (mr *MockQueueMockRecorder) Insert(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockQueueMockRecorder) Insert(ctx, args any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, args}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Insert", reflect.TypeOf((*MockQueue)(nil).Insert), varargs...) } diff --git a/internal/serviceping/mock/telemetry.mock.go b/internal/serviceping/mock/telemetry.mock.go index d7f0351a03..536bf34671 100644 --- a/internal/serviceping/mock/telemetry.mock.go +++ b/internal/serviceping/mock/telemetry.mock.go @@ -22,6 +22,7 @@ import ( type MockTelemetryServiceClient struct { ctrl *gomock.Controller recorder *MockTelemetryServiceClientMockRecorder + isgomock struct{} } // MockTelemetryServiceClientMockRecorder is the mock recorder for MockTelemetryServiceClient. @@ -42,10 +43,10 @@ func (m *MockTelemetryServiceClient) EXPECT() *MockTelemetryServiceClientMockRec } // ReportBaseInformation mocks base method. -func (m *MockTelemetryServiceClient) ReportBaseInformation(arg0 context.Context, arg1 *analytics.ReportBaseInformationRequest, arg2 ...grpc.CallOption) (*analytics.ReportBaseInformationResponse, error) { +func (m *MockTelemetryServiceClient) ReportBaseInformation(ctx context.Context, in *analytics.ReportBaseInformationRequest, opts ...grpc.CallOption) (*analytics.ReportBaseInformationResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "ReportBaseInformation", varargs...) @@ -55,17 +56,17 @@ func (m *MockTelemetryServiceClient) ReportBaseInformation(arg0 context.Context, } // ReportBaseInformation indicates an expected call of ReportBaseInformation. -func (mr *MockTelemetryServiceClientMockRecorder) ReportBaseInformation(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockTelemetryServiceClientMockRecorder) ReportBaseInformation(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReportBaseInformation", reflect.TypeOf((*MockTelemetryServiceClient)(nil).ReportBaseInformation), varargs...) } // ReportResourceCounts mocks base method. -func (m *MockTelemetryServiceClient) ReportResourceCounts(arg0 context.Context, arg1 *analytics.ReportResourceCountsRequest, arg2 ...grpc.CallOption) (*analytics.ReportResourceCountsResponse, error) { +func (m *MockTelemetryServiceClient) ReportResourceCounts(ctx context.Context, in *analytics.ReportResourceCountsRequest, opts ...grpc.CallOption) (*analytics.ReportResourceCountsResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "ReportResourceCounts", varargs...) @@ -75,8 +76,8 @@ func (m *MockTelemetryServiceClient) ReportResourceCounts(arg0 context.Context, } // ReportResourceCounts indicates an expected call of ReportResourceCounts. -func (mr *MockTelemetryServiceClientMockRecorder) ReportResourceCounts(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockTelemetryServiceClientMockRecorder) ReportResourceCounts(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReportResourceCounts", reflect.TypeOf((*MockTelemetryServiceClient)(nil).ReportResourceCounts), varargs...) } diff --git a/internal/static/mock/storage_mock.go b/internal/static/mock/storage_mock.go index 3ef02efa96..637bbd6033 100644 --- a/internal/static/mock/storage_mock.go +++ b/internal/static/mock/storage_mock.go @@ -22,6 +22,7 @@ import ( type MockStorage struct { ctrl *gomock.Controller recorder *MockStorageMockRecorder + isgomock struct{} } // MockStorageMockRecorder is the mock recorder for MockStorage. diff --git a/pkg/grpc/protoc/v2/options.pb.go b/pkg/grpc/protoc/v2/options.pb.go index da7e038ee7..3b744fedfb 100644 --- a/pkg/grpc/protoc/v2/options.pb.go +++ b/pkg/grpc/protoc/v2/options.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 +// protoc-gen-go v1.36.11 // protoc (unknown) // source: zitadel/protoc_gen_zitadel/v2/options.proto @@ -12,6 +12,7 @@ import ( descriptorpb "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -22,12 +23,11 @@ const ( ) type Options struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + AuthOption *AuthOption `protobuf:"bytes,1,opt,name=auth_option,json=authOption,proto3" json:"auth_option,omitempty"` + HttpResponse *CustomHTTPResponse `protobuf:"bytes,2,opt,name=http_response,json=httpResponse,proto3" json:"http_response,omitempty"` unknownFields protoimpl.UnknownFields - - AuthOption *AuthOption `protobuf:"bytes,1,opt,name=auth_option,json=authOption,proto3" json:"auth_option,omitempty"` - HttpResponse *CustomHTTPResponse `protobuf:"bytes,2,opt,name=http_response,json=httpResponse,proto3" json:"http_response,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Options) Reset() { @@ -75,12 +75,11 @@ func (x *Options) GetHttpResponse() *CustomHTTPResponse { } type AuthOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Permission string `protobuf:"bytes,1,opt,name=permission,proto3" json:"permission,omitempty"` + OrgField string `protobuf:"bytes,3,opt,name=org_field,json=orgField,proto3" json:"org_field,omitempty"` unknownFields protoimpl.UnknownFields - - Permission string `protobuf:"bytes,1,opt,name=permission,proto3" json:"permission,omitempty"` - OrgField string `protobuf:"bytes,3,opt,name=org_field,json=orgField,proto3" json:"org_field,omitempty"` + sizeCache protoimpl.SizeCache } func (x *AuthOption) Reset() { @@ -128,11 +127,10 @@ func (x *AuthOption) GetOrgField() string { } type CustomHTTPResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + SuccessCode int32 `protobuf:"varint,1,opt,name=success_code,json=successCode,proto3" json:"success_code,omitempty"` unknownFields protoimpl.UnknownFields - - SuccessCode int32 `protobuf:"varint,1,opt,name=success_code,json=successCode,proto3" json:"success_code,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CustomHTTPResponse) Reset() { @@ -191,54 +189,31 @@ var ( var File_zitadel_protoc_gen_zitadel_v2_options_proto protoreflect.FileDescriptor -var file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDesc = []byte{ - 0x0a, 0x2b, 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2f, 0x76, 0x32, 0x2f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x7a, - 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, - 0x6e, 0x5f, 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x32, 0x1a, 0x20, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, - 0x01, 0x0a, 0x07, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4a, 0x0a, 0x0b, 0x61, 0x75, - 0x74, 0x68, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x29, 0x2e, 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x32, 0x2e, - 0x41, 0x75, 0x74, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x0d, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, - 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, - 0x65, 0x6e, 0x5f, 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x0c, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, - 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, - 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, - 0x6f, 0x72, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6f, 0x72, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, - 0x37, 0x0a, 0x12, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x3a, 0x62, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0xd1, 0x86, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x7a, 0x69, - 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, - 0x5f, 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x36, 0x5a, 0x34, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x7a, 0x69, 0x74, 0x61, 0x64, - 0x65, 0x6c, 0x2f, 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, - 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2f, 0x76, 0x32, 0x3b, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDesc = "" + + "\n" + + "+zitadel/protoc_gen_zitadel/v2/options.proto\x12\x1dzitadel.protoc_gen_zitadel.v2\x1a google/protobuf/descriptor.proto\"\xad\x01\n" + + "\aOptions\x12J\n" + + "\vauth_option\x18\x01 \x01(\v2).zitadel.protoc_gen_zitadel.v2.AuthOptionR\n" + + "authOption\x12V\n" + + "\rhttp_response\x18\x02 \x01(\v21.zitadel.protoc_gen_zitadel.v2.CustomHTTPResponseR\fhttpResponse\"O\n" + + "\n" + + "AuthOption\x12\x1e\n" + + "\n" + + "permission\x18\x01 \x01(\tR\n" + + "permission\x12\x1b\n" + + "\torg_field\x18\x03 \x01(\tR\borgFieldJ\x04\b\x02\x10\x03\"7\n" + + "\x12CustomHTTPResponse\x12!\n" + + "\fsuccess_code\x18\x01 \x01(\x05R\vsuccessCode:b\n" + + "\aoptions\x12\x1e.google.protobuf.MethodOptions\x18ц\x03 \x01(\v2&.zitadel.protoc_gen_zitadel.v2.OptionsR\aoptionsB6Z4github.com/zitadel/zitadel/pkg/grpc/protoc/v2;protocb\x06proto3" var ( file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDescOnce sync.Once - file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDescData = file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDesc + file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDescData []byte ) func file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDescGZIP() []byte { file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDescOnce.Do(func() { - file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDescData = protoimpl.X.CompressGZIP(file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDescData) + file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDesc), len(file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDesc))) }) return file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDescData } @@ -271,7 +246,7 @@ func file_zitadel_protoc_gen_zitadel_v2_options_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDesc), len(file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDesc)), NumEnums: 0, NumMessages: 3, NumExtensions: 1, @@ -283,7 +258,6 @@ func file_zitadel_protoc_gen_zitadel_v2_options_proto_init() { ExtensionInfos: file_zitadel_protoc_gen_zitadel_v2_options_proto_extTypes, }.Build() File_zitadel_protoc_gen_zitadel_v2_options_proto = out.File - file_zitadel_protoc_gen_zitadel_v2_options_proto_rawDesc = nil file_zitadel_protoc_gen_zitadel_v2_options_proto_goTypes = nil file_zitadel_protoc_gen_zitadel_v2_options_proto_depIdxs = nil }