// Code generated by mockery v2.53.4. DO NOT EDIT. // Regenerate this file using `make einterfaces-mocks`. package mocks import ( model "github.com/mattermost/mattermost/server/public/model" request "github.com/mattermost/mattermost/server/public/shared/request" mock "github.com/stretchr/testify/mock" ) // PolicyAdministrationPointInterface is an autogenerated mock type for the PolicyAdministrationPointInterface type type PolicyAdministrationPointInterface struct { mock.Mock } // CheckExpression provides a mock function with given fields: rctx, expression func (_m *PolicyAdministrationPointInterface) 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 *PolicyAdministrationPointInterface) 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 *PolicyAdministrationPointInterface) 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 *PolicyAdministrationPointInterface) 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 } // GetPolicy provides a mock function with given fields: rctx, id func (_m *PolicyAdministrationPointInterface) 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 *PolicyAdministrationPointInterface) 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 } // Init provides a mock function with given fields: rctx func (_m *PolicyAdministrationPointInterface) 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 } // NormalizePolicy provides a mock function with given fields: rctx, policy func (_m *PolicyAdministrationPointInterface) 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 } // QueryUsersForExpression provides a mock function with given fields: rctx, expression, opts func (_m *PolicyAdministrationPointInterface) 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 *PolicyAdministrationPointInterface) 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 *PolicyAdministrationPointInterface) 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 } // NewPolicyAdministrationPointInterface creates a new instance of PolicyAdministrationPointInterface. 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 NewPolicyAdministrationPointInterface(t interface { mock.TestingT Cleanup(func()) }) *PolicyAdministrationPointInterface { mock := &PolicyAdministrationPointInterface{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }