github.com/mattermost/mattermost-server/v6@v6.7.2/einterfaces/mocks/DataRetentionInterface.go (about)

     1  // Code generated by mockery v2.10.4. DO NOT EDIT.
     2  
     3  // Regenerate this file using `make einterfaces-mocks`.
     4  
     5  package mocks
     6  
     7  import (
     8  	model "github.com/mattermost/mattermost-server/v6/model"
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // DataRetentionInterface is an autogenerated mock type for the DataRetentionInterface type
    13  type DataRetentionInterface struct {
    14  	mock.Mock
    15  }
    16  
    17  // AddChannelsToPolicy provides a mock function with given fields: policyID, channelIDs
    18  func (_m *DataRetentionInterface) AddChannelsToPolicy(policyID string, channelIDs []string) *model.AppError {
    19  	ret := _m.Called(policyID, channelIDs)
    20  
    21  	var r0 *model.AppError
    22  	if rf, ok := ret.Get(0).(func(string, []string) *model.AppError); ok {
    23  		r0 = rf(policyID, channelIDs)
    24  	} else {
    25  		if ret.Get(0) != nil {
    26  			r0 = ret.Get(0).(*model.AppError)
    27  		}
    28  	}
    29  
    30  	return r0
    31  }
    32  
    33  // AddTeamsToPolicy provides a mock function with given fields: policyID, teamIDs
    34  func (_m *DataRetentionInterface) AddTeamsToPolicy(policyID string, teamIDs []string) *model.AppError {
    35  	ret := _m.Called(policyID, teamIDs)
    36  
    37  	var r0 *model.AppError
    38  	if rf, ok := ret.Get(0).(func(string, []string) *model.AppError); ok {
    39  		r0 = rf(policyID, teamIDs)
    40  	} else {
    41  		if ret.Get(0) != nil {
    42  			r0 = ret.Get(0).(*model.AppError)
    43  		}
    44  	}
    45  
    46  	return r0
    47  }
    48  
    49  // CreatePolicy provides a mock function with given fields: policy
    50  func (_m *DataRetentionInterface) CreatePolicy(policy *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError) {
    51  	ret := _m.Called(policy)
    52  
    53  	var r0 *model.RetentionPolicyWithTeamAndChannelCounts
    54  	if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) *model.RetentionPolicyWithTeamAndChannelCounts); ok {
    55  		r0 = rf(policy)
    56  	} else {
    57  		if ret.Get(0) != nil {
    58  			r0 = ret.Get(0).(*model.RetentionPolicyWithTeamAndChannelCounts)
    59  		}
    60  	}
    61  
    62  	var r1 *model.AppError
    63  	if rf, ok := ret.Get(1).(func(*model.RetentionPolicyWithTeamAndChannelIDs) *model.AppError); ok {
    64  		r1 = rf(policy)
    65  	} else {
    66  		if ret.Get(1) != nil {
    67  			r1 = ret.Get(1).(*model.AppError)
    68  		}
    69  	}
    70  
    71  	return r0, r1
    72  }
    73  
    74  // DeletePolicy provides a mock function with given fields: policyID
    75  func (_m *DataRetentionInterface) DeletePolicy(policyID string) *model.AppError {
    76  	ret := _m.Called(policyID)
    77  
    78  	var r0 *model.AppError
    79  	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
    80  		r0 = rf(policyID)
    81  	} else {
    82  		if ret.Get(0) != nil {
    83  			r0 = ret.Get(0).(*model.AppError)
    84  		}
    85  	}
    86  
    87  	return r0
    88  }
    89  
    90  // GetChannelPoliciesForUser provides a mock function with given fields: userID, offset, limit
    91  func (_m *DataRetentionInterface) GetChannelPoliciesForUser(userID string, offset int, limit int) (*model.RetentionPolicyForChannelList, *model.AppError) {
    92  	ret := _m.Called(userID, offset, limit)
    93  
    94  	var r0 *model.RetentionPolicyForChannelList
    95  	if rf, ok := ret.Get(0).(func(string, int, int) *model.RetentionPolicyForChannelList); ok {
    96  		r0 = rf(userID, offset, limit)
    97  	} else {
    98  		if ret.Get(0) != nil {
    99  			r0 = ret.Get(0).(*model.RetentionPolicyForChannelList)
   100  		}
   101  	}
   102  
   103  	var r1 *model.AppError
   104  	if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
   105  		r1 = rf(userID, offset, limit)
   106  	} else {
   107  		if ret.Get(1) != nil {
   108  			r1 = ret.Get(1).(*model.AppError)
   109  		}
   110  	}
   111  
   112  	return r0, r1
   113  }
   114  
   115  // GetChannelsForPolicy provides a mock function with given fields: policyID, offset, limit
   116  func (_m *DataRetentionInterface) GetChannelsForPolicy(policyID string, offset int, limit int) (*model.ChannelsWithCount, *model.AppError) {
   117  	ret := _m.Called(policyID, offset, limit)
   118  
   119  	var r0 *model.ChannelsWithCount
   120  	if rf, ok := ret.Get(0).(func(string, int, int) *model.ChannelsWithCount); ok {
   121  		r0 = rf(policyID, offset, limit)
   122  	} else {
   123  		if ret.Get(0) != nil {
   124  			r0 = ret.Get(0).(*model.ChannelsWithCount)
   125  		}
   126  	}
   127  
   128  	var r1 *model.AppError
   129  	if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
   130  		r1 = rf(policyID, offset, limit)
   131  	} else {
   132  		if ret.Get(1) != nil {
   133  			r1 = ret.Get(1).(*model.AppError)
   134  		}
   135  	}
   136  
   137  	return r0, r1
   138  }
   139  
   140  // GetGlobalPolicy provides a mock function with given fields:
   141  func (_m *DataRetentionInterface) GetGlobalPolicy() (*model.GlobalRetentionPolicy, *model.AppError) {
   142  	ret := _m.Called()
   143  
   144  	var r0 *model.GlobalRetentionPolicy
   145  	if rf, ok := ret.Get(0).(func() *model.GlobalRetentionPolicy); ok {
   146  		r0 = rf()
   147  	} else {
   148  		if ret.Get(0) != nil {
   149  			r0 = ret.Get(0).(*model.GlobalRetentionPolicy)
   150  		}
   151  	}
   152  
   153  	var r1 *model.AppError
   154  	if rf, ok := ret.Get(1).(func() *model.AppError); ok {
   155  		r1 = rf()
   156  	} else {
   157  		if ret.Get(1) != nil {
   158  			r1 = ret.Get(1).(*model.AppError)
   159  		}
   160  	}
   161  
   162  	return r0, r1
   163  }
   164  
   165  // GetPolicies provides a mock function with given fields: offset, limit
   166  func (_m *DataRetentionInterface) GetPolicies(offset int, limit int) (*model.RetentionPolicyWithTeamAndChannelCountsList, *model.AppError) {
   167  	ret := _m.Called(offset, limit)
   168  
   169  	var r0 *model.RetentionPolicyWithTeamAndChannelCountsList
   170  	if rf, ok := ret.Get(0).(func(int, int) *model.RetentionPolicyWithTeamAndChannelCountsList); ok {
   171  		r0 = rf(offset, limit)
   172  	} else {
   173  		if ret.Get(0) != nil {
   174  			r0 = ret.Get(0).(*model.RetentionPolicyWithTeamAndChannelCountsList)
   175  		}
   176  	}
   177  
   178  	var r1 *model.AppError
   179  	if rf, ok := ret.Get(1).(func(int, int) *model.AppError); ok {
   180  		r1 = rf(offset, limit)
   181  	} else {
   182  		if ret.Get(1) != nil {
   183  			r1 = ret.Get(1).(*model.AppError)
   184  		}
   185  	}
   186  
   187  	return r0, r1
   188  }
   189  
   190  // GetPoliciesCount provides a mock function with given fields:
   191  func (_m *DataRetentionInterface) GetPoliciesCount() (int64, *model.AppError) {
   192  	ret := _m.Called()
   193  
   194  	var r0 int64
   195  	if rf, ok := ret.Get(0).(func() int64); ok {
   196  		r0 = rf()
   197  	} else {
   198  		r0 = ret.Get(0).(int64)
   199  	}
   200  
   201  	var r1 *model.AppError
   202  	if rf, ok := ret.Get(1).(func() *model.AppError); ok {
   203  		r1 = rf()
   204  	} else {
   205  		if ret.Get(1) != nil {
   206  			r1 = ret.Get(1).(*model.AppError)
   207  		}
   208  	}
   209  
   210  	return r0, r1
   211  }
   212  
   213  // GetPolicy provides a mock function with given fields: policyID
   214  func (_m *DataRetentionInterface) GetPolicy(policyID string) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError) {
   215  	ret := _m.Called(policyID)
   216  
   217  	var r0 *model.RetentionPolicyWithTeamAndChannelCounts
   218  	if rf, ok := ret.Get(0).(func(string) *model.RetentionPolicyWithTeamAndChannelCounts); ok {
   219  		r0 = rf(policyID)
   220  	} else {
   221  		if ret.Get(0) != nil {
   222  			r0 = ret.Get(0).(*model.RetentionPolicyWithTeamAndChannelCounts)
   223  		}
   224  	}
   225  
   226  	var r1 *model.AppError
   227  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
   228  		r1 = rf(policyID)
   229  	} else {
   230  		if ret.Get(1) != nil {
   231  			r1 = ret.Get(1).(*model.AppError)
   232  		}
   233  	}
   234  
   235  	return r0, r1
   236  }
   237  
   238  // GetTeamPoliciesForUser provides a mock function with given fields: userID, offset, limit
   239  func (_m *DataRetentionInterface) GetTeamPoliciesForUser(userID string, offset int, limit int) (*model.RetentionPolicyForTeamList, *model.AppError) {
   240  	ret := _m.Called(userID, offset, limit)
   241  
   242  	var r0 *model.RetentionPolicyForTeamList
   243  	if rf, ok := ret.Get(0).(func(string, int, int) *model.RetentionPolicyForTeamList); ok {
   244  		r0 = rf(userID, offset, limit)
   245  	} else {
   246  		if ret.Get(0) != nil {
   247  			r0 = ret.Get(0).(*model.RetentionPolicyForTeamList)
   248  		}
   249  	}
   250  
   251  	var r1 *model.AppError
   252  	if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
   253  		r1 = rf(userID, offset, limit)
   254  	} else {
   255  		if ret.Get(1) != nil {
   256  			r1 = ret.Get(1).(*model.AppError)
   257  		}
   258  	}
   259  
   260  	return r0, r1
   261  }
   262  
   263  // GetTeamsForPolicy provides a mock function with given fields: policyID, offset, limit
   264  func (_m *DataRetentionInterface) GetTeamsForPolicy(policyID string, offset int, limit int) (*model.TeamsWithCount, *model.AppError) {
   265  	ret := _m.Called(policyID, offset, limit)
   266  
   267  	var r0 *model.TeamsWithCount
   268  	if rf, ok := ret.Get(0).(func(string, int, int) *model.TeamsWithCount); ok {
   269  		r0 = rf(policyID, offset, limit)
   270  	} else {
   271  		if ret.Get(0) != nil {
   272  			r0 = ret.Get(0).(*model.TeamsWithCount)
   273  		}
   274  	}
   275  
   276  	var r1 *model.AppError
   277  	if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
   278  		r1 = rf(policyID, offset, limit)
   279  	} else {
   280  		if ret.Get(1) != nil {
   281  			r1 = ret.Get(1).(*model.AppError)
   282  		}
   283  	}
   284  
   285  	return r0, r1
   286  }
   287  
   288  // PatchPolicy provides a mock function with given fields: patch
   289  func (_m *DataRetentionInterface) PatchPolicy(patch *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError) {
   290  	ret := _m.Called(patch)
   291  
   292  	var r0 *model.RetentionPolicyWithTeamAndChannelCounts
   293  	if rf, ok := ret.Get(0).(func(*model.RetentionPolicyWithTeamAndChannelIDs) *model.RetentionPolicyWithTeamAndChannelCounts); ok {
   294  		r0 = rf(patch)
   295  	} else {
   296  		if ret.Get(0) != nil {
   297  			r0 = ret.Get(0).(*model.RetentionPolicyWithTeamAndChannelCounts)
   298  		}
   299  	}
   300  
   301  	var r1 *model.AppError
   302  	if rf, ok := ret.Get(1).(func(*model.RetentionPolicyWithTeamAndChannelIDs) *model.AppError); ok {
   303  		r1 = rf(patch)
   304  	} else {
   305  		if ret.Get(1) != nil {
   306  			r1 = ret.Get(1).(*model.AppError)
   307  		}
   308  	}
   309  
   310  	return r0, r1
   311  }
   312  
   313  // RemoveChannelsFromPolicy provides a mock function with given fields: policyID, channelIDs
   314  func (_m *DataRetentionInterface) RemoveChannelsFromPolicy(policyID string, channelIDs []string) *model.AppError {
   315  	ret := _m.Called(policyID, channelIDs)
   316  
   317  	var r0 *model.AppError
   318  	if rf, ok := ret.Get(0).(func(string, []string) *model.AppError); ok {
   319  		r0 = rf(policyID, channelIDs)
   320  	} else {
   321  		if ret.Get(0) != nil {
   322  			r0 = ret.Get(0).(*model.AppError)
   323  		}
   324  	}
   325  
   326  	return r0
   327  }
   328  
   329  // RemoveTeamsFromPolicy provides a mock function with given fields: policyID, teamIDs
   330  func (_m *DataRetentionInterface) RemoveTeamsFromPolicy(policyID string, teamIDs []string) *model.AppError {
   331  	ret := _m.Called(policyID, teamIDs)
   332  
   333  	var r0 *model.AppError
   334  	if rf, ok := ret.Get(0).(func(string, []string) *model.AppError); ok {
   335  		r0 = rf(policyID, teamIDs)
   336  	} else {
   337  		if ret.Get(0) != nil {
   338  			r0 = ret.Get(0).(*model.AppError)
   339  		}
   340  	}
   341  
   342  	return r0
   343  }