mirror of
https://github.com/hanzoai/team.git
synced 2026-09-30 01:57:35 +00:00
171 lines
4.6 KiB
Go
171 lines
4.6 KiB
Go
// Code generated by mockery v2.42.2. DO NOT EDIT.
|
|
|
|
// Regenerate this file using `make store-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"
|
|
|
|
store "github.com/mattermost/mattermost/server/v8/channels/store"
|
|
)
|
|
|
|
// AccessControlPolicyStore is an autogenerated mock type for the AccessControlPolicyStore type
|
|
type AccessControlPolicyStore struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Delete provides a mock function with given fields: c, id
|
|
func (_m *AccessControlPolicyStore) Delete(c request.CTX, id string) error {
|
|
ret := _m.Called(c, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Delete")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string) error); ok {
|
|
r0 = rf(c, id)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Get provides a mock function with given fields: c, id
|
|
func (_m *AccessControlPolicyStore) Get(c request.CTX, id string) (*model.AccessControlPolicy, error) {
|
|
ret := _m.Called(c, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Get")
|
|
}
|
|
|
|
var r0 *model.AccessControlPolicy
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string) (*model.AccessControlPolicy, error)); ok {
|
|
return rf(c, id)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string) *model.AccessControlPolicy); ok {
|
|
r0 = rf(c, id)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.AccessControlPolicy)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, string) error); ok {
|
|
r1 = rf(c, id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GetAll provides a mock function with given fields: rctxc, opts
|
|
func (_m *AccessControlPolicyStore) GetAll(rctxc request.CTX, opts store.GetPolicyOptions) ([]*model.AccessControlPolicy, error) {
|
|
ret := _m.Called(rctxc, opts)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetAll")
|
|
}
|
|
|
|
var r0 []*model.AccessControlPolicy
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, store.GetPolicyOptions) ([]*model.AccessControlPolicy, error)); ok {
|
|
return rf(rctxc, opts)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, store.GetPolicyOptions) []*model.AccessControlPolicy); ok {
|
|
r0 = rf(rctxc, opts)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.AccessControlPolicy)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, store.GetPolicyOptions) error); ok {
|
|
r1 = rf(rctxc, opts)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Save provides a mock function with given fields: c, policy
|
|
func (_m *AccessControlPolicyStore) Save(c request.CTX, policy *model.AccessControlPolicy) (*model.AccessControlPolicy, error) {
|
|
ret := _m.Called(c, policy)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Save")
|
|
}
|
|
|
|
var r0 *model.AccessControlPolicy
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.AccessControlPolicy) (*model.AccessControlPolicy, error)); ok {
|
|
return rf(c, policy)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, *model.AccessControlPolicy) *model.AccessControlPolicy); ok {
|
|
r0 = rf(c, policy)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.AccessControlPolicy)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, *model.AccessControlPolicy) error); ok {
|
|
r1 = rf(c, policy)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// SetActiveStatus provides a mock function with given fields: c, id, active
|
|
func (_m *AccessControlPolicyStore) SetActiveStatus(c request.CTX, id string, active bool) (*model.AccessControlPolicy, error) {
|
|
ret := _m.Called(c, id, active)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SetActiveStatus")
|
|
}
|
|
|
|
var r0 *model.AccessControlPolicy
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, bool) (*model.AccessControlPolicy, error)); ok {
|
|
return rf(c, id, active)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(request.CTX, string, bool) *model.AccessControlPolicy); ok {
|
|
r0 = rf(c, id, active)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.AccessControlPolicy)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(request.CTX, string, bool) error); ok {
|
|
r1 = rf(c, id, active)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// NewAccessControlPolicyStore creates a new instance of AccessControlPolicyStore. 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 NewAccessControlPolicyStore(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *AccessControlPolicyStore {
|
|
mock := &AccessControlPolicyStore{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|