// Code generated by mockery v2.53.4. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. package mocks import ( model "github.com/hanzoteam/server/server/public/model" request "github.com/hanzoteam/server/server/public/shared/request" mock "github.com/stretchr/testify/mock" ) // AccessControlServiceInterface is an autogenerated mock type for the AccessControlServiceInterface type type AccessControlServiceInterface struct { mock.Mock } // AccessEvaluation provides a mock function with given fields: rctx, accessRequest func (_m *AccessControlServiceInterface) AccessEvaluation(rctx request.CTX, accessRequest model.AccessRequest) (model.AccessDecision, *model.AppError) { ret := _m.Called(rctx, accessRequest) if len(ret) == 0 { panic("no return value specified for AccessEvaluation") } var r0 model.AccessDecision var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, model.AccessRequest) (model.AccessDecision, *model.AppError)); ok { return rf(rctx, accessRequest) } if rf, ok := ret.Get(0).(func(request.CTX, model.AccessRequest) model.AccessDecision); ok { r0 = rf(rctx, accessRequest) } else { r0 = ret.Get(0).(model.AccessDecision) } if rf, ok := ret.Get(1).(func(request.CTX, model.AccessRequest) *model.AppError); ok { r1 = rf(rctx, accessRequest) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*model.AppError) } } return r0, r1 } // CheckExpression provides a mock function with given fields: rctx, expression func (_m *AccessControlServiceInterface) CheckExpression(rctx request.CTX, expression string) ([]model.CELExpressionError, *model.AppError) { ret := _m.Called(rctx, expression) if len(ret) == 0 { panic("no return value specified for CheckExpression") } var r0 []model.CELExpressionError var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string) ([]model.CELExpressionError, *model.AppError)); ok { return rf(rctx, expression) } if rf, ok := ret.Get(0).(func(request.CTX, string) []model.CELExpressionError); ok { r0 = rf(rctx, expression) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]model.CELExpressionError) } } if rf, ok := ret.Get(1).(func(request.CTX, string) *model.AppError); ok { r1 = rf(rctx, expression) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*model.AppError) } } return r0, r1 } // DeletePolicy provides a mock function with given fields: rctx, id func (_m *AccessControlServiceInterface) DeletePolicy(rctx request.CTX, id string) *model.AppError { ret := _m.Called(rctx, id) if len(ret) == 0 { panic("no return value specified for DeletePolicy") } var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string) *model.AppError); ok { r0 = rf(rctx, id) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*model.AppError) } } return r0 } // ExpressionToVisualAST provides a mock function with given fields: rctx, expression func (_m *AccessControlServiceInterface) ExpressionToVisualAST(rctx request.CTX, expression string) (*model.VisualExpression, *model.AppError) { ret := _m.Called(rctx, expression) if len(ret) == 0 { panic("no return value specified for ExpressionToVisualAST") } var r0 *model.VisualExpression var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.VisualExpression, *model.AppError)); ok { return rf(rctx, expression) } if rf, ok := ret.Get(0).(func(request.CTX, string) *model.VisualExpression); ok { r0 = rf(rctx, expression) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*model.VisualExpression) } } if rf, ok := ret.Get(1).(func(request.CTX, string) *model.AppError); ok { r1 = rf(rctx, expression) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*model.AppError) } } return r0, r1 } // GetChannelMembersToRemove provides a mock function with given fields: rctx, channelID func (_m *AccessControlServiceInterface) GetChannelMembersToRemove(rctx request.CTX, channelID string) ([]*model.ChannelMember, *model.AppError) { ret := _m.Called(rctx, channelID) if len(ret) == 0 { panic("no return value specified for GetChannelMembersToRemove") } var r0 []*model.ChannelMember var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string) ([]*model.ChannelMember, *model.AppError)); ok { return rf(rctx, channelID) } if rf, ok := ret.Get(0).(func(request.CTX, string) []*model.ChannelMember); ok { r0 = rf(rctx, channelID) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.ChannelMember) } } if rf, ok := ret.Get(1).(func(request.CTX, string) *model.AppError); ok { r1 = rf(rctx, channelID) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*model.AppError) } } return r0, r1 } // GetPoliciesForFieldIDs provides a mock function with given fields: rctx, fieldIDs func (_m *AccessControlServiceInterface) GetPoliciesForFieldIDs(rctx request.CTX, fieldIDs []string) ([]*model.AccessControlPolicy, *model.AppError) { ret := _m.Called(rctx, fieldIDs) if len(ret) == 0 { panic("no return value specified for GetPoliciesForFieldIDs") } var r0 []*model.AccessControlPolicy var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, []string) ([]*model.AccessControlPolicy, *model.AppError)); ok { return rf(rctx, fieldIDs) } if rf, ok := ret.Get(0).(func(request.CTX, []string) []*model.AccessControlPolicy); ok { r0 = rf(rctx, fieldIDs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.AccessControlPolicy) } } if rf, ok := ret.Get(1).(func(request.CTX, []string) *model.AppError); ok { r1 = rf(rctx, fieldIDs) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*model.AppError) } } return r0, r1 } // GetPolicy provides a mock function with given fields: rctx, id func (_m *AccessControlServiceInterface) GetPolicy(rctx request.CTX, id string) (*model.AccessControlPolicy, *model.AppError) { ret := _m.Called(rctx, id) if len(ret) == 0 { panic("no return value specified for GetPolicy") } var r0 *model.AccessControlPolicy var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.AccessControlPolicy, *model.AppError)); ok { return rf(rctx, id) } if rf, ok := ret.Get(0).(func(request.CTX, string) *model.AccessControlPolicy); ok { r0 = rf(rctx, id) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*model.AccessControlPolicy) } } if rf, ok := ret.Get(1).(func(request.CTX, string) *model.AppError); ok { r1 = rf(rctx, id) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*model.AppError) } } return r0, r1 } // GetPolicyRuleAttributes provides a mock function with given fields: rctx, policyID, action func (_m *AccessControlServiceInterface) GetPolicyRuleAttributes(rctx request.CTX, policyID string, action string) (map[string][]string, *model.AppError) { ret := _m.Called(rctx, policyID, action) if len(ret) == 0 { panic("no return value specified for GetPolicyRuleAttributes") } var r0 map[string][]string var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, string) (map[string][]string, *model.AppError)); ok { return rf(rctx, policyID, action) } if rf, ok := ret.Get(0).(func(request.CTX, string, string) map[string][]string); ok { r0 = rf(rctx, policyID, action) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[string][]string) } } if rf, ok := ret.Get(1).(func(request.CTX, string, string) *model.AppError); ok { r1 = rf(rctx, policyID, action) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*model.AppError) } } return r0, r1 } // GetTeamMembersToRemove provides a mock function with given fields: rctx, teamID func (_m *AccessControlServiceInterface) GetTeamMembersToRemove(rctx request.CTX, teamID string) ([]*model.TeamMember, *model.AppError) { ret := _m.Called(rctx, teamID) if len(ret) == 0 { panic("no return value specified for GetTeamMembersToRemove") } var r0 []*model.TeamMember var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string) ([]*model.TeamMember, *model.AppError)); ok { return rf(rctx, teamID) } if rf, ok := ret.Get(0).(func(request.CTX, string) []*model.TeamMember); ok { r0 = rf(rctx, teamID) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.TeamMember) } } if rf, ok := ret.Get(1).(func(request.CTX, string) *model.AppError); ok { r1 = rf(rctx, teamID) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*model.AppError) } } return r0, r1 } // HasMaskedValuesForCaller provides a mock function with given fields: rctx, expression, resolver func (_m *AccessControlServiceInterface) HasMaskedValuesForCaller(rctx request.CTX, expression string, resolver model.MaskingFieldResolver) (bool, *model.AppError) { ret := _m.Called(rctx, expression, resolver) if len(ret) == 0 { panic("no return value specified for HasMaskedValuesForCaller") } var r0 bool var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, model.MaskingFieldResolver) (bool, *model.AppError)); ok { return rf(rctx, expression, resolver) } if rf, ok := ret.Get(0).(func(request.CTX, string, model.MaskingFieldResolver) bool); ok { r0 = rf(rctx, expression, resolver) } else { r0 = ret.Get(0).(bool) } if rf, ok := ret.Get(1).(func(request.CTX, string, model.MaskingFieldResolver) *model.AppError); ok { r1 = rf(rctx, expression, resolver) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*model.AppError) } } return r0, r1 } // Init provides a mock function with given fields: rctx func (_m *AccessControlServiceInterface) Init(rctx request.CTX) *model.AppError { ret := _m.Called(rctx) if len(ret) == 0 { panic("no return value specified for Init") } var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX) *model.AppError); ok { r0 = rf(rctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*model.AppError) } } return r0 } // MaskExpressionForCaller provides a mock function with given fields: rctx, expression, resolver func (_m *AccessControlServiceInterface) MaskExpressionForCaller(rctx request.CTX, expression string, resolver model.MaskingFieldResolver) (string, bool, *model.AppError) { ret := _m.Called(rctx, expression, resolver) if len(ret) == 0 { panic("no return value specified for MaskExpressionForCaller") } var r0 string var r1 bool var r2 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, model.MaskingFieldResolver) (string, bool, *model.AppError)); ok { return rf(rctx, expression, resolver) } if rf, ok := ret.Get(0).(func(request.CTX, string, model.MaskingFieldResolver) string); ok { r0 = rf(rctx, expression, resolver) } else { r0 = ret.Get(0).(string) } if rf, ok := ret.Get(1).(func(request.CTX, string, model.MaskingFieldResolver) bool); ok { r1 = rf(rctx, expression, resolver) } else { r1 = ret.Get(1).(bool) } if rf, ok := ret.Get(2).(func(request.CTX, string, model.MaskingFieldResolver) *model.AppError); ok { r2 = rf(rctx, expression, resolver) } else { if ret.Get(2) != nil { r2 = ret.Get(2).(*model.AppError) } } return r0, r1, r2 } // MergeExpressionWithMaskedValuesCanonical provides a mock function with given fields: rctx, submittedExpr, storedExpr, resolver func (_m *AccessControlServiceInterface) MergeExpressionWithMaskedValuesCanonical(rctx request.CTX, submittedExpr string, storedExpr string, resolver model.MaskingFieldResolver) (string, *model.AppError) { ret := _m.Called(rctx, submittedExpr, storedExpr, resolver) if len(ret) == 0 { panic("no return value specified for MergeExpressionWithMaskedValuesCanonical") } var r0 string var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, string, model.MaskingFieldResolver) (string, *model.AppError)); ok { return rf(rctx, submittedExpr, storedExpr, resolver) } if rf, ok := ret.Get(0).(func(request.CTX, string, string, model.MaskingFieldResolver) string); ok { r0 = rf(rctx, submittedExpr, storedExpr, resolver) } else { r0 = ret.Get(0).(string) } if rf, ok := ret.Get(1).(func(request.CTX, string, string, model.MaskingFieldResolver) *model.AppError); ok { r1 = rf(rctx, submittedExpr, storedExpr, resolver) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*model.AppError) } } return r0, r1 } // NormalizePolicy provides a mock function with given fields: rctx, policy func (_m *AccessControlServiceInterface) NormalizePolicy(rctx request.CTX, policy *model.AccessControlPolicy) (*model.AccessControlPolicy, *model.AppError) { ret := _m.Called(rctx, policy) if len(ret) == 0 { panic("no return value specified for NormalizePolicy") } var r0 *model.AccessControlPolicy var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.AccessControlPolicy) (*model.AccessControlPolicy, *model.AppError)); ok { return rf(rctx, policy) } if rf, ok := ret.Get(0).(func(request.CTX, *model.AccessControlPolicy) *model.AccessControlPolicy); ok { r0 = rf(rctx, policy) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*model.AccessControlPolicy) } } if rf, ok := ret.Get(1).(func(request.CTX, *model.AccessControlPolicy) *model.AppError); ok { r1 = rf(rctx, policy) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*model.AppError) } } return r0, r1 } // OnPropertyFieldOptionsChanged provides a mock function with given fields: rctx, fieldID func (_m *AccessControlServiceInterface) OnPropertyFieldOptionsChanged(rctx request.CTX, fieldID string) { _m.Called(rctx, fieldID) } // QueryUsersForExpression provides a mock function with given fields: rctx, expression, opts func (_m *AccessControlServiceInterface) QueryUsersForExpression(rctx request.CTX, expression string, opts model.SubjectSearchOptions) ([]*model.User, int64, *model.AppError) { ret := _m.Called(rctx, expression, opts) if len(ret) == 0 { panic("no return value specified for QueryUsersForExpression") } var r0 []*model.User var r1 int64 var r2 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, model.SubjectSearchOptions) ([]*model.User, int64, *model.AppError)); ok { return rf(rctx, expression, opts) } if rf, ok := ret.Get(0).(func(request.CTX, string, model.SubjectSearchOptions) []*model.User); ok { r0 = rf(rctx, expression, opts) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.User) } } if rf, ok := ret.Get(1).(func(request.CTX, string, model.SubjectSearchOptions) int64); ok { r1 = rf(rctx, expression, opts) } else { r1 = ret.Get(1).(int64) } if rf, ok := ret.Get(2).(func(request.CTX, string, model.SubjectSearchOptions) *model.AppError); ok { r2 = rf(rctx, expression, opts) } else { if ret.Get(2) != nil { r2 = ret.Get(2).(*model.AppError) } } return r0, r1, r2 } // QueryUsersForResource provides a mock function with given fields: rctx, resourceID, action, opts func (_m *AccessControlServiceInterface) QueryUsersForResource(rctx request.CTX, resourceID string, action string, opts model.SubjectSearchOptions) ([]*model.User, int64, *model.AppError) { ret := _m.Called(rctx, resourceID, action, opts) if len(ret) == 0 { panic("no return value specified for QueryUsersForResource") } var r0 []*model.User var r1 int64 var r2 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, string, model.SubjectSearchOptions) ([]*model.User, int64, *model.AppError)); ok { return rf(rctx, resourceID, action, opts) } if rf, ok := ret.Get(0).(func(request.CTX, string, string, model.SubjectSearchOptions) []*model.User); ok { r0 = rf(rctx, resourceID, action, opts) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*model.User) } } if rf, ok := ret.Get(1).(func(request.CTX, string, string, model.SubjectSearchOptions) int64); ok { r1 = rf(rctx, resourceID, action, opts) } else { r1 = ret.Get(1).(int64) } if rf, ok := ret.Get(2).(func(request.CTX, string, string, model.SubjectSearchOptions) *model.AppError); ok { r2 = rf(rctx, resourceID, action, opts) } else { if ret.Get(2) != nil { r2 = ret.Get(2).(*model.AppError) } } return r0, r1, r2 } // SavePolicy provides a mock function with given fields: rctx, policy func (_m *AccessControlServiceInterface) SavePolicy(rctx request.CTX, policy *model.AccessControlPolicy) (*model.AccessControlPolicy, *model.AppError) { ret := _m.Called(rctx, policy) if len(ret) == 0 { panic("no return value specified for SavePolicy") } var r0 *model.AccessControlPolicy var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, *model.AccessControlPolicy) (*model.AccessControlPolicy, *model.AppError)); ok { return rf(rctx, policy) } if rf, ok := ret.Get(0).(func(request.CTX, *model.AccessControlPolicy) *model.AccessControlPolicy); ok { r0 = rf(rctx, policy) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*model.AccessControlPolicy) } } if rf, ok := ret.Get(1).(func(request.CTX, *model.AccessControlPolicy) *model.AppError); ok { r1 = rf(rctx, policy) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*model.AppError) } } return r0, r1 } // SimulatePolicyForUsers provides a mock function with given fields: rctx, params func (_m *AccessControlServiceInterface) SimulatePolicyForUsers(rctx request.CTX, params model.PolicySimulationByUsersParams) (*model.PolicySimulationResponse, *model.AppError) { ret := _m.Called(rctx, params) if len(ret) == 0 { panic("no return value specified for SimulatePolicyForUsers") } var r0 *model.PolicySimulationResponse var r1 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, model.PolicySimulationByUsersParams) (*model.PolicySimulationResponse, *model.AppError)); ok { return rf(rctx, params) } if rf, ok := ret.Get(0).(func(request.CTX, model.PolicySimulationByUsersParams) *model.PolicySimulationResponse); ok { r0 = rf(rctx, params) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*model.PolicySimulationResponse) } } if rf, ok := ret.Get(1).(func(request.CTX, model.PolicySimulationByUsersParams) *model.AppError); ok { r1 = rf(rctx, params) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(*model.AppError) } } return r0, r1 } // ValidateExpressionValuesForCaller provides a mock function with given fields: rctx, expression, resolver func (_m *AccessControlServiceInterface) ValidateExpressionValuesForCaller(rctx request.CTX, expression string, resolver model.MaskingFieldResolver) *model.AppError { ret := _m.Called(rctx, expression, resolver) if len(ret) == 0 { panic("no return value specified for ValidateExpressionValuesForCaller") } var r0 *model.AppError if rf, ok := ret.Get(0).(func(request.CTX, string, model.MaskingFieldResolver) *model.AppError); ok { r0 = rf(rctx, expression, resolver) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*model.AppError) } } return r0 } // NewAccessControlServiceInterface creates a new instance of AccessControlServiceInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewAccessControlServiceInterface(t interface { mock.TestingT Cleanup(func()) }) *AccessControlServiceInterface { mock := &AccessControlServiceInterface{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }