github.com/trigonella/mattermost-server@v5.11.1+incompatible/plugin/plugintest/hooks.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  // Regenerate this file using `make plugin-mocks`.
     4  
     5  package plugintest
     6  
     7  import http "net/http"
     8  import io "io"
     9  import mock "github.com/stretchr/testify/mock"
    10  import model "github.com/mattermost/mattermost-server/model"
    11  import plugin "github.com/mattermost/mattermost-server/plugin"
    12  
    13  // Hooks is an autogenerated mock type for the Hooks type
    14  type Hooks struct {
    15  	mock.Mock
    16  }
    17  
    18  // ChannelHasBeenCreated provides a mock function with given fields: c, channel
    19  func (_m *Hooks) ChannelHasBeenCreated(c *plugin.Context, channel *model.Channel) {
    20  	_m.Called(c, channel)
    21  }
    22  
    23  // ExecuteCommand provides a mock function with given fields: c, args
    24  func (_m *Hooks) ExecuteCommand(c *plugin.Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError) {
    25  	ret := _m.Called(c, args)
    26  
    27  	var r0 *model.CommandResponse
    28  	if rf, ok := ret.Get(0).(func(*plugin.Context, *model.CommandArgs) *model.CommandResponse); ok {
    29  		r0 = rf(c, args)
    30  	} else {
    31  		if ret.Get(0) != nil {
    32  			r0 = ret.Get(0).(*model.CommandResponse)
    33  		}
    34  	}
    35  
    36  	var r1 *model.AppError
    37  	if rf, ok := ret.Get(1).(func(*plugin.Context, *model.CommandArgs) *model.AppError); ok {
    38  		r1 = rf(c, args)
    39  	} else {
    40  		if ret.Get(1) != nil {
    41  			r1 = ret.Get(1).(*model.AppError)
    42  		}
    43  	}
    44  
    45  	return r0, r1
    46  }
    47  
    48  // FileWillBeUploaded provides a mock function with given fields: c, info, file, output
    49  func (_m *Hooks) FileWillBeUploaded(c *plugin.Context, info *model.FileInfo, file io.Reader, output io.Writer) (*model.FileInfo, string) {
    50  	ret := _m.Called(c, info, file, output)
    51  
    52  	var r0 *model.FileInfo
    53  	if rf, ok := ret.Get(0).(func(*plugin.Context, *model.FileInfo, io.Reader, io.Writer) *model.FileInfo); ok {
    54  		r0 = rf(c, info, file, output)
    55  	} else {
    56  		if ret.Get(0) != nil {
    57  			r0 = ret.Get(0).(*model.FileInfo)
    58  		}
    59  	}
    60  
    61  	var r1 string
    62  	if rf, ok := ret.Get(1).(func(*plugin.Context, *model.FileInfo, io.Reader, io.Writer) string); ok {
    63  		r1 = rf(c, info, file, output)
    64  	} else {
    65  		r1 = ret.Get(1).(string)
    66  	}
    67  
    68  	return r0, r1
    69  }
    70  
    71  // Implemented provides a mock function with given fields:
    72  func (_m *Hooks) Implemented() ([]string, error) {
    73  	ret := _m.Called()
    74  
    75  	var r0 []string
    76  	if rf, ok := ret.Get(0).(func() []string); ok {
    77  		r0 = rf()
    78  	} else {
    79  		if ret.Get(0) != nil {
    80  			r0 = ret.Get(0).([]string)
    81  		}
    82  	}
    83  
    84  	var r1 error
    85  	if rf, ok := ret.Get(1).(func() error); ok {
    86  		r1 = rf()
    87  	} else {
    88  		r1 = ret.Error(1)
    89  	}
    90  
    91  	return r0, r1
    92  }
    93  
    94  // MessageHasBeenPosted provides a mock function with given fields: c, post
    95  func (_m *Hooks) MessageHasBeenPosted(c *plugin.Context, post *model.Post) {
    96  	_m.Called(c, post)
    97  }
    98  
    99  // MessageHasBeenUpdated provides a mock function with given fields: c, newPost, oldPost
   100  func (_m *Hooks) MessageHasBeenUpdated(c *plugin.Context, newPost *model.Post, oldPost *model.Post) {
   101  	_m.Called(c, newPost, oldPost)
   102  }
   103  
   104  // MessageWillBePosted provides a mock function with given fields: c, post
   105  func (_m *Hooks) MessageWillBePosted(c *plugin.Context, post *model.Post) (*model.Post, string) {
   106  	ret := _m.Called(c, post)
   107  
   108  	var r0 *model.Post
   109  	if rf, ok := ret.Get(0).(func(*plugin.Context, *model.Post) *model.Post); ok {
   110  		r0 = rf(c, post)
   111  	} else {
   112  		if ret.Get(0) != nil {
   113  			r0 = ret.Get(0).(*model.Post)
   114  		}
   115  	}
   116  
   117  	var r1 string
   118  	if rf, ok := ret.Get(1).(func(*plugin.Context, *model.Post) string); ok {
   119  		r1 = rf(c, post)
   120  	} else {
   121  		r1 = ret.Get(1).(string)
   122  	}
   123  
   124  	return r0, r1
   125  }
   126  
   127  // MessageWillBeUpdated provides a mock function with given fields: c, newPost, oldPost
   128  func (_m *Hooks) MessageWillBeUpdated(c *plugin.Context, newPost *model.Post, oldPost *model.Post) (*model.Post, string) {
   129  	ret := _m.Called(c, newPost, oldPost)
   130  
   131  	var r0 *model.Post
   132  	if rf, ok := ret.Get(0).(func(*plugin.Context, *model.Post, *model.Post) *model.Post); ok {
   133  		r0 = rf(c, newPost, oldPost)
   134  	} else {
   135  		if ret.Get(0) != nil {
   136  			r0 = ret.Get(0).(*model.Post)
   137  		}
   138  	}
   139  
   140  	var r1 string
   141  	if rf, ok := ret.Get(1).(func(*plugin.Context, *model.Post, *model.Post) string); ok {
   142  		r1 = rf(c, newPost, oldPost)
   143  	} else {
   144  		r1 = ret.Get(1).(string)
   145  	}
   146  
   147  	return r0, r1
   148  }
   149  
   150  // OnActivate provides a mock function with given fields:
   151  func (_m *Hooks) OnActivate() error {
   152  	ret := _m.Called()
   153  
   154  	var r0 error
   155  	if rf, ok := ret.Get(0).(func() error); ok {
   156  		r0 = rf()
   157  	} else {
   158  		r0 = ret.Error(0)
   159  	}
   160  
   161  	return r0
   162  }
   163  
   164  // OnConfigurationChange provides a mock function with given fields:
   165  func (_m *Hooks) OnConfigurationChange() error {
   166  	ret := _m.Called()
   167  
   168  	var r0 error
   169  	if rf, ok := ret.Get(0).(func() error); ok {
   170  		r0 = rf()
   171  	} else {
   172  		r0 = ret.Error(0)
   173  	}
   174  
   175  	return r0
   176  }
   177  
   178  // OnDeactivate provides a mock function with given fields:
   179  func (_m *Hooks) OnDeactivate() error {
   180  	ret := _m.Called()
   181  
   182  	var r0 error
   183  	if rf, ok := ret.Get(0).(func() error); ok {
   184  		r0 = rf()
   185  	} else {
   186  		r0 = ret.Error(0)
   187  	}
   188  
   189  	return r0
   190  }
   191  
   192  // ServeHTTP provides a mock function with given fields: c, w, r
   193  func (_m *Hooks) ServeHTTP(c *plugin.Context, w http.ResponseWriter, r *http.Request) {
   194  	_m.Called(c, w, r)
   195  }
   196  
   197  // UserHasBeenCreated provides a mock function with given fields: c, user
   198  func (_m *Hooks) UserHasBeenCreated(c *plugin.Context, user *model.User) {
   199  	_m.Called(c, user)
   200  }
   201  
   202  // UserHasJoinedChannel provides a mock function with given fields: c, channelMember, actor
   203  func (_m *Hooks) UserHasJoinedChannel(c *plugin.Context, channelMember *model.ChannelMember, actor *model.User) {
   204  	_m.Called(c, channelMember, actor)
   205  }
   206  
   207  // UserHasJoinedTeam provides a mock function with given fields: c, teamMember, actor
   208  func (_m *Hooks) UserHasJoinedTeam(c *plugin.Context, teamMember *model.TeamMember, actor *model.User) {
   209  	_m.Called(c, teamMember, actor)
   210  }
   211  
   212  // UserHasLeftChannel provides a mock function with given fields: c, channelMember, actor
   213  func (_m *Hooks) UserHasLeftChannel(c *plugin.Context, channelMember *model.ChannelMember, actor *model.User) {
   214  	_m.Called(c, channelMember, actor)
   215  }
   216  
   217  // UserHasLeftTeam provides a mock function with given fields: c, teamMember, actor
   218  func (_m *Hooks) UserHasLeftTeam(c *plugin.Context, teamMember *model.TeamMember, actor *model.User) {
   219  	_m.Called(c, teamMember, actor)
   220  }
   221  
   222  // UserHasLoggedIn provides a mock function with given fields: c, user
   223  func (_m *Hooks) UserHasLoggedIn(c *plugin.Context, user *model.User) {
   224  	_m.Called(c, user)
   225  }
   226  
   227  // UserWillLogIn provides a mock function with given fields: c, user
   228  func (_m *Hooks) UserWillLogIn(c *plugin.Context, user *model.User) string {
   229  	ret := _m.Called(c, user)
   230  
   231  	var r0 string
   232  	if rf, ok := ret.Get(0).(func(*plugin.Context, *model.User) string); ok {
   233  		r0 = rf(c, user)
   234  	} else {
   235  		r0 = ret.Get(0).(string)
   236  	}
   237  
   238  	return r0
   239  }