Files
zitadel/backend/v3/domain/mock/permission.mock.go
T
Marco A.andGitHub 39a29f534a feat(domain): Instance APIs with relational tables (#10953)
# Which Problems Are Solved

This PR implements the endpoints listed in
https://github.com/zitadel/zitadel/issues/10443 .

# How the Problems Are Solved

The implementation follows the same pattern as the Organization one.
There are no peculiarities to this PR. The `Update`, `Delete` are
implementing the `Commander` interface, while `Get` and `List`
instance(s) endpoints are implementing the `Querier` interace.

# Additional Context

- Closes #10443
- Depends on #10445
2025-10-28 14:17:19 +00:00

193 lines
7.6 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/zitadel/zitadel/backend/v3/domain (interfaces: PermissionChecker)
//
// Generated by this command:
//
// mockgen -typed -package domainmock -destination ./mock/permission.mock.go . PermissionChecker
//
// Package domainmock is a generated GoMock package.
package domainmock
import (
context "context"
reflect "reflect"
gomock "go.uber.org/mock/gomock"
)
// MockPermissionChecker is a mock of PermissionChecker interface.
type MockPermissionChecker struct {
ctrl *gomock.Controller
recorder *MockPermissionCheckerMockRecorder
}
// MockPermissionCheckerMockRecorder is the mock recorder for MockPermissionChecker.
type MockPermissionCheckerMockRecorder struct {
mock *MockPermissionChecker
}
// NewMockPermissionChecker creates a new mock instance.
func NewMockPermissionChecker(ctrl *gomock.Controller) *MockPermissionChecker {
mock := &MockPermissionChecker{ctrl: ctrl}
mock.recorder = &MockPermissionCheckerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPermissionChecker) EXPECT() *MockPermissionCheckerMockRecorder {
return m.recorder
}
// CheckInstancePermission mocks base method.
func (m *MockPermissionChecker) CheckInstancePermission(arg0 context.Context, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CheckInstancePermission", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// CheckInstancePermission indicates an expected call of CheckInstancePermission.
func (mr *MockPermissionCheckerMockRecorder) CheckInstancePermission(arg0, arg1 any) *MockPermissionCheckerCheckInstancePermissionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckInstancePermission", reflect.TypeOf((*MockPermissionChecker)(nil).CheckInstancePermission), arg0, arg1)
return &MockPermissionCheckerCheckInstancePermissionCall{Call: call}
}
// MockPermissionCheckerCheckInstancePermissionCall wrap *gomock.Call
type MockPermissionCheckerCheckInstancePermissionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockPermissionCheckerCheckInstancePermissionCall) Return(arg0 error) *MockPermissionCheckerCheckInstancePermissionCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockPermissionCheckerCheckInstancePermissionCall) Do(f func(context.Context, string) error) *MockPermissionCheckerCheckInstancePermissionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockPermissionCheckerCheckInstancePermissionCall) DoAndReturn(f func(context.Context, string) error) *MockPermissionCheckerCheckInstancePermissionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// CheckOrganizationPermission mocks base method.
func (m *MockPermissionChecker) CheckOrganizationPermission(arg0 context.Context, arg1, arg2 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CheckOrganizationPermission", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// CheckOrganizationPermission indicates an expected call of CheckOrganizationPermission.
func (mr *MockPermissionCheckerMockRecorder) CheckOrganizationPermission(arg0, arg1, arg2 any) *MockPermissionCheckerCheckOrganizationPermissionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckOrganizationPermission", reflect.TypeOf((*MockPermissionChecker)(nil).CheckOrganizationPermission), arg0, arg1, arg2)
return &MockPermissionCheckerCheckOrganizationPermissionCall{Call: call}
}
// MockPermissionCheckerCheckOrganizationPermissionCall wrap *gomock.Call
type MockPermissionCheckerCheckOrganizationPermissionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockPermissionCheckerCheckOrganizationPermissionCall) Return(arg0 error) *MockPermissionCheckerCheckOrganizationPermissionCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockPermissionCheckerCheckOrganizationPermissionCall) Do(f func(context.Context, string, string) error) *MockPermissionCheckerCheckOrganizationPermissionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockPermissionCheckerCheckOrganizationPermissionCall) DoAndReturn(f func(context.Context, string, string) error) *MockPermissionCheckerCheckOrganizationPermissionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// CheckProjectGrantPermission mocks base method.
func (m *MockPermissionChecker) CheckProjectGrantPermission(arg0 context.Context, arg1, arg2 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CheckProjectGrantPermission", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// CheckProjectGrantPermission indicates an expected call of CheckProjectGrantPermission.
func (mr *MockPermissionCheckerMockRecorder) CheckProjectGrantPermission(arg0, arg1, arg2 any) *MockPermissionCheckerCheckProjectGrantPermissionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckProjectGrantPermission", reflect.TypeOf((*MockPermissionChecker)(nil).CheckProjectGrantPermission), arg0, arg1, arg2)
return &MockPermissionCheckerCheckProjectGrantPermissionCall{Call: call}
}
// MockPermissionCheckerCheckProjectGrantPermissionCall wrap *gomock.Call
type MockPermissionCheckerCheckProjectGrantPermissionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockPermissionCheckerCheckProjectGrantPermissionCall) Return(arg0 error) *MockPermissionCheckerCheckProjectGrantPermissionCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockPermissionCheckerCheckProjectGrantPermissionCall) Do(f func(context.Context, string, string) error) *MockPermissionCheckerCheckProjectGrantPermissionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockPermissionCheckerCheckProjectGrantPermissionCall) DoAndReturn(f func(context.Context, string, string) error) *MockPermissionCheckerCheckProjectGrantPermissionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// CheckProjectPermission mocks base method.
func (m *MockPermissionChecker) CheckProjectPermission(arg0 context.Context, arg1, arg2 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CheckProjectPermission", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// CheckProjectPermission indicates an expected call of CheckProjectPermission.
func (mr *MockPermissionCheckerMockRecorder) CheckProjectPermission(arg0, arg1, arg2 any) *MockPermissionCheckerCheckProjectPermissionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckProjectPermission", reflect.TypeOf((*MockPermissionChecker)(nil).CheckProjectPermission), arg0, arg1, arg2)
return &MockPermissionCheckerCheckProjectPermissionCall{Call: call}
}
// MockPermissionCheckerCheckProjectPermissionCall wrap *gomock.Call
type MockPermissionCheckerCheckProjectPermissionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockPermissionCheckerCheckProjectPermissionCall) Return(arg0 error) *MockPermissionCheckerCheckProjectPermissionCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockPermissionCheckerCheckProjectPermissionCall) Do(f func(context.Context, string, string) error) *MockPermissionCheckerCheckProjectPermissionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockPermissionCheckerCheckProjectPermissionCall) DoAndReturn(f func(context.Context, string, string) error) *MockPermissionCheckerCheckProjectPermissionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}